From 9d9c4fc4565f0ef0fc81c8baeef804389f07afc2 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Thu, 28 Nov 2024 12:53:15 +0100 Subject: implemented loek feedback --- src/crepe/api/Animator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/crepe/api/Animator.cpp') 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(this->spritesheet.sprite_rect.w) - / this->spritesheet.sprite_rect.h; + this->spritesheet.aspect_ratio = static_cast(this->spritesheet.mask.w) + / this->spritesheet.mask.h; } Animator::~Animator() { dbg_trace(); } -- cgit v1.2.3