[Scummvm-cvs-logs] scummvm master -> d4124e116ac8a9aaf52dcfe727cd600e27555154
bluegr
md5 at scummvm.org
Wed Dec 14 00:53:00 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d4124e116a DREAMWEB: Port 'heavy' to C++
Commit: d4124e116ac8a9aaf52dcfe727cd600e27555154
https://github.com/scummvm/scummvm/commit/d4124e116ac8a9aaf52dcfe727cd600e27555154
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-13T15:52:13-08:00
Commit Message:
DREAMWEB: Port 'heavy' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/people.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index cd8d46a..a4397a0 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -454,6 +454,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'hangonp',
'hangonpq',
'hangonw',
+ 'heavy',
'hotelbell',
'hotelcontrol',
'initialinv',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e2b5530..1593ae7 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -360,48 +360,6 @@ combatover2:
data.byte(kMandead) = 2;
}
-void DreamGenContext::heavy() {
- STACK_CHECK;
- al = es.byte(bx+7);
- _and(al, 127);
- es.byte(bx+7) = al;
- _cmp(es.word(bx+3), 43);
- if (flags.z())
- goto heavywait;
- data.word(kWatchingtime) = 10;
- _cmp(es.word(bx+3), 70);
- if (!flags.z())
- goto notafterhshot;
- _inc(data.byte(kCombatcount));
- _cmp(data.byte(kCombatcount), 80);
- if (!flags.z())
- goto gotheavyframe;
- data.byte(kMandead) = 2;
- goto gotheavyframe;
-notafterhshot:
- checkSpeed();
- if (!flags.z())
- goto gotheavyframe;
- _inc(es.word(bx+3));
- goto gotheavyframe;
-heavywait:
- _cmp(data.byte(kLastweapon), 1);
- if (!flags.z())
- goto gotheavyframe;
- _cmp(data.byte(kManspath), 5);
- if (!flags.z())
- goto gotheavyframe;
- _cmp(data.byte(kFacing), 4);
- if (!flags.z())
- goto gotheavyframe;
- data.byte(kLastweapon) = -1;
- _inc(es.word(bx+3));
- data.byte(kCombatcount) = 0;
-gotheavyframe:
- showGameReel();
- addToPeopleList();
-}
-
void DreamGenContext::endGameSeq() {
STACK_CHECK;
checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 48b40fe..bde9149 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -513,7 +513,6 @@ public:
void deleteExText();
void getFreeAd();
void removeObFromInv();
- void heavy();
void dirFile();
void pickupConts();
void nextColon();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 99e382f..99a83f4 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -33,7 +33,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
NULL, NULL,
NULL, NULL,
- &DreamGenContext::heavy, NULL,
+ NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
@@ -65,7 +65,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis,
&DreamGenContext::louisChair, &DreamGenContext::soldier1,
&DreamGenContext::bossMan, &DreamGenContext::interviewer,
- /*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
+ &DreamGenContext::heavy, &DreamGenContext::manAsleep /*manAsleep2*/,
&DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker,
&DreamGenContext::bartender, &DreamGenContext::genericPerson /*otherSmoker*/,
&DreamGenContext::genericPerson /*tattooMan*/, &DreamGenContext::attendant,
@@ -835,4 +835,28 @@ void DreamGenContext::bartender(ReelRoutine &routine) {
addToPeopleList(&routine);
}
+void DreamGenContext::heavy(ReelRoutine &routine) {
+ routine.b7 &= 127;
+ if (routine.reelPointer() != 43) {
+ data.word(kWatchingtime) = 10;
+ if (routine.reelPointer() == 70) {
+ // After shot
+ data.byte(kCombatcount)++;
+ if (data.byte(kCombatcount) == 80)
+ data.byte(kMandead) = 2;
+ } else {
+ if (checkSpeed(routine))
+ routine.incReelPointer();
+ }
+ } else if (data.byte(kLastweapon) == 1 && data.byte(kManspath) == 5 && data.byte(kFacing) == 4) {
+ // Heavy wait
+ data.byte(kLastweapon) = (byte)-1;
+ routine.incReelPointer();
+ 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 50a8faa..f7d8086 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -419,6 +419,7 @@
void soldier1(ReelRoutine &routine);
void receptionist(ReelRoutine &routine);
void bartender(ReelRoutine &routine);
+ void heavy(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();
More information about the Scummvm-git-logs
mailing list