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

bluegr md5 at scummvm.org
Mon Dec 26 02:16:59 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:
d503838fd6 DREAMWEB: Moved the two rollEndCredits functions together in print.cpp and renamed them to rollEndCreditsGameWon and rol


Commit: d503838fd65db483a764d550cc6cce32984f6381
    https://github.com/scummvm/scummvm/commit/d503838fd65db483a764d550cc6cce32984f6381
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-25T17:15:47-08:00

Commit Message:
DREAMWEB: Moved the two rollEndCredits functions together in print.cpp and renamed them to rollEndCreditsGameWon and rollEndCreditsGameLost

Changed paths:
    engines/dreamweb/dreambase.h
    engines/dreamweb/people.cpp
    engines/dreamweb/print.cpp
    engines/dreamweb/sprite.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/vgafades.cpp



diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 3b4ef7e..a669e6b 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -291,6 +291,8 @@ public:
 	uint16 waitFrames();
 	void printCurs();
 	void delCurs();
+	void rollEndCreditsGameWon();
+	void rollEndCreditsGameLost();
 
 	// from saveload.cpp
 	void loadGame();
@@ -362,7 +364,6 @@ public:
 	void intro2Text(uint16 nextReelPointer);
 	void intro3Text(uint16 nextReelPointer);
 
-	void rollEndCredits();
 	void monks2text();
 	void textForEnd();
 	void textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount);
@@ -726,8 +727,6 @@ public:
 	void createPanel();
 	void createPanel2();
 	void showPanel();
-	void rollEndCredits2();
-	void rollEm();
 };
 
 
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 83eb107..a6ebbcc 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -1030,7 +1030,7 @@ void DreamBase::endGameSeq(ReelRoutine &routine) {
 	
 	if (routine.reelPointer() == 145) {
 		routine.setReelPointer(146);
-		rollEndCredits();
+		rollEndCreditsGameWon();
 	}
 }
 
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 0fd596c..0191aa8 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -263,4 +263,91 @@ const char *DreamBase::monPrint(const char *string) {
 	return iterator;
 }
 
