[Scummvm-cvs-logs] scummvm master -> 96360bb153201ccbd0b5748c2f153ae1277258b5

bluegr md5 at scummvm.org
Thu Dec 8 20:11:29 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:
96360bb153 DREAMWEB: Port 'intromonks2' to C++


Commit: 96360bb153201ccbd0b5748c2f153ae1277258b5
    https://github.com/scummvm/scummvm/commit/96360bb153201ccbd0b5748c2f153ae1277258b5
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-08T11:10:39-08:00

Commit Message:
DREAMWEB: Port 'intromonks2' 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 cba8aa9..fdff5a1 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -384,6 +384,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'intromagic2',
 	'intromagic3',
 	'intromonks1',
+	'intromonks2',
 	'intromusic',
 	'inventory',
 	'isitdescribed',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3a9fb57..a1d0799 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -523,65 +523,6 @@ gotheavyframe:
 	addToPeopleList();
 }
 
-void DreamGenContext::introMonks2() {
-	STACK_CHECK;
-	checkSpeed();
-	if (!flags.z())
-		goto intromonk2fin;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 87);
-	if (!flags.z())
-		goto nottalk1;
-	_inc(data.byte(kIntrocount));
-	push(es);
-	push(bx);
-	monks2text();
-	bx = pop();
-	es = pop();
-	_cmp(data.byte(kIntrocount), 19);
-	if (!flags.z())
-		goto notlasttalk1;
-	ax = 87;
-	goto gotintromonk2;
-notlasttalk1:
-	ax = 74;
-	goto gotintromonk2;
-nottalk1:
-	_cmp(ax, 110);
-	if (!flags.z())
-		goto notraisearm;
-	_inc(data.byte(kIntrocount));
-	push(es);
-	push(bx);
-	monks2text();
-	bx = pop();
-	es = pop();
-	_cmp(data.byte(kIntrocount), 35);
-	if (!flags.z())
-		goto notlastraise;
-	ax = 111;
-	goto gotintromonk2;
-notlastraise:
-	ax = 98;
-	goto gotintromonk2;
-notraisearm:
-	_cmp(ax, 176);
-	if (!flags.z())
-		goto notendmonk2;
-	data.byte(kGetback) = 1;
-	goto gotintromonk2;
-notendmonk2:
-	_cmp(ax, 125);
-	if (!flags.z())
-		goto gotintromonk2;
-	ax = 140;
-gotintromonk2:
-	es.word(bx+3) = ax;
-intromonk2fin:
-	showGameReel();
-}
-
 void DreamGenContext::endGameSeq() {
 	STACK_CHECK;
 	checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 0fb155b..674b952 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -558,7 +558,6 @@ public:
 	void moneyPoke();
 	void doSomeTalk();
 	void resetLocation();
-	void introMonks2();
 	void greyscaleSum();
 	void getOpenedSize();
 	void adjustUp();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index d87a5e3..6b78178 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -47,7 +47,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	NULL, NULL,
 	NULL, NULL,
 	NULL, NULL,
-	&DreamGenContext::introMonks2, NULL,
+	NULL, NULL,
 	NULL, &DreamGenContext::endGameSeq,
 	NULL, NULL,
 	NULL, NULL,
@@ -79,7 +79,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	&DreamGenContext::introMagic2, &DreamGenContext::candles2,
 	&DreamGenContext::gates, &DreamGenContext::introMagic3,
 	&DreamGenContext::introMonks1, &DreamGenContext::candles,
-	/*&DreamGenContext::introMonks2*/NULL, &DreamGenContext::handClap,
+	&DreamGenContext::introMonks2, &DreamGenContext::handClap,
 	&DreamGenContext::monkAndRyan, /*&DreamGenContext::endGameSeq*/NULL,
 	&DreamGenContext::priest, &DreamGenContext::madman,
 	&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
@@ -722,4 +722,45 @@ void DreamGenContext::introMonks1(ReelRoutine &routine) {
 	routine.mapY = data.byte(kMapy);
 }
 
+void DreamGenContext::introMonks2(ReelRoutine &routine) {
+	if (checkSpeed(routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 87) {
+			data.byte(kIntrocount)++;
+			push(es);
+			push(bx);
+			monks2text();
+			bx = pop();
+			es = pop();
+
+			if (data.byte(kIntrocount), 19)
+				nextReelPointer = 87;
+			else
+				nextReelPointer = 74;
+		}
+
+		if (nextReelPointer == 110) {
+			data.byte(kIntrocount)++;
+			push(es);
+			push(bx);
+			monks2text();
+			bx = pop();
+			es = pop();
+		
+			if (data.byte(kIntrocount) == 35)
+				nextReelPointer = 111;
+			else
+				nextReelPointer = 98;
+		} else if (nextReelPointer == 176) {
+			data.byte(kGetback) = 1;
+		} else if (nextReelPointer == 125) {
+			nextReelPointer = 140;
+		}
+
+		routine.setReelPointer(nextReelPointer);
+	}
+
+	showGameReel(&routine);
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 27268bb..702a635 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -425,6 +425,7 @@
 	void monkAndRyan(ReelRoutine &routine);
 	void copper(ReelRoutine &routine);
 	void introMonks1(ReelRoutine &routine);
+	void introMonks2(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void loadSaveBox();
 	void loadKeypad();






More information about the Scummvm-git-logs mailing list