diff options
author | Bertrand Augereau | 2011-12-06 01:38:40 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-06 02:02:10 +0100 |
commit | bc50c9e45704ab9d664123fc8f4b04c5dbb848f7 (patch) | |
tree | ad03398e6cdbace22ee43cc4ed8842431b5a1efd /engines/dreamweb | |
parent | 2362a3f689a3a87b342339e274a2f29e5125ddf2 (diff) | |
download | scummvm-rg350-bc50c9e45704ab9d664123fc8f4b04c5dbb848f7.tar.gz scummvm-rg350-bc50c9e45704ab9d664123fc8f4b04c5dbb848f7.tar.bz2 scummvm-rg350-bc50c9e45704ab9d664123fc8f4b04c5dbb848f7.zip |
DREAMWEB: Ported 'gates' to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 40 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 25 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 24 insertions, 43 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index e08e54532e..c6a0950379 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -781,46 +781,6 @@ candles2fin: showGameReel(); } -void DreamGenContext::gates() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto gatesfin; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 116); - if (!flags.z()) - goto notbang; - push(ax); - push(bx); - push(es); - al = 17; - playChannel1(); - es = pop(); - bx = pop(); - ax = pop(); -notbang: - _cmp(ax, 110); - if (flags.c()) - goto slowgates; - es.byte(bx+5) = 2; -slowgates: - _cmp(ax, 120); - if (!flags.z()) - goto gotgates; - data.byte(kGetback) = 1; - ax = 119; -gotgates: - es.word(bx+3) = ax; - push(es); - push(bx); - intro3Text(); - bx = pop(); - es = pop(); -gatesfin: - showGameReel(); -} - void DreamGenContext::introMagic2() { STACK_CHECK; checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index d8cbbefa29..fd294f6be4 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -791,7 +791,6 @@ public: void dropError(); void callEdensDLift(); void checkInside(); - void gates(); void newGame(); void setWalk(); void findPathOfPoint(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 1d0e77f6f0..c0b0b7a42c 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -45,7 +45,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::mugger, &DreamGenContext::helicopter, NULL, NULL, &DreamGenContext::introMagic2, &DreamGenContext::candles2, - &DreamGenContext::gates, &DreamGenContext::introMagic3, + NULL, &DreamGenContext::introMagic3, &DreamGenContext::introMonks1, NULL, &DreamGenContext::introMonks2, &DreamGenContext::handClap, &DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq, @@ -77,7 +77,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL, &DreamGenContext::introMagic1, &DreamGenContext::introMusic, /*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL, - /*&DreamGenContext::gates*/NULL, /*&DreamGenContext::introMagic3*/NULL, + &DreamGenContext::gates, /*&DreamGenContext::introMagic3*/NULL, /*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles, /*&DreamGenContext::intromonks2*/NULL, /*&DreamGenContext::handClap*/NULL, /*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL, @@ -388,6 +388,27 @@ void DreamGenContext::candles(ReelRoutine &routine) { showGameReel(&routine); } +void DreamGenContext::gates(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 116) + playChannel1(17); + if (nextReelPointer >= 110) + routine.period = 2; + if (nextReelPointer == 120) { + data.byte(kGetback) = 1; + nextReelPointer = 119; + } + routine.setReelPointer(nextReelPointer); + push(es); + push(bx); + intro3Text(); + bx = pop(); + es = pop(); + } + showGameReel(&routine); +} + void DreamGenContext::security(ReelRoutine &routine) { if (routine.reelPointer() == 32) { if (data.byte(kLastweapon) == 1) { diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index ad5bc4d217..f20117b991 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -413,6 +413,7 @@ void introMagic1(ReelRoutine &routine); void introMusic(ReelRoutine &routine); void candles(ReelRoutine &routine); + void gates(ReelRoutine &routine); void security(ReelRoutine &routine); void edenInBath(ReelRoutine &routine); void louis(ReelRoutine &routine); |