diff options
author | Bertrand Augereau | 2011-12-06 00:54:50 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-06 01:02:04 +0100 |
commit | 3b5794890fb36d0d93e8eff7d1a30c9bfd611618 (patch) | |
tree | 2fc0b6b1a6df64103cd93a94ab633bb9aebda935 /engines/dreamweb | |
parent | 4f9e3dcb79b462c5e05f510d82030e537efe1356 (diff) | |
download | scummvm-rg350-3b5794890fb36d0d93e8eff7d1a30c9bfd611618.tar.gz scummvm-rg350-3b5794890fb36d0d93e8eff7d1a30c9bfd611618.tar.bz2 scummvm-rg350-3b5794890fb36d0d93e8eff7d1a30c9bfd611618.zip |
DREAMWEB: Ported 'candles' to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 17 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 5 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 15 insertions, 22 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index c099e82b85..fca8abc615 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -785,23 +785,6 @@ smallcandlef: showGameReel(); } -void DreamGenContext::candles() { - STACK_CHECK; - checkSpeed(); - if (!flags.z()) - goto candlesfin; - ax = es.word(bx+3); - _inc(ax); - _cmp(ax, 167); - if (!flags.z()) - goto gotcandles; - ax = 162; -gotcandles: - es.word(bx+3) = ax; -candlesfin: - showGameReel(); -} - void DreamGenContext::candles2() { STACK_CHECK; checkSpeed(); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index f30c8e6d3a..39af176d38 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -541,6 +541,7 @@ public: void useWire(); void getNamePos(); + void clearChanges(); void identifyOb(); void useLighter(); void runEndSeq(); @@ -609,14 +610,12 @@ public: void findFirstPath(); void useSLab(); void useAltar(); - void manAsleep2(); void moreTalk(); void startTalk(); void getAnyAd(); void endGame(); void usePipe(); void getUnderZoom(); - void candles(); void rollEndCredits2(); void reminders(); void selectSlot2(); @@ -827,7 +826,7 @@ public: void incRyanPage(); void edenInBath(); void findExObject(); - void clearChanges(); + void manAsleep2(); void useChurchHole(); void searchForFiles(); void monkSpeaking(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index b1f509d3c8..e69fd66ee4 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -46,7 +46,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, NULL, &DreamGenContext::introMagic2, &DreamGenContext::candles2, &DreamGenContext::gates, &DreamGenContext::introMagic3, - &DreamGenContext::introMonks1, &DreamGenContext::candles, + &DreamGenContext::introMonks1, NULL, &DreamGenContext::introMonks2, &DreamGenContext::handClap, &DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq, &DreamGenContext::priest, NULL, @@ -78,7 +78,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::introMagic1, &DreamGenContext::introMusic, /*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL, /*&DreamGenContext::gates*/NULL, /*&DreamGenContext::introMagic3*/NULL, - /*&DreamGenContext::intromonks1*/NULL, /*&DreamGenContext::candles*/NULL, + /*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles, /*&DreamGenContext::intromonks2*/NULL, /*&DreamGenContext::handClap*/NULL, /*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL, /*&DreamGenContext::priest*/NULL, &DreamGenContext::madman, @@ -378,6 +378,16 @@ void DreamGenContext::introMagic1(ReelRoutine &routine) { void DreamGenContext::introMusic(ReelRoutine &routine) { } +void DreamGenContext::candles(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 167) + nextReelPointer = 162; + routine.setReelPointer(nextReelPointer); + } + 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 ac2fd401a2..b9f2fed85d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -412,6 +412,7 @@ void drunk(ReelRoutine &routine); void introMagic1(ReelRoutine &routine); void introMusic(ReelRoutine &routine); + void candles(ReelRoutine &routine); void security(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void loadSaveBox(); |