diff options
| -rw-r--r-- | simon/items.cpp | 6 | ||||
| -rw-r--r-- | simon/simon.cpp | 13 | ||||
| -rw-r--r-- | simon/simon.h | 5 | ||||
| -rw-r--r-- | simon/vga.cpp | 6 |
4 files changed, 17 insertions, 13 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 872b6eaf42..d9eb7b8c26 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -37,7 +37,7 @@ int SimonState::runScript() bool flag, condition; do { - if (_mainscript_toggle) + if (_continous_mainscript) dumpOpcode(_code_ptr); opcode = getByte(); @@ -1195,7 +1195,7 @@ int SimonState::startSubroutine(Subroutine *sub) SubroutineLine *sl; byte *old_code_ptr; - if (_mainscript_toggle) + if (_start_mainscript) dumpSubroutine(sub); old_code_ptr = _code_ptr; @@ -1214,7 +1214,7 @@ int SimonState::startSubroutine(Subroutine *sub) else _code_ptr += 8; - if (_mainscript_toggle) + if (_continous_mainscript) fprintf(_dump_file, "; %d\n", sub->id); result = runScript(); if (result != 0) { diff --git a/simon/simon.cpp b/simon/simon.cpp index c6668be74d..20bc397ad8 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4479,8 +4479,9 @@ void SimonState::go() _last_music_played = (uint) - 1; _vga_base_delay = 1; - _mainscript_toggle = false; - _vgascript_toggle = false; + _start_mainscript = false; + _continous_mainscript = false; + _continous_vgascript = false; if (_sound->hasVoice()) { _vk_t_toggle = false; @@ -4527,10 +4528,12 @@ void SimonState::delay(uint amount) while (_system->poll_event(&event)) { switch (event.event_code) { case OSystem::EVENT_KEYDOWN: - if (event.kbd.ascii == 'o') { - _mainscript_toggle ^= 1; + if (event.kbd.ascii == 'r') { + _start_mainscript ^= 1; + } else if (event.kbd.ascii == 'o') { + _continous_mainscript ^= 1; } else if (event.kbd.ascii == 'v') { - _vgascript_toggle ^= 1; + _continous_vgascript ^= 1; } else if (event.kbd.ascii == 't') { _vk_t_toggle ^= 1; } else if (event.kbd.ascii == '+') { diff --git a/simon/simon.h b/simon/simon.h index fa5d7a9ee2..c73f7e78f1 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -173,8 +173,9 @@ public: bool _dx_use_3_or_4_for_lock; bool _mouse_pos_changed; - bool _mainscript_toggle; - bool _vgascript_toggle; + bool _start_mainscript; + bool _continous_mainscript; + bool _continous_vgascript; bool _vk_t_toggle; byte _mouse_cursor; bool _vga_var9; diff --git a/simon/vga.cpp b/simon/vga.cpp index 790960e5a5..2acc2cb405 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -113,7 +113,7 @@ void SimonState::run_vga_script() for (;;) { uint opcode; -if (_vgascript_toggle) { +if (_continous_vgascript) { if ((void *)_vc_ptr != (void *)&vc_get_out_of_code) { // if (_vga_cur_sprite_id==62 && _vga_cur_file_id==68 || // _vga_cur_sprite_id==1 && _vga_cur_file_id==2) { @@ -196,7 +196,7 @@ void SimonState::vc_skip_next_instruction() _vc_ptr += opcode_param_len_simon1[opcode]; } - if (_vgascript_toggle) + if (_continous_vgascript) fprintf(_dump_file, "; skipped\n"); } @@ -1647,7 +1647,7 @@ void SimonState::vc_56_no_op() if (_game & GAME_SIMON2) { uint num = vc_read_var_or_word() * _vga_base_delay; - if (_vgascript_toggle) + if (_continous_vgascript) fprintf(_dump_file, "; sleep_ex = %d\n", num + gss->VGA_DELAY_BASE); add_vga_timer(num + gss->VGA_DELAY_BASE, _vc_ptr, _vga_cur_sprite_id, _vga_cur_file_id); |
