diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-22 17:08:55 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-22 17:08:55 +0100 |
commit | 8513b2dad0ec43678f17cca0510db4d1a938279a (patch) | |
tree | 8437473da7eb9c7fae6369d2767fcd305fab856f /src/crepe/api/Sprite.h | |
parent | 4ce924b1b1322ee4da3ba50d6da856ad13a2190b (diff) |
working moving camera, flip animations, resizing with animations, and black bars
Diffstat (limited to 'src/crepe/api/Sprite.h')
-rw-r--r-- | src/crepe/api/Sprite.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h index 66599c9..89f9121 100644 --- a/src/crepe/api/Sprite.h +++ b/src/crepe/api/Sprite.h @@ -68,7 +68,13 @@ public: //! height in world units int height = 0; - const double aspect_ratio; + /** + * \aspect_ratio ratio of the img so that scaling will not become weird + * + * cannot be const because if Animator component is addded then ratio becomes scuffed and + * does it need to be calculated again in the Animator + */ + double aspect_ratio; public: /** @@ -90,7 +96,7 @@ private: friend class AnimatorSystem; //! Render area of the sprite this will also be adjusted by the AnimatorSystem if an Animator - // object is present in GameObject + // object is present in GameObject. this is in sprite pixels Rect sprite_rect; }; |