aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/people.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-08 21:10:39 +0200
committerFilippos Karapetis2011-12-08 21:10:39 +0200
commit96360bb153201ccbd0b5748c2f153ae1277258b5 (patch)
treef547efd7cdec37b9ebc57e2cf83caac67fe08c75 /engines/dreamweb/people.cpp
parente731d9b8132d0c64dbd115173a600eb977aa50fa (diff)
downloadscummvm-rg350-96360bb153201ccbd0b5748c2f153ae1277258b5.tar.gz
scummvm-rg350-96360bb153201ccbd0b5748c2f153ae1277258b5.tar.bz2
scummvm-rg350-96360bb153201ccbd0b5748c2f153ae1277258b5.zip
DREAMWEB: Port 'intromonks2' to C++
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r--engines/dreamweb/people.cpp45
1 files changed, 43 insertions, 2 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index d87a5e3084..6b78178229 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -47,7 +47,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
NULL, NULL,
NULL, NULL,
- &DreamGenContext::introMonks2, NULL,
+ NULL, NULL,
NULL, &DreamGenContext::endGameSeq,
NULL, NULL,
NULL, NULL,
@@ -79,7 +79,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::introMagic2, &DreamGenContext::candles2,
&DreamGenContext::gates, &DreamGenContext::introMagic3,
&DreamGenContext::introMonks1, &DreamGenContext::candles,
- /*&DreamGenContext::introMonks2*/NULL, &DreamGenContext::handClap,
+ &DreamGenContext::introMonks2, &DreamGenContext::handClap,
&DreamGenContext::monkAndRyan, /*&DreamGenContext::endGameSeq*/NULL,
&DreamGenContext::priest, &DreamGenContext::madman,
&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
@@ -722,4 +722,45 @@ void DreamGenContext::introMonks1(ReelRoutine &routine) {
routine.mapY = data.byte(kMapy);
}
+void DreamGenContext::introMonks2(ReelRoutine &routine) {
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+ if (nextReelPointer == 87) {
+ data.byte(kIntrocount)++;
+ push(es);
+ push(bx);
+ monks2text();
+ bx = pop();
+ es = pop();
+
+ if (data.byte(kIntrocount), 19)
+ nextReelPointer = 87;
+ else
+ nextReelPointer = 74;
+ }
+
+ if (nextReelPointer == 110) {
+ data.byte(kIntrocount)++;
+ push(es);
+ push(bx);
+ monks2text();
+ bx = pop();
+ es = pop();
+
+ if (data.byte(kIntrocount) == 35)
+ nextReelPointer = 111;
+ else
+ nextReelPointer = 98;
+ } else if (nextReelPointer == 176) {
+ data.byte(kGetback) = 1;
+ } else if (nextReelPointer == 125) {
+ nextReelPointer = 140;
+ }
+
+ routine.setReelPointer(nextReelPointer);
+ }
+
+ showGameReel(&routine);
+}
+
} // End of namespace DreamGen