aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Animator.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-28 12:53:15 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-28 12:53:15 +0100
commit9d9c4fc4565f0ef0fc81c8baeef804389f07afc2 (patch)
treef8bfb75a2b99f40de8d8cfb68136bd0b8ee68a39 /src/crepe/api/Animator.cpp
parent1cdaa2aaeb1b6bc71876b462fcc464800ec75732 (diff)
implemented loek feedback
Diffstat (limited to 'src/crepe/api/Animator.cpp')
-rw-r--r--src/crepe/api/Animator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp
index 2b21c6c..0fdab0e 100644
--- a/src/crepe/api/Animator.cpp
+++ b/src/crepe/api/Animator.cpp
@@ -14,14 +14,14 @@ Animator::Animator(game_object_id_t id, Sprite & ss, int row, int col, int col_a
col(col) {
dbg_trace();
- this->spritesheet.sprite_rect.h /= col;
- this->spritesheet.sprite_rect.w /= row;
- this->spritesheet.sprite_rect.x = 0;
- this->spritesheet.sprite_rect.y = col_animator * this->spritesheet.sprite_rect.h;
+ this->spritesheet.mask.h /= col;
+ this->spritesheet.mask.w /= row;
+ this->spritesheet.mask.x = 0;
+ this->spritesheet.mask.y = col_animator * this->spritesheet.mask.h;
this->active = false;
// need to do this for to get the aspect ratio for a single clipping in the spritesheet
- this->spritesheet.aspect_ratio = static_cast<double>(this->spritesheet.sprite_rect.w)
- / this->spritesheet.sprite_rect.h;
+ this->spritesheet.aspect_ratio = static_cast<double>(this->spritesheet.mask.w)
+ / this->spritesheet.mask.h;
}
Animator::~Animator() { dbg_trace(); }