diff options
author | Bertrand Augereau | 2011-12-04 15:44:03 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-04 15:44:03 +0100 |
commit | 6df11b314db7b32720d1754b8e116f7f32c7e462 (patch) | |
tree | 6903d9989c4bf00b131c8dfd0433fb5f06f3159b | |
parent | 112921a19fb8efe0725094301e69a5f80a66e9b4 (diff) | |
download | scummvm-rg350-6df11b314db7b32720d1754b8e116f7f32c7e462.tar.gz scummvm-rg350-6df11b314db7b32720d1754b8e116f7f32c7e462.tar.bz2 scummvm-rg350-6df11b314db7b32720d1754b8e116f7f32c7e462.zip |
DREAMWEB: Ported 'drunk' to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 12 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 14 insertions, 15 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index e84c199e83..3622ba603b 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -196,6 +196,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'doshake', 'drawflags', 'drawfloor', + 'drunk', 'dumpblink', 'dumpeverything', 'dumpmap', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 7a7b34a4f7..39c5d0fddf 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -1527,18 +1527,6 @@ void DreamGenContext::priestText() { setupTimedUse(); } -void DreamGenContext::drunk() { - STACK_CHECK; - _cmp(data.byte(kGeneraldead), 0); - if (!flags.z()) - return /* (trampgone) */; - al = es.byte(bx+7); - _and(al, 127); - es.byte(bx+7) = al; - showGameReel(); - addToPeopleList(); -} - void DreamGenContext::advisor() { STACK_CHECK; checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index e570bae775..1264eb82e2 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -850,7 +850,6 @@ public: void findPathOfPoint(); void isSetObOnMap(); void getDestInfo(); - void drunk(); void setupTimedUse(); void grafittiDoor(); void nextDest(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 5aef251b5c..4ab30c63f1 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -28,7 +28,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, NULL, NULL, &DreamGenContext::edenInBath, NULL, NULL, - NULL, &DreamGenContext::drunk, + NULL, NULL, &DreamGenContext::receptionist, NULL, NULL, &DreamGenContext::louis, &DreamGenContext::louisChair, &DreamGenContext::soldier1, @@ -60,7 +60,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::gamer, &DreamGenContext::sparkyDrip, &DreamGenContext::eden, /*&DreamGenContext::edenInBath*/NULL, &DreamGenContext::sparky, &DreamGenContext::smokeBloke, - &DreamGenContext::manAsleep, /*&DreamGenContext::drunk*/NULL, + &DreamGenContext::manAsleep, &DreamGenContext::drunk, /*&DreamGenContext::receptionist*/NULL, &DreamGenContext::maleFan, &DreamGenContext::femaleFan, /*&DreamGenContext::louis*/NULL, /*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL, @@ -354,5 +354,15 @@ void DreamGenContext::manAsleep(ReelRoutine &routine) { addToPeopleList(&routine); } + +void DreamGenContext::drunk(ReelRoutine &routine) { + _cmp(data.byte(kGeneraldead), 0); + if (data.byte(kGeneraldead)) + return; + routine.b7 &= 127; + showGameReel(&routine); + addToPeopleList(&routine); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 94339b999a..cc168d4930 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -399,6 +399,7 @@ void madmansTelly(ReelRoutine &routine); void smokeBloke(ReelRoutine &routine); void manAsleep(ReelRoutine &routine); + void drunk(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void showKeypad(); void showOuterPad(); |