diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-10 16:21:05 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-10 16:21:05 +0100 |
commit | 7b8de90699aea153e73b5f2cee05c69b966b81be (patch) | |
tree | 123f8b71b59a933b2bfcffb9e43e5bea66086d8f /src/crepe/system/AnimatorSystem.cpp | |
parent | 33cd5566909ac089cdf56db38a3d1daf0cb7dd10 (diff) |
implemented feedback wouter, improved animator. however if spritesheet aspect_ratio is not the same as the single frame then the scaling is wrong
Diffstat (limited to 'src/crepe/system/AnimatorSystem.cpp')
-rw-r--r-- | src/crepe/system/AnimatorSystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index 549c35d..bb22b62 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -23,7 +23,7 @@ void AnimatorSystem::update() { int last_frame = ctx.row; - int cycle_end = (ctx.cycle_end == -1) ? a.max_rows : ctx.cycle_end; + int cycle_end = (ctx.cycle_end == -1) ? a.max_cell_size.x : ctx.cycle_end; int total_frames = cycle_end - ctx.cycle_start; int curr_frame = static_cast<int>(elapsed_time / frame_duration) % total_frames; |