From ec69f40540317215d0f30e1f8e43d0e18450f8cc Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 22 Dec 2024 20:05:02 +0100 Subject: `make format` --- src/crepe/system/AnimatorSystem.cpp | 2 +- src/crepe/system/ScriptSystem.cpp | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/crepe/system') diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index 467d2a2..6c93372 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -30,7 +30,7 @@ void AnimatorSystem::frame_update() { if (animator.elapsed > frame_duration) { animator.elapsed = 0ms; animator.data.frame++; - + if (animator.data.looping && animator.data.frame >= animator.data.cycle_end) animator.data.frame = animator.data.cycle_start; } diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp index 411a9a3..f1e31f9 100644 --- a/src/crepe/system/ScriptSystem.cpp +++ b/src/crepe/system/ScriptSystem.cpp @@ -36,7 +36,11 @@ void ScriptSystem::update( script->init(); script->initialized = true; } catch (const exception & e) { - Log::logf(Log::Level::WARNING, "Disabled script \"{}\" due to exception in init function: {}", behavior_script.name, e.what()); + Log::logf( + Log::Level::WARNING, + "Disabled script \"{}\" due to exception in init function: {}", + behavior_script.name, e.what() + ); behavior_script.active = false; } } @@ -45,7 +49,11 @@ void ScriptSystem::update( (*script.*update_function)(delta_time); } catch (const exception & e) { // TODO: discern between fixed/frame update - Log::logf(Log::Level::WARNING, "Disabled script \"{}\" due to exception in update function: {}", behavior_script.name, e.what()); + Log::logf( + Log::Level::WARNING, + "Disabled script \"{}\" due to exception in update function: {}", + behavior_script.name, e.what() + ); behavior_script.active = false; } } -- cgit v1.2.3