aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp52
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/people.cpp41
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 40 insertions, 56 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 9a319b9311..cba8aa9ec7 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -383,6 +383,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'intromagic1',
'intromagic2',
'intromagic3',
+ 'intromonks1',
'intromusic',
'inventory',
'isitdescribed',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 9c1db94376..3a9fb57541 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -523,58 +523,6 @@ gotheavyframe:
addToPeopleList();
}
-void DreamGenContext::introMonks1() {
- STACK_CHECK;
- checkSpeed();
- if (!flags.z())
- goto intromonk1fin;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 80);
- if (!flags.z())
- goto notendmonk1;
- _add(data.byte(kMapy), 10);
- data.byte(kNowinnewroom) = 1;
- showGameReel();
- return;
-notendmonk1:
- _cmp(ax, 30);
- if (!flags.z())
- goto gotintromonk1;
- _sub(data.byte(kMapy), 10);
- data.byte(kNowinnewroom) = 1;
- ax = 51;
-gotintromonk1:
- es.word(bx+3) = ax;
- _cmp(ax, 5);
- if (flags.z())
- goto waitstep;
- _cmp(ax, 15);
- if (flags.z())
- goto waitstep;
- _cmp(ax, 25);
- if (flags.z())
- goto waitstep;
- _cmp(ax, 61);
- if (flags.z())
- goto waitstep;
- _cmp(ax, 71);
- if (flags.z())
- goto waitstep;
- goto intromonk1fin;
-waitstep:
- push(es);
- push(bx);
- intro2Text();
- bx = pop();
- es = pop();
- es.byte(bx+6) = -20;
-intromonk1fin:
- showGameReel();
- al = data.byte(kMapy);
- es.byte(bx+2) = al;
-}
-
void DreamGenContext::introMonks2() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 0fb145255f..0fb155b6a5 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -557,7 +557,6 @@ public:
void useCashCard();
void moneyPoke();
void doSomeTalk();
- void introMonks1();
void resetLocation();
void introMonks2();
void greyscaleSum();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index cd1f2d4d2a..cebe8721e3 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -46,7 +46,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
NULL, NULL,
NULL, NULL,
- &DreamGenContext::introMonks1, NULL,
+ NULL, NULL,
&DreamGenContext::introMonks2, NULL,
NULL, &DreamGenContext::endGameSeq,
NULL, NULL,
@@ -78,8 +78,8 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
&DreamGenContext::introMagic2, &DreamGenContext::candles2,
&DreamGenContext::gates, &DreamGenContext::introMagic3,
- /*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
- /*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap,
+ &DreamGenContext::introMonks1, &DreamGenContext::candles,
+ /*&DreamGenContext::introMonks2*/NULL, &DreamGenContext::handClap,
&DreamGenContext::monkAndRyan, /*&DreamGenContext::endGameSeq*/NULL,
&DreamGenContext::priest, &DreamGenContext::madman,
&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
@@ -688,4 +688,39 @@ void DreamGenContext::copper(ReelRoutine &routine) {
addToPeopleList(&routine);
}
+void DreamGenContext::introMonks1(ReelRoutine &routine) {
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+
+ if (nextReelPointer == 80) {
+ data.byte(kMapy) += 10;
+ data.byte(kNowinnewroom) = 1;
+ showGameReel(&routine);
+ return;
+ } else if (nextReelPointer == 30) {
+ data.byte(kMapy) -= 10;
+ data.byte(kNowinnewroom) = 1;
+ nextReelPointer = 51;
+ }
+
+ routine.setReelPointer(nextReelPointer);
+
+ if (nextReelPointer == 5 || nextReelPointer == 15 ||
+ nextReelPointer == 25 || nextReelPointer == 61 ||
+ nextReelPointer == 71) {
+ // Wait step
+ push(es);
+ push(bx);
+ intro2Text();
+ bx = pop();
+ es = pop();
+ routine.counter = -20;
+ }
+ }
+
+intromonk1fin:
+ showGameReel(&routine);
+ routine.mapY = data.byte(kMapy);
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f1dd99811b..27268bb970 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -424,6 +424,7 @@
void priestText(ReelRoutine &routine);
void monkAndRyan(ReelRoutine &routine);
void copper(ReelRoutine &routine);
+ void introMonks1(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();