aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp40
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/people.cpp27
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 27 insertions, 43 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 305704282a..8780aaa88c 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -656,6 +656,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'slabdoorf',
'smallcandle',
'smokebloke',
+ 'soldier1',
'sortoutmap',
'soundend',
'soundonreels',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 531d882378..5ee2397d36 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -107,46 +107,6 @@ notgotgun:
addToPeopleList();
}
-void DreamGenContext::soldier1() {
- STACK_CHECK;
- _cmp(es.word(bx+3), 0);
- if (flags.z())
- goto soldierwait;
- data.word(kWatchingtime) = 10;
- _cmp(es.word(bx+3), 30);
- if (!flags.z())
- goto notaftersshot;
- _inc(data.byte(kCombatcount));
- _cmp(data.byte(kCombatcount), 40);
- if (!flags.z())
- goto gotsoldframe;
- data.byte(kMandead) = 2;
- goto gotsoldframe;
-notaftersshot:
- checkSpeed();
- if (!flags.z())
- goto gotsoldframe;
- _inc(es.word(bx+3));
- goto gotsoldframe;
-soldierwait:
- _cmp(data.byte(kLastweapon), 1);
- if (!flags.z())
- goto gotsoldframe;
- data.word(kWatchingtime) = 10;
- _cmp(data.byte(kManspath), 2);
- if (!flags.z())
- goto gotsoldframe;
- _cmp(data.byte(kFacing), 4);
- if (!flags.z())
- goto gotsoldframe;
- _inc(es.word(bx+3));
- data.byte(kLastweapon) = -1;
- data.byte(kCombatcount) = 0;
-gotsoldframe:
- showGameReel();
- addToPeopleList();
-}
-
void DreamGenContext::helicopter() {
STACK_CHECK;
ax = es.word(bx+3);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7147330edc..775cfdecbd 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -606,7 +606,6 @@ public:
void purgeALocation();
void notHeldError();
void getSetAd();
- void soldier1();
void getUnderCentre();
void showKeys();
void printmessage2();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 6b78178229..889a430a22 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,
- NULL, &DreamGenContext::soldier1,
+ NULL, NULL,
NULL, 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, /*&DreamGenContext::soldier1*/NULL,
+ &DreamGenContext::louisChair, &DreamGenContext::soldier1,
&DreamGenContext::bossMan, &DreamGenContext::interviewer,
/*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
&DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker,
@@ -763,4 +763,27 @@ void DreamGenContext::introMonks2(ReelRoutine &routine) {
showGameReel(&routine);
}
+void DreamGenContext::soldier1(ReelRoutine &routine) {
+ if (routine.reelPointer() != 0) {
+ data.word(kWatchingtime) = 10;
+ if (routine.reelPointer() == 30) {
+ data.byte(kCombatcount)++;
+ if (data.byte(kCombatcount) == 40)
+ data.byte(kMandead) = 2;
+ } else if (checkSpeed(routine)) {
+ // Not after shot
+ routine.incReelPointer();
+ }
+ } else if (data.byte(kLastweapon) == 1) {
+ data.word(kWatchingtime) = 10;
+ if (data.byte(kManspath) == 2 && data.byte(kFacing) == 4)
+ routine.incReelPointer();
+ data.byte(kLastweapon) = 0xFF;
+ data.byte(kCombatcount) = 0;
+ }
+
+ showGameReel(&routine);
+ addToPeopleList(&routine);
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index c66e705220..e093c2ee91 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -421,6 +421,7 @@
void copper(ReelRoutine &routine);
void introMonks1(ReelRoutine &routine);
void introMonks2(ReelRoutine &routine);
+ void soldier1(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();