[Scummvm-cvs-logs] scummvm master -> 61c2331af3c870c10f7e8c37b152e16915d1b32a

bluegr md5 at scummvm.org
Wed Dec 7 23:05:36 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:
61c2331af3 DREAMWEB: 'priest' and 'priesttext' ported to C++


Commit: 61c2331af3c870c10f7e8c37b152e16915d1b32a
    https://github.com/scummvm/scummvm/commit/61c2331af3c870c10f7e8c37b152e16915d1b32a
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-07T14:04:55-08:00

Commit Message:
DREAMWEB: 'priest' and 'priesttext' 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 0388555..5457591 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -493,6 +493,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'plotreel',
 	'powerlightoff',
 	'powerlighton',
+	'priest',
+	'priesttext',
 	'printasprite',
 	'printboth',
 	'printchar',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index bbc909b..45972f5 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -818,46 +818,6 @@ gotnext:
 	fadeScreenUpHalf();
 }
 
-void DreamGenContext::priest() {
-	STACK_CHECK;
-	_cmp(es.word(bx+3), 8);
-	if (flags.z())
-		return /* (priestspoken) */;
-	data.byte(kPointermode) = 0;
-	data.word(kWatchingtime) = 2;
-	checkSpeed();
-	if (!flags.z())
-		return /* (priestwait) */;
-	_inc(es.word(bx+3));
-	push(es);
-	push(bx);
-	priestText();
-	bx = pop();
-	es = pop();
-}
-
-void DreamGenContext::priestText() {
-	STACK_CHECK;
-	_cmp(es.word(bx+3), 2);
-	if (flags.c())
-		return /* (nopriesttext) */;
-	_cmp(es.word(bx+3), 7);
-	if (!flags.c())
-		return /* (nopriesttext) */;
-	al = es.byte(bx+3);
-	_and(al, 1);
-	if (!flags.z())
-		return /* (nopriesttext) */;
-	al = es.byte(bx+3);
-	_shr(al, 1);
-	_add(al, 50);
-	bl = 72;
-	bh = 80;
-	cx = 54;
-	dx = 1;
-	setupTimedUse();
-}
-
 void DreamGenContext::advisor() {
 	STACK_CHECK;
 	checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 638287f..f8ae7eb 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -641,7 +641,6 @@ public:
 	void soldier1();
 	void getUnderCentre();
 	void showKeys();
-	void priest();
 	void nextColon();
 	void hangOnPQ();
 	void findOpenPos();
@@ -708,7 +707,6 @@ public:
 	void initialMonCols();
 	void checkForShake();
 	void useButtonA();
-	void priestText();
 	void execCommand();
 	void updateSymbolBot();
 	void findPuzText();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 18a2ff4..d53786c 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -49,7 +49,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	&DreamGenContext::introMonks1, NULL,
 	&DreamGenContext::introMonks2, NULL,
 	&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
-	&DreamGenContext::priest, NULL,
+	NULL, NULL,
 	NULL, NULL,
 	NULL, NULL,
 	NULL, NULL,
@@ -81,7 +81,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	/*&DreamGenContext::intromonks1*/NULL, &DreamGenContext::candles,
 	/*&DreamGenContext::intromonks2*/NULL, &DreamGenContext::handClap,
 	/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,
-	/*&DreamGenContext::priest*/NULL, &DreamGenContext::madman,
+	&DreamGenContext::priest, &DreamGenContext::madman,
 	&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
 	&DreamGenContext::foghornSound, &DreamGenContext::carParkDrip,
 	&DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip,
@@ -594,7 +594,6 @@ void DreamGenContext::louisChair(ReelRoutine &routine) {
 }
 
 void DreamGenContext::bossMan(ReelRoutine &routine) {
-	checkSpeed();
 	if (checkSpeed(routine)) {
 		uint16 nextReelPointer = routine.reelPointer() + 1;
 
@@ -620,4 +619,34 @@ void DreamGenContext::bossMan(ReelRoutine &routine) {
 		data.byte(kTalkedtoboss) = 1;
 }
 
+void DreamGenContext::priest(ReelRoutine &routine) {
+	if (routine.reelPointer() == 8)
+		return; // priestspoken
+
+	data.byte(kPointermode) = 0;
+	data.word(kWatchingtime) = 2;
+
+	if (checkSpeed(routine)) {
+		routine.incReelPointer();
+		push(es);
+		push(bx);
+		priestText(routine);
+		bx = pop();
+		es = pop();
+	}
+}
+
+void DreamGenContext::priestText(ReelRoutine &routine) {
+	uint16 reel = routine.reelPointer();
+	if (reel < 2 || reel >= 7 || (reel & 1))
+		return; // nopriesttext
+
+	al = ((reel & 0xFF) >> 1) + 50;
+	bl = 72;
+	bh = 80;
+	cx = 54;
+	dx = 1;
+	setupTimedUse();
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ec01fd1..8c42616 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -452,6 +452,8 @@
 	void alleyBarkSound(ReelRoutine &routine);
 	void louisChair(ReelRoutine &routine);
 	void bossMan(ReelRoutine &routine);
+	void priest(ReelRoutine &routine);
+	void priestText(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void loadSaveBox();
 	void loadKeypad();






More information about the Scummvm-git-logs mailing list