diff options
author | Filippos Karapetis | 2011-12-07 21:01:53 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-07 21:01:53 +0200 |
commit | a155ec59b4dd47c127b55a7a672bb00baa4e5661 (patch) | |
tree | 9611a72708a8a7a34477f4bb94a72840bdadc5b4 | |
parent | f7cd6781d865b038263f5ce7e452694a19d77e81 (diff) | |
download | scummvm-rg350-a155ec59b4dd47c127b55a7a672bb00baa4e5661.tar.gz scummvm-rg350-a155ec59b4dd47c127b55a7a672bb00baa4e5661.tar.bz2 scummvm-rg350-a155ec59b4dd47c127b55a7a672bb00baa4e5661.zip |
DREAMWEB: 'candles1', 'candles2', 'smallcandle' converted to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 3 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 51 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 42 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 3 |
5 files changed, 42 insertions, 60 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index f14cf0b52b..1c5c957da8 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -188,6 +188,8 @@ generator = cpp(context, "DreamGen", blacklist = [ 'cancelch0', 'cancelch1', 'candles', + 'candles1', + 'candles2', 'carparkdrip', 'channel0only', 'channel0tran', @@ -586,6 +588,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'slabdoord', 'slabdoore', 'slabdoorf', + 'smallcandle', 'smokebloke', 'sortoutmap', 'soundend', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index a9fcf43749..c780cd53ba 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -669,57 +669,6 @@ notboss: data.byte(kTalkedtoboss) = 1; } -void DreamGenContext::candles1() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto candle1; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 44); - if (!flags.z()) - goto notendcandle1; - ax = 39; -notendcandle1: - es.word(bx+3) = ax; -candle1: - showGameReel(); -} - -void DreamGenContext::smallCandle() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto smallcandlef; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 37); - if (!flags.z()) - goto notendsmallcandle; - ax = 25; -notendsmallcandle: - es.word(bx+3) = ax; -smallcandlef: - showGameReel(); -} - -void DreamGenContext::candles2() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto candles2fin; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 238); - if (!flags.z()) - goto gotcandles2; - ax = 233; -gotcandles2: - es.word(bx+3) = ax; -candles2fin: - showGameReel(); -} - void DreamGenContext::introMonks1() { STACK_CHECK; checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 595a0884eb..f543846d16 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -686,8 +686,6 @@ public: void openOb(); void drawItAll(); void useStereo(); - void candles2(); - void candles1(); void showOpBox(); void doFade(); void dumpCurrent(); @@ -701,7 +699,6 @@ public: void louisChair(); void locationPic(); void triggerMessage(); - void smallCandle(); void swapWithOpen(); void dreamweb(); void dropError(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 288cbeb771..0c83b7b3eb 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -37,14 +37,14 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, &DreamGenContext::drinker, &DreamGenContext::bartender, NULL, NULL, NULL, - NULL, &DreamGenContext::candles1, - &DreamGenContext::smallCandle, NULL, + NULL, NULL, + NULL, NULL, &DreamGenContext::copper, &DreamGenContext::poolGuard, NULL, &DreamGenContext::businessMan, NULL, NULL, &DreamGenContext::mugger, &DreamGenContext::helicopter, NULL, NULL, - NULL, &DreamGenContext::candles2, + NULL, NULL, NULL, NULL, &DreamGenContext::introMonks1, NULL, &DreamGenContext::introMonks2, NULL, @@ -69,14 +69,14 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::genericPerson /*manSatStill*/, /*&DreamGenContext::drinker*/NULL, /*&DreamGenContext::bartender*/NULL, &DreamGenContext::genericPerson /*otherSmoker*/, &DreamGenContext::genericPerson /*tattooMan*/, &DreamGenContext::attendant, - &DreamGenContext::keeper, /*&DreamGenContext::candles1*/NULL, - /*&DreamGenContext::smallcandle*/NULL, &DreamGenContext::security, + &DreamGenContext::keeper, &DreamGenContext::candles1, + &DreamGenContext::smallCandle, &DreamGenContext::security, /*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL, &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, &DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/, /*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL, &DreamGenContext::introMagic1, &DreamGenContext::introMusic, - &DreamGenContext::introMagic2, /*&DreamGenContext::candles2*/NULL, + &DreamGenContext::introMagic2, &DreamGenContext::candles2, &DreamGenContext::gates, &DreamGenContext::introMagic3, /*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles, /*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap, @@ -419,6 +419,36 @@ void DreamGenContext::introMagic3(ReelRoutine &routine) { routine.mapX = data.byte(kMapx); } +void DreamGenContext::candles1(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 44) + nextReelPointer = 39; + routine.setReelPointer(nextReelPointer); + } + showGameReel(&routine); +} + +void DreamGenContext::candles2(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 238) + nextReelPointer = 233; + routine.setReelPointer(nextReelPointer); + } + showGameReel(&routine); +} + +void DreamGenContext::smallCandle(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 37) + nextReelPointer = 25; + routine.setReelPointer(nextReelPointer); + } + showGameReel(&routine); +} + void DreamGenContext::introMusic(ReelRoutine &routine) { } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index c7a276770f..984b069d40 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -434,6 +434,9 @@ void introMagic3(ReelRoutine &routine); void introMusic(ReelRoutine &routine); void candles(ReelRoutine &routine); + void candles1(ReelRoutine &routine); + void candles2(ReelRoutine &routine); + void smallCandle(ReelRoutine &routine); void gates(ReelRoutine &routine); void security(ReelRoutine &routine); void edenInBath(ReelRoutine &routine); |