Add slow motion option

svn-id: r11604
This commit is contained in:
Travis Howell 2003-12-13 01:18:31 +00:00
parent 35b62c294d
commit 1ac989586d
2 changed files with 12 additions and 3 deletions

View file

@ -323,6 +323,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_in_callback = 0; _in_callback = 0;
_cepe_flag = 0; _cepe_flag = 0;
_copy_partial_mode = 0; _copy_partial_mode = 0;
_slow_mode = 0;
_fast_mode = 0; _fast_mode = 0;
_dx_use_3_or_4_for_lock = 0; _dx_use_3_or_4_for_lock = 0;
@ -4834,7 +4835,9 @@ void SimonEngine::delay(uint amount) {
uint32 cur = start; uint32 cur = start;
uint this_delay, vga_period; uint this_delay, vga_period;
if (_fast_mode) if (_slow_mode)
vga_period = 500;
else if (_fast_mode)
vga_period = 10; vga_period = 10;
else if (_game & GF_SIMON2) else if (_game & GF_SIMON2)
vga_period = 45; vga_period = 45;
@ -4875,8 +4878,10 @@ void SimonEngine::delay(uint amount) {
GUI::Dialog *_aboutDialog; GUI::Dialog *_aboutDialog;
_aboutDialog = new GUI::AboutDialog(); _aboutDialog = new GUI::AboutDialog();
_aboutDialog->runModal(); _aboutDialog->runModal();
} else if (event.kbd.keycode == 'f') } else if (event.kbd.keycode == 'f') {
_fast_mode ^= 1; _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) // Make sure backspace works right (this fixes a small issue on OS X)
if (event.kbd.keycode == 8) if (event.kbd.keycode == 8)
@ -4914,7 +4919,10 @@ void SimonEngine::delay(uint amount) {
break; break;
{ {
this_delay = _fast_mode ? 1 : 20; if (_slow_mode)
this_delay = 200;
else
this_delay = _fast_mode ? 1 : 20;
if (this_delay > amount) if (this_delay > amount)
this_delay = amount; this_delay = amount;
_system->delay_msecs(this_delay); _system->delay_msecs(this_delay);

View file

@ -186,6 +186,7 @@ protected:
bool _in_callback; bool _in_callback;
bool _cepe_flag; bool _cepe_flag;
byte _copy_partial_mode; byte _copy_partial_mode;
bool _slow_mode;
bool _fast_mode; bool _fast_mode;
bool _dx_use_3_or_4_for_lock; bool _dx_use_3_or_4_for_lock;