aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp33
-rw-r--r--engines/dreamweb/dreamgen.h2
-rw-r--r--engines/dreamweb/people.cpp31
-rw-r--r--engines/dreamweb/stubs.h2
4 files changed, 29 insertions, 39 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 8b755d60e7..b54dc63858 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -93,17 +93,6 @@ gotrecep:
data.byte(kTalkedtorecep) = 1;
}
-void DreamGenContext::attendant() {
- STACK_CHECK;
- showGameReel();
- addToPeopleList();
- al = es.byte(bx+7);
- _and(al, 128);
- if (flags.z())
- return /* (nottalked) */;
- data.byte(kTalkedtoattendant) = 1;
-}
-
void DreamGenContext::louisChair() {
STACK_CHECK;
_cmp(data.byte(kRockstardead), 0);
@@ -680,28 +669,6 @@ notboss:
data.byte(kTalkedtoboss) = 1;
}
-void DreamGenContext::keeper() {
- STACK_CHECK;
- _cmp(data.byte(kKeeperflag), 0);
- if (!flags.z())
- goto notwaiting;
- _cmp(data.word(kReeltowatch), 190);
- if (flags.c())
- return /* (waiting) */;
- _inc(data.byte(kKeeperflag));
- ah = es.byte(bx+7);
- _and(ah, 127);
- _cmp(ah, data.byte(kDreamnumber));
- if (flags.z())
- return /* (notdiff) */;
- al = data.byte(kDreamnumber);
- es.byte(bx+7) = al;
- return;
-notwaiting:
- addToPeopleList();
- showGameReel();
-}
-
void DreamGenContext::candles1() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f9170021ce..9b5a798782 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -620,7 +620,6 @@ public:
void runIntroSeq();
void advisor();
void allPalette();
- void attendant();
void cantDrop();
void copper();
void drinker();
@@ -735,7 +734,6 @@ public:
void monkSpeaking();
void clearRest();
void madmanRun();
- void keeper();
void afterNewRoom();
void getExAd();
void closeFile();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index fcb257cfad..41b4fa3191 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -36,8 +36,8 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
&DreamGenContext::heavy, NULL,
NULL, &DreamGenContext::drinker,
&DreamGenContext::bartender, NULL,
- NULL, &DreamGenContext::attendant,
- &DreamGenContext::keeper, &DreamGenContext::candles1,
+ NULL, NULL,
+ NULL, &DreamGenContext::candles1,
&DreamGenContext::smallCandle, NULL,
&DreamGenContext::copper, &DreamGenContext::poolGuard,
NULL, &DreamGenContext::businessMan,
@@ -68,8 +68,8 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
/*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
&DreamGenContext::genericPerson /*manSatStill*/, /*&DreamGenContext::drinker*/NULL,
/*&DreamGenContext::bartender*/NULL, &DreamGenContext::genericPerson /*otherSmoker*/,
- &DreamGenContext::genericPerson /*tattooMan*/, /*&DreamGenContext::attendant*/NULL,
- /*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL,
+ &DreamGenContext::genericPerson /*tattooMan*/, &DreamGenContext::attendant,
+ &DreamGenContext::keeper, /*&DreamGenContext::candles1*/NULL,
/*&DreamGenContext::smallcandle*/NULL, &DreamGenContext::security,
/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL,
&DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL,
@@ -344,6 +344,29 @@ void DreamGenContext::manAsleep(ReelRoutine &routine) {
addToPeopleList(&routine);
}
+void DreamGenContext::attendant(ReelRoutine &routine) {
+ showGameReel(&routine);
+ addToPeopleList(&routine);
+ if (routine.b7 & 128)
+ data.byte(kTalkedtoattendant) = 1;
+}
+
+void DreamGenContext::keeper(ReelRoutine &routine) {
+ if (data.byte(kKeeperflag) != 0) {
+ // Not waiting
+ addToPeopleList(&routine);
+ showGameReel(&routine);
+ return;
+ }
+
+ if (data.word(kReeltowatch) < 190)
+ return; // waiting
+
+ data.byte(kKeeperflag)++;
+
+ if (routine.b7 & 127 != data.byte(kDreamnumber))
+ routine.b7 = data.byte(kDreamnumber);
+}
void DreamGenContext::drunk(ReelRoutine &routine) {
if (data.byte(kGeneraldead))
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 8dc7e60c67..7b5e33e34a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -456,6 +456,8 @@
void carParkDrip(ReelRoutine &routine);
void foghornSound(ReelRoutine &routine);
void train(ReelRoutine &routine);
+ void attendant(ReelRoutine &routine);
+ void keeper(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();