aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2002-12-03 05:34:55 +0000
committerTravis Howell2002-12-03 05:34:55 +0000
commitfdcdb9e4fa49934cbbb3165f490cc59347acc0a2 (patch)
tree4d4ac3f43134b39da9daa08db6775e40f9d61d97 /simon
parent62f87e086ae4725274dad6223c58b9285f2cd62d (diff)
downloadscummvm-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')
-rw-r--r--simon/items.cpp30
-rw-r--r--simon/simon.h1
2 files changed, 29 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
diff --git a/simon/simon.h b/simon/simon.h
index 8942786d35..d98fa4c978 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -754,6 +754,7 @@ public:
void checkTimerCallback();
void delay(uint delay);
+ void o_83_helper();
void o_190_helper(uint i);
void vc_58();
void timer_vga_sprites_helper();