diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 3 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 64 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 45 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 3 |
5 files changed, 45 insertions, 73 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index c5afae9fe5..98b7d35b57 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -151,6 +151,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'adjustlen', 'afterintroroom', 'aide', + 'alleybarksound', 'allocatebuffers', 'allocateload', 'allocatemem', @@ -254,6 +255,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'doshake', 'drawflags', 'drawfloor', + 'drinker', 'drunk', 'dumpblink', 'dumpeverything', @@ -360,6 +362,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'initrain', 'input', 'interupttest', + 'interviewer', 'intro', 'intro1text', 'intro2text', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index c780cd53ba..2cc69f4150 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -26,24 +26,6 @@ namespace DreamGen { -void DreamGenContext::alleyBarkSound() { - STACK_CHECK; - ax = es.word(bx+3); - _dec(ax); - _cmp(ax, 0); - if (!flags.z()) - goto nobark; - push(bx); - push(es); - al = 14; - playChannel1(); - es = pop(); - bx = pop(); - ax = 1000; -nobark: - es.word(bx+3) = ax; -} - void DreamGenContext::receptionist() { STACK_CHECK; checkSpeed(); @@ -125,31 +107,6 @@ notlouisanim: addToPeopleList(); } -void DreamGenContext::drinker() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto gotdrinker; - _inc(es.word(bx+3)); - _cmp(es.word(bx+3), 115); - if (!flags.z()) - goto notdrinker1; - es.word(bx+3) = 105; - goto gotdrinker; -notdrinker1: - _cmp(es.word(bx+3), 106); - if (!flags.z()) - goto gotdrinker; - randomNumber(); - _cmp(al, 3); - if (flags.c()) - goto gotdrinker; - es.word(bx+3) = 105; -gotdrinker: - showGameReel(); - addToPeopleList(); -} - void DreamGenContext::bartender() { STACK_CHECK; checkSpeed(); @@ -182,27 +139,6 @@ notgotgun: addToPeopleList(); } -void DreamGenContext::interviewer() { - STACK_CHECK; - _cmp(data.word(kReeltowatch), 68); - if (!flags.z()) - goto notgeneralstart; - _inc(es.word(bx+3)); -notgeneralstart: - _cmp(es.word(bx+3), 250); - if (flags.z()) - goto talking; - checkSpeed(); - if (!flags.z()) - goto talking; - _cmp(es.word(bx+3), 259); - if (flags.z()) - goto talking; - _inc(es.word(bx+3)); -talking: - showGameReel(); -} - void DreamGenContext::soldier1() { STACK_CHECK; _cmp(es.word(bx+3), 0); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 3b56a449c2..fd93ccd55f 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -621,14 +621,12 @@ public: void allPalette(); void cantDrop(); void copper(); - void drinker(); void placeFreeObject(); void putUnderZoom(); void vSync(); void findInvPos(); void workoutFrames(); void rollEndCredits(); - void interviewer(); void getKeyAndLogo(); void selectOb(); void useCooker(); @@ -747,7 +745,6 @@ public: void showNames(); void saveFileRead(); void emergencyPurge(); - void alleyBarkSound(); void quitKey(); void processTrigger(); void transferConToEx(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 0c83b7b3eb..31020cd6c4 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -32,9 +32,9 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::receptionist, NULL, NULL, NULL, &DreamGenContext::louisChair, &DreamGenContext::soldier1, - &DreamGenContext::bossMan, &DreamGenContext::interviewer, + &DreamGenContext::bossMan, NULL, &DreamGenContext::heavy, NULL, - NULL, &DreamGenContext::drinker, + NULL, NULL, &DreamGenContext::bartender, NULL, NULL, NULL, NULL, NULL, @@ -50,7 +50,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::introMonks2, NULL, &DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq, &DreamGenContext::priest, NULL, - NULL, &DreamGenContext::alleyBarkSound, + NULL, NULL, NULL, NULL, NULL, NULL, NULL @@ -64,9 +64,9 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::receptionist*/NULL, &DreamGenContext::genericPerson /*maleFan*/, &DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis, /*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL, - /*&DreamGenContext::bossMan*/NULL, /*&DreamGenContext::interviewer*/NULL, + /*&DreamGenContext::bossMan*/NULL, &DreamGenContext::interviewer, /*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/, - &DreamGenContext::genericPerson /*manSatStill*/, /*&DreamGenContext::drinker*/NULL, + &DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker, /*&DreamGenContext::bartender*/NULL, &DreamGenContext::genericPerson /*otherSmoker*/, &DreamGenContext::genericPerson /*tattooMan*/, &DreamGenContext::attendant, &DreamGenContext::keeper, &DreamGenContext::candles1, @@ -82,7 +82,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap, /*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL, /*&DreamGenContext::priest*/NULL, &DreamGenContext::madman, - &DreamGenContext::madmansTelly, /*&DreamGenContext::alleyBarkSound*/NULL, + &DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound, &DreamGenContext::foghornSound, &DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip @@ -376,6 +376,39 @@ void DreamGenContext::drunk(ReelRoutine &routine) { addToPeopleList(&routine); } +void DreamGenContext::interviewer(ReelRoutine &routine) { + if (data.word(kReeltowatch) == 68) + routine.incReelPointer(); + + if (routine.reelPointer() != 250 && routine.reelPointer() != 259 && checkSpeed(routine)) + routine.incReelPointer(); + + showGameReel(&routine); +} + +void DreamGenContext::drinker(ReelRoutine &routine) { + if (checkSpeed(routine)) { + routine.incReelPointer(); + + if ( routine.reelPointer() == 115 || + (routine.reelPointer() == 106 && engine->randomNumber() >= 3)) + routine.setReelPointer(105); + } + + showGameReel(&routine); + addToPeopleList(&routine); +} + +void DreamGenContext::alleyBarkSound(ReelRoutine &routine) { + uint16 prevReelPointer = routine.reelPointer() - 1; + if (prevReelPointer == 0) { + playChannel1(14); + routine.setReelPointer(1000); + } else { + routine.setReelPointer(prevReelPointer); + } +} + void DreamGenContext::introMagic1(ReelRoutine &routine) { if (checkSpeed(routine)) { uint16 nextReelPointer = routine.reelPointer() + 1; diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 984b069d40..db5232717b 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -447,6 +447,9 @@ void train(ReelRoutine &routine); void attendant(ReelRoutine &routine); void keeper(ReelRoutine &routine); + void interviewer(ReelRoutine &routine); + void drinker(ReelRoutine &routine); + void alleyBarkSound(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void loadSaveBox(); void loadKeypad(); |