+void DreamBase::rollEndCreditsGameWon() {
+	playChannel0(16, 255);
+	data.byte(kVolume) = 7;
+	data.byte(kVolumeto) = 0;
+	data.byte(kVolumedirection) = (byte)-1;
+
+	multiGet(mapStore(), 75, 20, 160, 160);
+
+	const uint8 *string = getTextInFile1(3);
+	const int linespacing = data.word(kLinespacing);
+
+	for (int i = 0; i < 254; ++i) {
+		// Output the text, initially with an offset of 10 pixels,
+		// then move it up one pixel until we shifted it by a complete
+		// line of text.
+		for (int j = 0; j < linespacing; ++j) {
+			vSync();
+			multiPut(mapStore(), 75, 20, 160, 160);
+			vSync();
+
+			// Output up to 18 lines of text
+			uint16 y = 10 - j;
+			const uint8 *tmp_str = string;
+			for (int k = 0; k < 18; ++k) {
+				DreamBase::printDirect(&tmp_str, 75, &y, 160 + 1, true);
+				y += linespacing;
+			}
+
+			vSync();
+			multiDump(75, 20, 160, 160);
+		}
+
+		// Skip to the next text line
+		byte c;
+		do {
+			c = *string++;
+		} while (c != ':' && c != 0);
+	}
+
+	hangOn(100);
+	panelToMap();
+	fadeScreenUpHalf();
+}
+
+void DreamBase::rollEndCreditsGameLost() {
+	multiGet(mapStore(), 25, 20, 160, 160);
+
+	const uint8 *string = getTextInFile1(49);
+	const int linespacing = data.word(kLinespacing);
+
+	for (int i = 0; i < 80; ++i) {
+		// Output the text, initially with an offset of 10 pixels,
+		// then move it up one pixel until we shifted it by a complete
+		// line of text.
+		for (int j = 0; j < linespacing; ++j) {
+			vSync();
+			multiPut(mapStore(), 25, 20, 160, 160);
+			vSync();
+
+			// Output up to 18 lines of text
+			uint16 y = 10 - j;
+			const uint8 *tmp_str = string;
+			for (int k = 0; k < 18; ++k) {
+				DreamBase::printDirect(&tmp_str, 25, &y, 160 + 1, true);
+				y += linespacing;
+			}
+
+			vSync();
+			multiDump(25, 20, 160, 160);
+
+			if (data.byte(kLasthardkey) == 1)
+				return;
+		}
+
+		// Skip to the next text line
+		byte c;
+		do {
+			c = *string++;
+		} while (c != ':' && c != 0);
+
+		if (data.byte(kLasthardkey) == 1)
+			return;
+	}
+
+	hangOne(120);
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 72be878..f23804b 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -705,52 +705,6 @@ void DreamBase::intro3Text(uint16 nextReelPointer) {
 		setupTimedTemp(46, 82, 36, 56, 100, 1);
 }
 
-void DreamBase::rollEndCredits() {
-	// Note: This function is very similar to rollEm() in vgafades.cpp
-
-	playChannel0(16, 255);
-	data.byte(kVolume) = 7;
-	data.byte(kVolumeto) = 0;
-	data.byte(kVolumedirection) = (byte)-1;
-
-	multiGet(mapStore(), 75, 20, 160, 160);
-
-	const uint8 *string = getTextInFile1(3);
-	const int linespacing = data.word(kLinespacing);
-
-	for (int i = 0; i < 254; ++i) {
-		// Output the text, initially with an offset of 10 pixels,
-		// then move it up one pixel until we shifted it by a complete
-		// line of text.
-		for (int j = 0; j < linespacing; ++j) {
-			vSync();
-			multiPut(mapStore(), 75, 20, 160, 160);
-			vSync();
-
-			// Output up to 18 lines of text
-			uint16 y = 10 - j;
-			const uint8 *tmp_str = string;
-			for (int k = 0; k < 18; ++k) {
-				DreamBase::printDirect(&tmp_str, 75, &y, 160 + 1, true);
-				y += linespacing;
-			}
-
-			vSync();
-			multiDump(75, 20, 160, 160);
-		}
-
-		// Skip to the next text line
-		byte c;
-		do {
-			c = *string++;
-		} while (c != ':' && c != 0);
-	}
-	hangOn(100);
-	panelToMap();
-	fadeScreenUpHalf();
-}
-
-
 void DreamBase::monks2text() {
 	bool isGermanCD = isCD() && engine->getLanguage() == Common::DE_DEU;
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index f21927c..e8fa176 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3190,7 +3190,7 @@ void DreamGenContext::showGun() {
 	hangOn(160);
 	playChannel0(12, 0);
 	loadTempText("DREAMWEB.T83");
-	rollEndCredits2();
+	rollEndCreditsGameLost();
 	getRidOfTempText();
 }
 
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index 23a8655..3833050 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -281,53 +281,4 @@ void DreamBase::dumpCurrent() {
 	engine->setPalette(pal, 128, 128);
 }
 
-void DreamBase::rollEndCredits2() {
-	rollEm();
-}
-
-void DreamBase::rollEm() {
-	// Note: This function is very similar to rollEndCredits() in sprite.cpp
-
-	multiGet(mapStore(), 25, 20, 160, 160);
-
-	const uint8 *string = getTextInFile1(49);
-	const int linespacing = data.word(kLinespacing);
-
-	for (int i = 0; i < 80; ++i) {
-		// Output the text, initially with an offset of 10 pixels,
-		// then move it up one pixel until we shifted it by a complete
-		// line of text.
-		for (int j = 0; j < linespacing; ++j) {
-			vSync();
-			multiPut(mapStore(), 25, 20, 160, 160);
-			vSync();
-
-			// Output up to 18 lines of text
-			uint16 y = 10 - j;
-			const uint8 *tmp_str = string;
-			for (int k = 0; k < 18; ++k) {
-				DreamBase::printDirect(&tmp_str, 25, &y, 160 + 1, true);
-				y += linespacing;
-			}
-
-			vSync();
-			multiDump(25, 20, 160, 160);
-
-			if (data.byte(kLasthardkey) == 1)
-				return;
-		}
-
-		// Skip to the next text line
-		byte c;
-		do {
-			c = *string++;
-		} while (c != ':' && c != 0);
-
-		if (data.byte(kLasthardkey) == 1)
-			return;
-	}
-
-	hangOne(120);
-}
-
 } // End of namespace DreamGen






More information about the Scummvm-git-logs mailing list