From 0c3626c9f4484ab755285fdb77c097e4c6bf7247 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 22 Dec 2002 03:54:51 +0000 Subject: Some _lock_word corrections svn-id: r6054 --- simon/items.cpp | 19 +++++++++++++------ simon/simon.cpp | 24 ++++++++++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) (limited to 'simon') diff --git a/simon/items.cpp b/simon/items.cpp index 3143d0d2e2..2086c37f8b 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1498,10 +1498,17 @@ void SimonState::o_unk_127() void SimonState::o_unk_120(uint a) { uint16 id = TO_BE_16(a); - _lock_word |= 0x4000; - _vc_ptr = (byte *)&id; - vc_15_wakeup_id(); - _lock_word &= ~0x4000; + if (_game & GAME_SIMON2) { + _lock_word |= 0x8000; + _vc_ptr = (byte *)&id; + vc_15_wakeup_id(); + _lock_word &= ~0x8000; + } else { + _lock_word |= 0x4000; + _vc_ptr = (byte *)&id; + vc_15_wakeup_id(); + _lock_word &= ~0x4000; + } } void SimonState::o_unk_163(uint a) @@ -1538,10 +1545,10 @@ void SimonState::o_unk_99_simon2(uint a, uint b) items[0] = TO_BE_16(a); items[1] = TO_BE_16(b); - _lock_word |= 0x4000; + _lock_word |= 0x8000; _vc_ptr = (byte *)&items; vc_60_kill_thread(); - _lock_word &= ~0x4000; + _lock_word &= ~0x8000; } /* OK */ diff --git a/simon/simon.cpp b/simon/simon.cpp index 279462c26b..38a9c10cb6 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -2209,9 +2209,15 @@ void SimonState::o_force_unlock() void SimonState::o_force_lock() { - _lock_word |= 0x4000; - vc_34_force_lock(); - _lock_word &= ~0x4000; + if (_game & GAME_SIMON2) { + _lock_word |= 0x8000; + vc_34_force_lock(); + _lock_word &= ~0x8000; + } else { + _lock_word |= 0x4000; + vc_34_force_lock(); + _lock_word &= ~0x4000; + } } void SimonState::o_save_game() @@ -2747,9 +2753,15 @@ void SimonState::fcs_setTextColor(FillOrCopyStruct *fcs, uint value) void SimonState::o_vga_reset() { - _lock_word |= 0x4000; - vc_27_reset(); - _lock_word &= ~0x4000; + if (_game & GAME_SIMON2) { + _lock_word |= 0x8000; + vc_27_reset(); + _lock_word &= ~0x8000; + } else { + _lock_word |= 0x4000; + vc_27_reset(); + _lock_word &= ~0x4000; + } } bool SimonState::vc_maybe_skip_proc_3(uint16 a) -- cgit v1.2.3