diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 59 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 45 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 45 insertions, 62 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index cba8aa9ec7..fdff5a1079 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -384,6 +384,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'intromagic2', 'intromagic3', 'intromonks1', + 'intromonks2', 'intromusic', 'inventory', 'isitdescribed', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 3a9fb57541..a1d0799565 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -523,65 +523,6 @@ gotheavyframe: addToPeopleList(); } -void DreamGenContext::introMonks2() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto intromonk2fin; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 87); - if (!flags.z()) - goto nottalk1; - _inc(data.byte(kIntrocount)); - push(es); - push(bx); - monks2text(); - bx = pop(); - es = pop(); - _cmp(data.byte(kIntrocount), 19); - if (!flags.z()) - goto notlasttalk1; - ax = 87; - goto gotintromonk2; -notlasttalk1: - ax = 74; - goto gotintromonk2; -nottalk1: - _cmp(ax, 110); - if (!flags.z()) - goto notraisearm; - _inc(data.byte(kIntrocount)); - push(es); - push(bx); - monks2text(); - bx = pop(); - es = pop(); - _cmp(data.byte(kIntrocount), 35); - if (!flags.z()) - goto notlastraise; - ax = 111; - goto gotintromonk2; -notlastraise: - ax = 98; - goto gotintromonk2; -notraisearm: - _cmp(ax, 176); - if (!flags.z()) - goto notendmonk2; - data.byte(kGetback) = 1; - goto gotintromonk2; -notendmonk2: - _cmp(ax, 125); - if (!flags.z()) - goto gotintromonk2; - ax = 140; -gotintromonk2: - es.word(bx+3) = ax; -intromonk2fin: - showGameReel(); -} - void DreamGenContext::endGameSeq() { STACK_CHECK; checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 0fb155b6a5..674b952f1f 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -558,7 +558,6 @@ public: void moneyPoke(); void doSomeTalk(); void resetLocation(); - void introMonks2(); void greyscaleSum(); void getOpenedSize(); void adjustUp(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index d87a5e3084..6b78178229 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -47,7 +47,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, NULL, NULL, NULL, NULL, NULL, - &DreamGenContext::introMonks2, NULL, + NULL, NULL, NULL, &DreamGenContext::endGameSeq, NULL, NULL, NULL, NULL, @@ -79,7 +79,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::introMagic2, &DreamGenContext::candles2, &DreamGenContext::gates, &DreamGenContext::introMagic3, &DreamGenContext::introMonks1, &DreamGenContext::candles, - /*&DreamGenContext::introMonks2*/NULL, &DreamGenContext::handClap, + &DreamGenContext::introMonks2, &DreamGenContext::handClap, &DreamGenContext::monkAndRyan, /*&DreamGenContext::endGameSeq*/NULL, &DreamGenContext::priest, &DreamGenContext::madman, &DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound, @@ -722,4 +722,45 @@ void DreamGenContext::introMonks1(ReelRoutine &routine) { routine.mapY = data.byte(kMapy); } +void DreamGenContext::introMonks2(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 87) { + data.byte(kIntrocount)++; + push(es); + push(bx); + monks2text(); + bx = pop(); + es = pop(); + + if (data.byte(kIntrocount), 19) + nextReelPointer = 87; + else + nextReelPointer = 74; + } + + if (nextReelPointer == 110) { + data.byte(kIntrocount)++; + push(es); + push(bx); + monks2text(); + bx = pop(); + es = pop(); + + if (data.byte(kIntrocount) == 35) + nextReelPointer = 111; + else + nextReelPointer = 98; + } else if (nextReelPointer == 176) { + data.byte(kGetback) = 1; + } else if (nextReelPointer == 125) { + nextReelPointer = 140; + } + + routine.setReelPointer(nextReelPointer); + } + + showGameReel(&routine); +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 27268bb970..702a6359de 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -425,6 +425,7 @@ void monkAndRyan(ReelRoutine &routine); void copper(ReelRoutine &routine); void introMonks1(ReelRoutine &routine); + void introMonks2(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void loadSaveBox(); void loadKeypad(); |