Add slow motion option
svn-id: r11604
This commit is contained in:
parent
35b62c294d
commit
1ac989586d
2 changed files with 12 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue