aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Animator.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:36:44 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:36:44 +0100
commit2bcd6ece912ab0a140f9d925718e8787879d1ed7 (patch)
treeea13906ba7afcd519579639b3b2d620628151fe1 /src/crepe/api/Animator.cpp
parente6a5bb579d0969245f34119ef2489f47039c523e (diff)
adjusted aspect ratio
Diffstat (limited to 'src/crepe/api/Animator.cpp')
-rw-r--r--src/crepe/api/Animator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp
index 4c72cc0..123f0e7 100644
--- a/src/crepe/api/Animator.cpp
+++ b/src/crepe/api/Animator.cpp
@@ -19,6 +19,8 @@ Animator::Animator(game_object_id_t id, Sprite & spritesheet, const ivec2 & sing
this->spritesheet.mask.h = single_frame_size.y;
this->spritesheet.mask.x = 0;
this->spritesheet.mask.y = 0;
+
+ this->spritesheet.aspect_ratio = static_cast<float>(single_frame_size.x) / single_frame_size.y;
}
Animator::~Animator() { dbg_trace(); }