From 6df11b314db7b32720d1754b8e116f7f32c7e462 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 4 Dec 2011 15:44:03 +0100 Subject: DREAMWEB: Ported 'drunk' to C++ --- devtools/tasmrecover/tasm-recover | 1 + engines/dreamweb/dreamgen.cpp | 12 ------------ engines/dreamweb/dreamgen.h | 1 - engines/dreamweb/people.cpp | 14 ++++++++++++-- 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(); -- cgit v1.2.3