diff options
Diffstat (limited to 'src/crepe/system')
-rw-r--r-- | src/crepe/system/AnimatorSystem.cpp | 3 | ||||
-rw-r--r-- | src/crepe/system/AnimatorSystem.h | 3 | ||||
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index 9d18873..ceb5bfd 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -3,8 +3,8 @@ #include <vector> #include "api/Animator.h" -#include "facade/SDLContext.h" +#include "facade/SDLContext.h" #include "AnimatorSystem.h" #include "ComponentManager.h" @@ -19,6 +19,7 @@ void AnimatorSystem::update() { uint64_t tick = SDLContext::get_instance().get_ticks(); for (Animator & a : animations) { if (a.active) { + // (10 frames per second) a.curr_row = (tick / 100) % a.row; a.animator_rect.x = (a.curr_row * a.animator_rect.w) + a.curr_col; a.spritesheet.sprite_rect = a.animator_rect; diff --git a/src/crepe/system/AnimatorSystem.h b/src/crepe/system/AnimatorSystem.h index 56cc7b3..f8179a9 100644 --- a/src/crepe/system/AnimatorSystem.h +++ b/src/crepe/system/AnimatorSystem.h @@ -21,12 +21,11 @@ public: /** * \brief Updates the Animator components. * - * This method is called periodically (likely every frame) to update the state of all + * This method is called to update the state of all * Animator components, moving the animations forward and managing their behavior (e.g., * looping). */ void update() override; - // FIXME: never say "likely" in the documentation lmao }; } // namespace crepe diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index fa3d0de..989a82f 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -5,7 +5,6 @@ #include "../api/Sprite.h" #include "../api/Transform.h" #include "../facade/SDLContext.h" -#include "../util/Log.h" #include "RenderSystem.h" |