aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-30 21:03:11 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-30 21:03:11 +0100
commit3afcae9dd472ead2d5f2b667fc6479f8ee6db10c (patch)
tree9fda1dc74d453a1f68796b5a0987ba5e32339a21 /src/crepe/system
parent6ae0b9038e432869b506cbdfe2779e97d3732d87 (diff)
make format
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/AnimatorSystem.cpp4
-rw-r--r--src/crepe/system/RenderSystem.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp
index 6a84150..ee00728 100644
--- a/src/crepe/system/AnimatorSystem.cpp
+++ b/src/crepe/system/AnimatorSystem.cpp
@@ -22,11 +22,11 @@ void AnimatorSystem::update() {
int cycle_end = (a.cycle_end == -1) ? a.row : cycle_end;
int total_frames = cycle_end - a.cycle_start;
-
int curr_frame = static_cast<int>(elapsed_time / frame_duration) % total_frames;
a.curr_row = a.cycle_start + curr_frame;
- a.spritesheet.mask.x = std::clamp((a.curr_row * a.spritesheet.mask.w - a.offset_x), 0, a.spritesheet.mask.w);
+ a.spritesheet.mask.x = std::clamp((a.curr_row * a.spritesheet.mask.w - a.offset_x), 0,
+ a.spritesheet.mask.w);
a.spritesheet.mask.y = (a.curr_col * a.spritesheet.mask.h);
if (!a.looping && curr_frame == total_frames) {
diff --git a/src/crepe/system/RenderSystem.h b/src/crepe/system/RenderSystem.h
index 9ff015e..249f3b8 100644
--- a/src/crepe/system/RenderSystem.h
+++ b/src/crepe/system/RenderSystem.h
@@ -76,7 +76,7 @@ private:
private:
SDLContext & context = SDLContext::get_instance();
-
+
SDLContext::CameraValues cam_ctx;
};