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

bluegr md5 at scummvm.org
Wed Dec 7 19:31:46 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:
ad877e9306 DREAMWEB: 'intromagic2', 'intromagic3' ported to C++


Commit: ad877e9306d4e8f671c0b24137bbaf277316bf45
    https://github.com/scummvm/scummvm/commit/ad877e9306d4e8f671c0b24137bbaf277316bf45
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-07T10:30:17-08:00

Commit Message:
DREAMWEB: 'intromagic2', 'intromagic3' ported 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 138859c..952e014 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -360,6 +360,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'intro2text',
 	'intro3text',
 	'intromagic1',
+	'intromagic2',
+	'intromagic3',
 	'intromusic',
 	'inventory',
 	'isitdescribed',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b5094df..4299885 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -720,42 +720,6 @@ candles2fin:
 	showGameReel();
 }
 
-void DreamGenContext::introMagic2() {
-	STACK_CHECK;
-	checkSpeed();
-	if (!flags.z())
-		goto introm2fin;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 216);
-	if (!flags.z())
-		goto gotintrom2;
-	ax = 192;
-gotintrom2:
-	es.word(bx+3) = ax;
-introm2fin:
-	showGameReel();
-}
-
-void DreamGenContext::introMagic3() {
-	STACK_CHECK;
-	checkSpeed();
-	if (!flags.z())
-		goto introm3fin;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 218);
-	if (!flags.z())
-		goto gotintrom3;
-	data.byte(kGetback) = 1;
-gotintrom3:
-	es.word(bx+3) = ax;
-introm3fin:
-	showGameReel();
-	al = data.byte(kMapx);
-	es.byte(bx+1) = al;
-}
-
 void DreamGenContext::introMonks1() {
 	STACK_CHECK;
 	checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 572564c..ead391d 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -639,8 +639,6 @@ public:
 	void openFileNoCheck();
 	void fadeUpMon();
 	void clearChanges();
-	void introMagic2();
-	void introMagic3();
 	void showDiaryPage();
 	void transferToEx();
 	void reExFromInv();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index d1814ce..288cbeb 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -44,8 +44,8 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	NULL, NULL,
 	&DreamGenContext::mugger, &DreamGenContext::helicopter,
 	NULL, NULL,
-	&DreamGenContext::introMagic2, &DreamGenContext::candles2,
-	NULL, &DreamGenContext::introMagic3,
+	NULL, &DreamGenContext::candles2,
+	NULL, NULL,
 	&DreamGenContext::introMonks1, NULL,
 	&DreamGenContext::introMonks2, NULL,
 	&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
@@ -76,8 +76,8 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	&DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/,
 	/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL,
 	&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
-	/*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL,
-	&DreamGenContext::gates, /*&DreamGenContext::introMagic3*/NULL,
+	&DreamGenContext::introMagic2, /*&DreamGenContext::candles2*/NULL,
+	&DreamGenContext::gates, &DreamGenContext::introMagic3,
 	/*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
 	/*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap,
 	/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,
@@ -398,6 +398,27 @@ void DreamGenContext::introMagic1(ReelRoutine &routine) {
 	showGameReel(&routine);
 }
 
+void DreamGenContext::introMagic2(ReelRoutine &routine) {
+	if (checkSpeed(routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 216)
+			nextReelPointer = 192;
+		routine.setReelPointer(nextReelPointer);
+	}
+	showGameReel(&routine);
+}
+
+void DreamGenContext::introMagic3(ReelRoutine &routine) {
+	if (checkSpeed(routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 218)
+			data.byte(kGetback) = 1;
+		routine.setReelPointer(nextReelPointer);
+	}
+	showGameReel(&routine);
+	routine.mapX = data.byte(kMapx);
+}
+
 void DreamGenContext::introMusic(ReelRoutine &routine) {
 }
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 1b80818..0e9d1e7 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -431,6 +431,8 @@
 	void manAsleep(ReelRoutine &routine);
 	void drunk(ReelRoutine &routine);
 	void introMagic1(ReelRoutine &routine);
+	void introMagic2(ReelRoutine &routine);
+	void introMagic3(ReelRoutine &routine);
 	void introMusic(ReelRoutine &routine);
 	void candles(ReelRoutine &routine);
 	void gates(ReelRoutine &routine);






More information about the Scummvm-git-logs mailing list