aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp50
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/people.cpp31
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 31 insertions, 53 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 5cc7ca9580..0388555888 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -168,6 +168,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'blank',
'blockget',
'blocknametext',
+ 'bossman',
'bothchannels',
'bresenhams',
'buttoneight',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index fe00db19a5..bbc909baae 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -523,56 +523,6 @@ gotheavyframe:
addToPeopleList();
}
-void DreamGenContext::bossMan() {
- STACK_CHECK;
- checkSpeed();
- if (!flags.z())
- goto notboss;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 4);
- if (flags.z())
- goto firstdes;
- _cmp(ax, 20);
- if (flags.z())
- goto secdes;
- _cmp(ax, 41);
- if (!flags.z())
- goto gotallboss;
- ax = 0;
- _inc(data.byte(kGunpassflag));
- es.byte(bx+7) = 10;
- goto gotallboss;
-firstdes:
- _cmp(data.byte(kGunpassflag), 1);
- if (flags.z())
- goto gotallboss;
- push(ax);
- randomNumber();
- cl = al;
- ax = pop();
- _cmp(cl, 10);
- if (flags.c())
- goto gotallboss;
- ax = 0;
- goto gotallboss;
-secdes:
- _cmp(data.byte(kGunpassflag), 1);
- if (flags.z())
- goto gotallboss;
- ax = 0;
-gotallboss:
- es.word(bx+3) = ax;
-notboss:
- showGameReel();
- addToPeopleList();
- al = es.byte(bx+7);
- _and(al, 128);
- if (flags.z())
- return /* (nottalkedboss) */;
- data.byte(kTalkedtoboss) = 1;
-}
-
void DreamGenContext::introMonks1() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f5f6800312..638287f8e8 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -647,7 +647,6 @@ public:
void findOpenPos();
void describeOb();
void deleteExFrame();
- void bossMan();
void searchForSame();
void fadeFromWhite();
void rollEm();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 7479c4c184..18a2ff4478 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -32,7 +32,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
&DreamGenContext::receptionist, NULL,
NULL, NULL,
NULL, &DreamGenContext::soldier1,
- &DreamGenContext::bossMan, NULL,
+ NULL, NULL,
&DreamGenContext::heavy, NULL,
NULL, NULL,
&DreamGenContext::bartender, NULL,
@@ -64,7 +64,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
/*&DreamGenContext::receptionist*/NULL, &DreamGenContext::genericPerson /*maleFan*/,
&DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis,
&DreamGenContext::louisChair, /*&DreamGenContext::soldier1*/NULL,
- /*&DreamGenContext::bossMan*/NULL, &DreamGenContext::interviewer,
+ &DreamGenContext::bossMan, &DreamGenContext::interviewer,
/*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
&DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker,
/*&DreamGenContext::bartender*/NULL, &DreamGenContext::genericPerson /*otherSmoker*/,
@@ -593,4 +593,31 @@ void DreamGenContext::louisChair(ReelRoutine &routine) {
addToPeopleList(&routine);
}
+void DreamGenContext::bossMan(ReelRoutine &routine) {
+ checkSpeed();
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+
+ if (nextReelPointer == 4) {
+ if (data.byte(kGunpassflag) != 1 && engine->randomNumber() >= 10)
+ nextReelPointer = 0;
+ } else if (nextReelPointer == 20) {
+ if (data.byte(kGunpassflag) != 1)
+ nextReelPointer = 0;
+ } else if (nextReelPointer == 41) {
+ nextReelPointer = 0;
+ data.byte(kGunpassflag)++;
+ routine.b7 = 10;
+ }
+
+ routine.setReelPointer(nextReelPointer);
+ }
+
+ showGameReel(&routine);
+ addToPeopleList(&routine);
+
+ if (routine.b7 & 128)
+ data.byte(kTalkedtoboss) = 1;
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f374c87f0d..ec01fd116f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -451,6 +451,7 @@
void drinker(ReelRoutine &routine);
void alleyBarkSound(ReelRoutine &routine);
void louisChair(ReelRoutine &routine);
+ void bossMan(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();