From 1ac989586d7a18150edb3ee64c5bbcb609937aae Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 13 Dec 2003 01:18:31 +0000 Subject: [PATCH] Add slow motion option svn-id: r11604 --- simon/simon.cpp | 14 +++++++++++--- simon/simon.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/simon/simon.cpp b/simon/simon.cpp index 40b6fddc084..27742b380bb 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -323,6 +323,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _in_callback = 0; _cepe_flag = 0; _copy_partial_mode = 0; + _slow_mode = 0; _fast_mode = 0; _dx_use_3_or_4_for_lock = 0; @@ -4834,7 +4835,9 @@ void SimonEngine::delay(uint amount) { uint32 cur = start; uint this_delay, vga_period; - if (_fast_mode) + if (_slow_mode) + vga_period = 500; + else if (_fast_mode) vga_period = 10; else if (_game & GF_SIMON2) vga_period = 45; @@ -4875,8 +4878,10 @@ void SimonEngine::delay(uint amount) { GUI::Dialog *_aboutDialog; _aboutDialog = new GUI::AboutDialog(); _aboutDialog->runModal(); - } else if (event.kbd.keycode == 'f') + } else if (event.kbd.keycode == 'f') { _fast_mode ^= 1; + } else if (event.kbd.keycode == 's') + _slow_mode ^= 1; } // Make sure backspace works right (this fixes a small issue on OS X) if (event.kbd.keycode == 8) @@ -4914,7 +4919,10 @@ void SimonEngine::delay(uint amount) { break; { - this_delay = _fast_mode ? 1 : 20; + if (_slow_mode) + this_delay = 200; + else + this_delay = _fast_mode ? 1 : 20; if (this_delay > amount) this_delay = amount; _system->delay_msecs(this_delay); diff --git a/simon/simon.h b/simon/simon.h index a1c33c78115..3366fe0178d 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -186,6 +186,7 @@ protected: bool _in_callback; bool _cepe_flag; byte _copy_partial_mode; + bool _slow_mode; bool _fast_mode; bool _dx_use_3_or_4_for_lock;