[Scummvm-cvs-logs] scummvm master -> a155ec59b4dd47c127b55a7a672bb00baa4e5661

bluegr md5 at scummvm.org
Wed Dec 7 20:03:19 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

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


Commit: a155ec59b4dd47c127b55a7a672bb00baa4e5661
    https://github.com/scummvm/scummvm/commit/a155ec59b4dd47c127b55a7a672bb00baa4e5661
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-07T11:01:53-08:00

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

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/people.cpp
    engines/dreamweb/stubs.h



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f14cf0b..1c5c957 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 a9fcf43..c780cd5 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 595a088..f543846 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 288cbeb..0c83b7b 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 c7a2767..984b069 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);






More information about the Scummvm-git-logs mailing list