diff options
author | Travis Howell | 2002-12-03 05:34:55 +0000 |
---|---|---|
committer | Travis Howell | 2002-12-03 05:34:55 +0000 |
commit | fdcdb9e4fa49934cbbb3165f490cc59347acc0a2 (patch) | |
tree | 4d4ac3f43134b39da9daa08db6775e40f9d61d97 /simon/items.cpp | |
parent | 62f87e086ae4725274dad6223c58b9285f2cd62d (diff) | |
download | scummvm-rg350-fdcdb9e4fa49934cbbb3165f490cc59347acc0a2.tar.gz scummvm-rg350-fdcdb9e4fa49934cbbb3165f490cc59347acc0a2.tar.bz2 scummvm-rg350-fdcdb9e4fa49934cbbb3165f490cc59347acc0a2.zip |
Last minute simon fixes
Full simon 2 intro now works
All simon 2 cut scenes can be skipped
One simon 2 freeze completely fixed
svn-id: r5819
Diffstat (limited to 'simon/items.cpp')
-rw-r--r-- | simon/items.cpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 065536a095..a94ef7a3fc 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -465,6 +465,8 @@ int SimonState::runScript() break; case 83:{ /* restart subroutine */ + if (_game & GAME_SIMON2) + o_83_helper(); return -10; } @@ -1280,9 +1282,32 @@ bool SimonState::checkIfToRunSubroutineLine(SubroutineLine *sl, Subroutine *sub) return true; } +void SimonState::o_83_helper() +{ + if (_exit_cutscene) { + if (vc_get_bit(9)) { + startSubroutine170(); + } + } else { + processSpecialKeys(); + } +} + void SimonState::o_190_helper(uint i) { - warning("o_190_helper not implemented"); + _exit_cutscene = false; + while (!(_op_189_flags & (1 << i))) { + if (_exit_cutscene) { + if (vc_get_bit(9)) { + startSubroutine170(); + break; + } + } else { + processSpecialKeys(); + } + + delay(10); + } } @@ -1300,7 +1325,8 @@ bool SimonState::o_unk_23(uint a) return 0; } - if (((uint) (rand() >> 5)) % 100 < a) { + warning("opcode 24 random is been used"); + if (((uint) (_rnd.getRandomNumber(100) >> 5)) % 100 < a) { if (_script_unk_1 <= 0) _script_unk_1 -= 5; else |