diff options
| author | Filippos Karapetis | 2011-12-14 01:52:13 +0200 |
|---|---|---|
| committer | Filippos Karapetis | 2011-12-14 01:52:13 +0200 |
| commit | d4124e116ac8a9aaf52dcfe727cd600e27555154 (patch) | |
| tree | 0a64000f6570618ed5c4df32752deca68bbf3150 | |
| parent | c95bdeb20ca16927fbac990c9633cb0db9e1fc3e (diff) | |
| download | scummvm-rg350-d4124e116ac8a9aaf52dcfe727cd600e27555154.tar.gz scummvm-rg350-d4124e116ac8a9aaf52dcfe727cd600e27555154.tar.bz2 scummvm-rg350-d4124e116ac8a9aaf52dcfe727cd600e27555154.zip | |
DREAMWEB: Port 'heavy' to C++
| -rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.cpp | 42 | ||||
| -rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
| -rw-r--r-- | engines/dreamweb/people.cpp | 28 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 28 insertions, 45 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index cd8d46af4d..a4397a0f2d 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 e2b5530b2e..1593ae78d3 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 48b40feb37..bde91490af 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 99e382f325..99a83f44d3 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 50a8faaf34..f7d8086a64 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(); |
