DREAMWEB: 'candles1', 'candles2', 'smallcandle' converted to C++

This commit is contained in:
Filippos Karapetis 2011-12-07 21:01:53 +02:00
parent f7cd6781d8
commit a155ec59b4
5 changed files with 42 additions and 60 deletions

View File

@ -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',

View File

@ -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();

View File

@ -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();

View File

@ -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) {
}

View File

@ -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);