aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-07 20:27:01 +0200
committerFilippos Karapetis2011-12-07 20:30:17 +0200
commitad877e9306d4e8f671c0b24137bbaf277316bf45 (patch)
tree84c75389af06ca6474f0c8dde0a347812fa4d91d /engines
parent9e617d0dfddf91e5802c783fae5be679afe22b05 (diff)
downloadscummvm-rg350-ad877e9306d4e8f671c0b24137bbaf277316bf45.tar.gz
scummvm-rg350-ad877e9306d4e8f671c0b24137bbaf277316bf45.tar.bz2
scummvm-rg350-ad877e9306d4e8f671c0b24137bbaf277316bf45.zip
DREAMWEB: 'intromagic2', 'intromagic3' ported to C++
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp36
-rw-r--r--engines/dreamweb/dreamgen.h2
-rw-r--r--engines/dreamweb/people.cpp29
-rw-r--r--engines/dreamweb/stubs.h2
4 files changed, 27 insertions, 42 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b5094dfb1a..4299885347 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -720,42 +720,6 @@ candles2fin:
showGameReel();
}
-void DreamGenContext::introMagic2() {
- STACK_CHECK;
- checkSpeed();
- if (!flags.z())
- goto introm2fin;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 216);
- if (!flags.z())
- goto gotintrom2;
- ax = 192;
-gotintrom2:
- es.word(bx+3) = ax;
-introm2fin:
- showGameReel();
-}
-
-void DreamGenContext::introMagic3() {
- STACK_CHECK;
- checkSpeed();
- if (!flags.z())
- goto introm3fin;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 218);
- if (!flags.z())
- goto gotintrom3;
- data.byte(kGetback) = 1;
-gotintrom3:
- es.word(bx+3) = ax;
-introm3fin:
- showGameReel();
- al = data.byte(kMapx);
- es.byte(bx+1) = al;
-}
-
void DreamGenContext::introMonks1() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 572564c6cb..ead391d0b6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -639,8 +639,6 @@ public:
void openFileNoCheck();
void fadeUpMon();
void clearChanges();
- void introMagic2();
- void introMagic3();
void showDiaryPage();
void transferToEx();
void reExFromInv();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index d1814ce8b9..288cbeb771 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -44,8 +44,8 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
&DreamGenContext::mugger, &DreamGenContext::helicopter,
NULL, NULL,
- &DreamGenContext::introMagic2, &DreamGenContext::candles2,
- NULL, &DreamGenContext::introMagic3,
+ NULL, &DreamGenContext::candles2,
+ NULL, NULL,
&DreamGenContext::introMonks1, NULL,
&DreamGenContext::introMonks2, NULL,
&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
@@ -76,8 +76,8 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/,
/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL,
&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
- /*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL,
- &DreamGenContext::gates, /*&DreamGenContext::introMagic3*/NULL,
+ &DreamGenContext::introMagic2, /*&DreamGenContext::candles2*/NULL,
+ &DreamGenContext::gates, &DreamGenContext::introMagic3,
/*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
/*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap,
/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,
@@ -398,6 +398,27 @@ void DreamGenContext::introMagic1(ReelRoutine &routine) {
showGameReel(&routine);
}
+void DreamGenContext::introMagic2(ReelRoutine &routine) {
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+ if (nextReelPointer == 216)
+ nextReelPointer = 192;
+ routine.setReelPointer(nextReelPointer);
+ }
+ showGameReel(&routine);
+}
+
+void DreamGenContext::introMagic3(ReelRoutine &routine) {
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+ if (nextReelPointer == 218)
+ data.byte(kGetback) = 1;
+ routine.setReelPointer(nextReelPointer);
+ }
+ showGameReel(&routine);
+ routine.mapX = data.byte(kMapx);
+}
+
void DreamGenContext::introMusic(ReelRoutine &routine) {
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 1b80818b5e..0e9d1e74a3 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -431,6 +431,8 @@
void manAsleep(ReelRoutine &routine);
void drunk(ReelRoutine &routine);
void introMagic1(ReelRoutine &routine);
+ void introMagic2(ReelRoutine &routine);
+ void introMagic3(ReelRoutine &routine);
void introMusic(ReelRoutine &routine);
void candles(ReelRoutine &routine);
void gates(ReelRoutine &routine);