diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-11 16:09:21 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-11 16:09:21 +0100 |
commit | 2153593f3a684a6b771c98a8e0c385b50a1e8886 (patch) | |
tree | 5c655dd7fe7cb4dd5c361c075af2f8993c425402 /src/crepe/api/Animator.cpp | |
parent | 68c6e53f195677a3f91deb1526275fd38e00341d (diff) |
implemented feedback
Diffstat (limited to 'src/crepe/api/Animator.cpp')
-rw-r--r-- | src/crepe/api/Animator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp index 644363e..4ce4bf0 100644 --- a/src/crepe/api/Animator.cpp +++ b/src/crepe/api/Animator.cpp @@ -8,10 +8,10 @@ using namespace crepe; Animator::Animator(game_object_id_t id, Sprite & spritesheet, const ivec2 & single_frame_size, - const uvec2 & max_cell_size, const Animator::Data & data) + const uvec2 & grid_size, const Animator::Data & data) : Component(id), spritesheet(spritesheet), - max_cell_size(max_cell_size), + grid_size(grid_size), data(data) { dbg_trace(); @@ -52,6 +52,6 @@ void Animator::set_anim(int col) { void Animator::next_anim() { Animator::Data & ctx = this->data; - ctx.row = ctx.row++ % this->max_cell_size.x; + ctx.row = ctx.row++ % this->grid_size.x; this->spritesheet.mask.x = ctx.row * this->spritesheet.mask.w; } |