aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp40
-rw-r--r--engines/dreamweb/dreamgen.h2
-rw-r--r--engines/dreamweb/people.cpp35
-rw-r--r--engines/dreamweb/stubs.h2
4 files changed, 34 insertions, 45 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index bbc909baae..45972f5845 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -818,46 +818,6 @@ gotnext:
fadeScreenUpHalf();
}
-void DreamGenContext::priest() {
- STACK_CHECK;
- _cmp(es.word(bx+3), 8);
- if (flags.z())
- return /* (priestspoken) */;
- data.byte(kPointermode) = 0;
- data.word(kWatchingtime) = 2;
- checkSpeed();
- if (!flags.z())
- return /* (priestwait) */;
- _inc(es.word(bx+3));
- push(es);
- push(bx);
- priestText();
- bx = pop();
- es = pop();
-}
-
-void DreamGenContext::priestText() {
- STACK_CHECK;
- _cmp(es.word(bx+3), 2);
- if (flags.c())
- return /* (nopriesttext) */;
- _cmp(es.word(bx+3), 7);
- if (!flags.c())
- return /* (nopriesttext) */;
- al = es.byte(bx+3);
- _and(al, 1);
- if (!flags.z())
- return /* (nopriesttext) */;
- al = es.byte(bx+3);
- _shr(al, 1);
- _add(al, 50);
- bl = 72;
- bh = 80;
- cx = 54;
- dx = 1;
- setupTimedUse();
-}
-
void DreamGenContext::advisor() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 638287f8e8..f8ae7ebbc0 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -641,7 +641,6 @@ public:
void soldier1();
void getUnderCentre();
void showKeys();
- void priest();
void nextColon();
void hangOnPQ();
void findOpenPos();
@@ -708,7 +707,6 @@ public:
void initialMonCols();
void checkForShake();
void useButtonA();
- void priestText();
void execCommand();
void updateSymbolBot();
void findPuzText();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 18a2ff4478..d53786c369 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -49,7 +49,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
&DreamGenContext::introMonks1, NULL,
&DreamGenContext::introMonks2, NULL,
&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
- &DreamGenContext::priest, NULL,
+ NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
@@ -81,7 +81,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
/*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
/*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap,
/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,
- /*&DreamGenContext::priest*/NULL, &DreamGenContext::madman,
+ &DreamGenContext::priest, &DreamGenContext::madman,
&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
&DreamGenContext::foghornSound, &DreamGenContext::carParkDrip,
&DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip,
@@ -594,7 +594,6 @@ void DreamGenContext::louisChair(ReelRoutine &routine) {
}
void DreamGenContext::bossMan(ReelRoutine &routine) {
- checkSpeed();
if (checkSpeed(routine)) {
uint16 nextReelPointer = routine.reelPointer() + 1;
@@ -620,4 +619,34 @@ void DreamGenContext::bossMan(ReelRoutine &routine) {
data.byte(kTalkedtoboss) = 1;
}
+void DreamGenContext::priest(ReelRoutine &routine) {
+ if (routine.reelPointer() == 8)
+ return; // priestspoken
+
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 2;
+
+ if (checkSpeed(routine)) {
+ routine.incReelPointer();
+ push(es);
+ push(bx);
+ priestText(routine);
+ bx = pop();
+ es = pop();
+ }
+}
+
+void DreamGenContext::priestText(ReelRoutine &routine) {
+ uint16 reel = routine.reelPointer();
+ if (reel < 2 || reel >= 7 || (reel & 1))
+ return; // nopriesttext
+
+ al = ((reel & 0xFF) >> 1) + 50;
+ bl = 72;
+ bh = 80;
+ cx = 54;
+ dx = 1;
+ setupTimedUse();
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ec01fd116f..8c426162e0 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -452,6 +452,8 @@
void alleyBarkSound(ReelRoutine &routine);
void louisChair(ReelRoutine &routine);
void bossMan(ReelRoutine &routine);
+ void priest(ReelRoutine &routine);
+ void priestText(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();