[Scummvm-git-logs] scummvm master -> 53f922b1d7b06979f23921af107d2a444848465f

dreammaster dreammaster at scummvm.org
Fri Feb 2 04:19:42 CET 2018


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:
53f922b1d7 XEEN: Fix display of dragon text at start of World ending


Commit: 53f922b1d7b06979f23921af107d2a444848465f
    https://github.com/scummvm/scummvm/commit/53f922b1d7b06979f23921af107d2a444848465f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-02-01T22:19:36-05:00

Commit Message:
XEEN: Fix display of dragon text at start of World ending

Changed paths:
    engines/xeen/music.cpp
    engines/xeen/window.cpp
    engines/xeen/worldofxeen/darkside_cutscenes.cpp
    engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp


diff --git a/engines/xeen/music.cpp b/engines/xeen/music.cpp
index 42cb446..b94c1d2 100644
--- a/engines/xeen/music.cpp
+++ b/engines/xeen/music.cpp
@@ -741,8 +741,13 @@ void Music::playSong(const Common::String &name, int param) {
 	_priorMusic = _currentMusic;
 	_currentMusic = name;
 
-	File f(name, _musicSide);
-	playSong(f);
+	Common::File mf;
+	if (mf.open(name)) {
+		playSong(mf);
+	} else {
+		File f(name, _musicSide);
+		playSong(f);
+	}
 }
 
 void Music::setMusicOn(bool isOn) {
diff --git a/engines/xeen/window.cpp b/engines/xeen/window.cpp
index 78e8df3..43ebe40 100644
--- a/engines/xeen/window.cpp
+++ b/engines/xeen/window.cpp
@@ -76,7 +76,8 @@ Windows::Windows() {
 		Window(Common::Rect(226, 26, 319, 146), 30, 8, 0, 0, 0, 0),
 		Window(Common::Rect(225, 74, 319, 154), 31, 8, 0, 0, 0, 0),
 		Window(Common::Rect(27, 6, 195, 142), 0, 8, 0, 0, 0, 0),
-		Window(Common::Rect(225, 140, 319, 199), 0, 8, 0, 0, 0, 0)
+		Window(Common::Rect(225, 140, 319, 199), 0, 8, 0, 0, 0, 0),
+		Window(Common::Rect(12, 8, 162, 198), 0, 0, 128, 0, 119, 0)
 	};
 
 	_windows = Common::Array<Window>(windows, 40);
diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index d0fe869..d9cf3e1 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -1205,6 +1205,7 @@ void DarkSideCutscenes::showPharaohEndText(const char *msg1, const char *msg2, c
 		// Show each page until a key is pressed
 		do {
 			// Draw the dragon pharoah
+			events.updateGameCounter();
 			screen.restoreBackground();
 			claw.draw(0, 5, Common::Point(CUTSCENES_XLIST[idx], CUTSCENES_YLIST[idx]), SPRFLAG_800);
 			claw.draw(0, 6, Common::Point(145, 185));
@@ -1220,10 +1221,9 @@ void DarkSideCutscenes::showPharaohEndText(const char *msg1, const char *msg2, c
 				text[pageNum]);
 			windows[39].writeString(str2);
 
+			windows[0].update();
+			events.wait(3);
 			idx = (idx + 1) % 32;
-			screen.update();
-
-			events.pollEventsAndWait();
 		} while (!_vm->shouldQuit() && !events.isKeyMousePressed());
 
 		events.clearEvents();
diff --git a/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp b/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
index 170a2ca..1947260 100644
--- a/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
@@ -49,7 +49,7 @@ void WorldOfXeenCutscenes::worldEnding1() {
 	Window &w0 = windows[0];
 	Graphics::ManagedSurface savedBg(SCREEN_WIDTH, SCREEN_HEIGHT);
 
-	files.setGameCc(1);
+	files.setGameCc(0);
 	sound.playSong("outday3.m");
 	showPharaohEndText(Res.WORLD_END_TEXT[0], nullptr, nullptr);
 	sound.playSound("elect.voc");
@@ -659,9 +659,10 @@ void WorldOfXeenCutscenes::worldEnding4() {
 
 	Common::String gooberStr = Res.GOOBER[_goober];
 	Common::String congratsStr1 = Common::String::format(Res.WORLD_CONGRATULATIONS, _finalScore);
-	Common::String congratsStr2 = _goober == NON_GOOBER ? "" :
-		Common::String::format(Res.WORLD_CONGRATULATIONS2, gooberStr.c_str());
-	showPharaohEndText(congratsStr1.c_str(), congratsStr2.c_str());
+	showPharaohEndText(congratsStr1.c_str(),
+		_goober == NON_GOOBER ? nullptr :
+		Common::String::format(Res.WORLD_CONGRATULATIONS2, gooberStr.c_str()).c_str()
+	);
 }
 
 void WorldOfXeenCutscenes::setSubtitle(const Common::String &msg) {





More information about the Scummvm-git-logs mailing list