From 2801eaf6fe57ceefac3989a6769e6b447a24b17b Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Sun, 4 Dec 2011 14:45:07 +0100 Subject: DREAMWEB: 'manAsleep' ported to C++ --- engines/dreamweb/dreamgen.cpp | 9 --------- engines/dreamweb/dreamgen.h | 1 - engines/dreamweb/people.cpp | 10 ++++++++-- engines/dreamweb/stubs.h | 1 + 4 files changed, 9 insertions(+), 12 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index bd861ca4e3..7a7b34a4f7 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -118,15 +118,6 @@ void DreamGenContext::attendant() { data.byte(kTalkedtoattendant) = 1; } -void DreamGenContext::manAsleep() { - STACK_CHECK; - al = es.byte(bx+7); - _and(al, 127); - es.byte(bx+7) = al; - showGameReel(); - addToPeopleList(); -} - void DreamGenContext::edenInBath() { STACK_CHECK; _cmp(data.byte(kGeneraldead), 0); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index f7aa6c6d0a..e570bae775 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -662,7 +662,6 @@ public: void openPoolBoss(); void usePlate(); void lookInInterface(); - void manAsleep(); void hotelBell(); void loadSpeech(); void adjustLeft(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index a05d892c65..956125b2c8 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, - &DreamGenContext::manAsleep, &DreamGenContext::drunk, + NULL, &DreamGenContext::drunk, &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*/NULL, /*&DreamGenContext::drunk*/NULL, + &DreamGenContext::manAsleep, /*&DreamGenContext::drunk*/NULL, /*&DreamGenContext::receptionist*/NULL, &DreamGenContext::maleFan, &DreamGenContext::femaleFan, /*&DreamGenContext::louis*/NULL, /*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL, @@ -348,5 +348,11 @@ void DreamGenContext::smokeBloke(ReelRoutine &routine) { addToPeopleList(&routine); } +void DreamGenContext::manAsleep(ReelRoutine &routine) { + routine.b7 &= 127; + showGameReel(&routine); + addToPeopleList(&routine); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 7339f937bc..e7e35e6531 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -398,6 +398,7 @@ void rockstar(ReelRoutine &routine); void madmansTelly(ReelRoutine &routine); void smokeBloke(ReelRoutine &routine); + void manAsleep(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void showKeypad(); void showOuterPad(); -- cgit v1.2.3