aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp32
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/people.cpp22
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 22 insertions, 35 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 74109ab4e4..5cc7ca9580 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -416,6 +416,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'look',
'loopchannel0',
'louis',
+ 'louischair',
'madman',
'madmanstelly',
'madmantext',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 2cc69f4150..fe00db19a5 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -75,38 +75,6 @@ gotrecep:
data.byte(kTalkedtorecep) = 1;
}
-void DreamGenContext::louisChair() {
- STACK_CHECK;
- _cmp(data.byte(kRockstardead), 0);
- if (flags.z())
- return /* (notlouis2) */;
- checkSpeed();
- if (!flags.z())
- goto notlouisanim;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 191);
- if (flags.z())
- goto restartlouis;
- _cmp(ax, 185);
- if (flags.z())
- goto randomlouis;
- es.word(bx+3) = ax;
- goto notlouisanim;
-randomlouis:
- es.word(bx+3) = ax;
- randomNumber();
- _cmp(al, 245);
- if (!flags.c())
- goto notlouisanim;
-restartlouis:
- ax = 182;
- es.word(bx+3) = ax;
-notlouisanim:
- showGameReel();
- addToPeopleList();
-}
-
void DreamGenContext::bartender() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 376302ef1c..f5f6800312 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -677,7 +677,6 @@ public:
void fillOpen();
void signOn();
void showGun();
- void louisChair();
void locationPic();
void triggerMessage();
void swapWithOpen();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 31020cd6c4..d68e03693c 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -31,7 +31,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
&DreamGenContext::receptionist, NULL,
NULL, NULL,
- &DreamGenContext::louisChair, &DreamGenContext::soldier1,
+ NULL, &DreamGenContext::soldier1,
&DreamGenContext::bossMan, NULL,
&DreamGenContext::heavy, NULL,
NULL, NULL,
@@ -63,7 +63,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::manAsleep, &DreamGenContext::drunk,
/*&DreamGenContext::receptionist*/NULL, &DreamGenContext::genericPerson /*maleFan*/,
&DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis,
- /*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL,
+ &DreamGenContext::louisChair, /*&DreamGenContext::soldier1*/NULL,
/*&DreamGenContext::bossMan*/NULL, &DreamGenContext::interviewer,
/*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
&DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker,
@@ -571,4 +571,22 @@ void DreamGenContext::foghornSound(ReelRoutine &routine) {
void DreamGenContext::train(ReelRoutine &routine) {
}
+void DreamGenContext::louisChair(ReelRoutine &routine) {
+ if (data.byte(kRockstardead) == 0)
+ return; // notlouis2
+
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+ if (nextReelPointer == 191)
+ routine.setReelPointer(182); // Restart Louis
+ else if (nextReelPointer != 185)
+ routine.setReelPointer(nextReelPointer);
+ else if (engine->randomNumber() < 245)
+ routine.setReelPointer(182); // Restart Louis
+ }
+
+ showGameReel(&routine);
+ addToPeopleList(&routine);
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e6f73be04e..f374c87f0d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -450,6 +450,7 @@
void interviewer(ReelRoutine &routine);
void drinker(ReelRoutine &routine);
void alleyBarkSound(ReelRoutine &routine);
+ void louisChair(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();