diff options
author | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 14:44:57 +0100 |
---|---|---|
committer | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 14:44:57 +0100 |
commit | 433c840c14782d84b4b95265b3e6f7a1f67ade3b (patch) | |
tree | 3c6cfd65f07163eedd9fdb28420b13cff1874d35 /game/preview/PreviewReplaySubScript.cpp | |
parent | 5203994b55aa51d5034c30001e0dac66efe2f14b (diff) |
Make format
Diffstat (limited to 'game/preview/PreviewReplaySubScript.cpp')
-rw-r--r-- | game/preview/PreviewReplaySubScript.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/game/preview/PreviewReplaySubScript.cpp b/game/preview/PreviewReplaySubScript.cpp index 51c27aa..580a608 100644 --- a/game/preview/PreviewReplaySubScript.cpp +++ b/game/preview/PreviewReplaySubScript.cpp @@ -21,17 +21,16 @@ void PreviewReplaySubScript::init() { this->subscribe<StartPreviewRecording>([this](const StartPreviewRecording & e) { return this->start_recording(); }); - } bool PreviewReplaySubScript::on_button_press(const ButtonPressEvent & e) { - if(DISABLE_REPLAY)return false; + if (DISABLE_REPLAY) return false; replay.play(this->recording); return false; } -bool PreviewReplaySubScript::start_recording(){ - if(DISABLE_REPLAY)return false; - if(record_saved){ +bool PreviewReplaySubScript::start_recording() { + if (DISABLE_REPLAY) return false; + if (record_saved) { this->stop_recording(); this->delete_recording(); } @@ -41,16 +40,16 @@ bool PreviewReplaySubScript::start_recording(){ } bool PreviewReplaySubScript::stop_recording() { - if(DISABLE_REPLAY)return false; - if(this->record_started)this->recording = replay.record_end(); + if (DISABLE_REPLAY) return false; + if (this->record_started) this->recording = replay.record_end(); this->record_saved = true; return false; } bool PreviewReplaySubScript::delete_recording() { - if(DISABLE_REPLAY)return false; - if(this->record_started) this->stop_recording(); - if(this->record_saved)replay.release(this->recording); + if (DISABLE_REPLAY) return false; + if (this->record_started) this->stop_recording(); + if (this->record_saved) replay.release(this->recording); this->record_saved = false; return false; } |