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

tramboi bertrand_augereau at yahoo.fr
Mon Dec 5 23:03:49 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:
bc50c9e457 DREAMWEB: Ported 'gates' to C++


Commit: bc50c9e45704ab9d664123fc8f4b04c5dbb848f7
    https://github.com/scummvm/scummvm/commit/bc50c9e45704ab9d664123fc8f4b04c5dbb848f7
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-05T17:02:10-08:00

Commit Message:
DREAMWEB: Ported 'gates' 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 bb8b3dc..76b49d6 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -274,6 +274,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'frameoutnm',
 	'frameoutv',
 	'gamer',
+	'gates',
 	'generalerror',
 	'getbackfromob',
 	'getblockofpixel',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e08e545..c6a0950 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -781,46 +781,6 @@ candles2fin:
 	showGameReel();
 }
 
-void DreamGenContext::gates() {
-	STACK_CHECK;
-	checkSpeed();
-	if (!flags.z())
-		goto gatesfin;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 116);
-	if (!flags.z())
-		goto notbang;
-	push(ax);
-	push(bx);
-	push(es);
-	al = 17;
-	playChannel1();
-	es = pop();
-	bx = pop();
-	ax = pop();
-notbang:
-	_cmp(ax, 110);
-	if (flags.c())
-		goto slowgates;
-	es.byte(bx+5) = 2;
-slowgates:
-	_cmp(ax, 120);
-	if (!flags.z())
-		goto gotgates;
-	data.byte(kGetback) = 1;
-	ax = 119;
-gotgates:
-	es.word(bx+3) = ax;
-	push(es);
-	push(bx);
-	intro3Text();
-	bx = pop();
-	es = pop();
-gatesfin:
-	showGameReel();
-}
-
 void DreamGenContext::introMagic2() {
 	STACK_CHECK;
 	checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index d8cbbef..fd294f6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -791,7 +791,6 @@ public:
 	void dropError();
 	void callEdensDLift();
 	void checkInside();
-	void gates();
 	void newGame();
 	void setWalk();
 	void findPathOfPoint();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 1d0e77f..c0b0b7a 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -45,7 +45,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	&DreamGenContext::mugger, &DreamGenContext::helicopter,
 	NULL, NULL,
 	&DreamGenContext::introMagic2, &DreamGenContext::candles2,
-	&DreamGenContext::gates, &DreamGenContext::introMagic3,
+	NULL, &DreamGenContext::introMagic3,
 	&DreamGenContext::introMonks1, NULL,
 	&DreamGenContext::introMonks2, &DreamGenContext::handClap,
 	&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
@@ -77,7 +77,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL,
 	&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
 	/*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL,
-	/*&DreamGenContext::gates*/NULL, /*&DreamGenContext::introMagic3*/NULL,
+	&DreamGenContext::gates, /*&DreamGenContext::introMagic3*/NULL,
 	/*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
 	/*&DreamGenContext::intromonks2*/NULL, /*&DreamGenContext::handClap*/NULL,
 	/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,
@@ -388,6 +388,27 @@ void DreamGenContext::candles(ReelRoutine &routine) {
 	showGameReel(&routine);
 }
 
+void DreamGenContext::gates(ReelRoutine &routine) {
+	if (checkSpeed(routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 116)
+			playChannel1(17);
+		if (nextReelPointer >= 110)
+			routine.period = 2;
+		if (nextReelPointer == 120) {
+			data.byte(kGetback) = 1;
+			nextReelPointer = 119;
+		}
+		routine.setReelPointer(nextReelPointer);
+		push(es);
+		push(bx);
+		intro3Text();
+		bx = pop();
+		es = pop();
+	}
+	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 ad5bc4d..f20117b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -413,6 +413,7 @@
 	void introMagic1(ReelRoutine &routine);
 	void introMusic(ReelRoutine &routine);
 	void candles(ReelRoutine &routine);
+	void gates(ReelRoutine &routine);
 	void security(ReelRoutine &routine);
 	void edenInBath(ReelRoutine &routine);
 	void louis(ReelRoutine &routine);






More information about the Scummvm-git-logs mailing list