[Scummvm-git-logs] scummvm master -> 4ce615b1bb7b8978fdb692af86c81fd0194ab54a

dreammaster dreammaster at scummvm.org
Sat Feb 3 02:08:00 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:
4ce615b1bb XEEN: Fixes for initial start of World ending


Commit: 4ce615b1bb7b8978fdb692af86c81fd0194ab54a
    https://github.com/scummvm/scummvm/commit/4ce615b1bb7b8978fdb692af86c81fd0194ab54a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-02-02T20:07:55-05:00

Commit Message:
XEEN: Fixes for initial start of World ending

Changed paths:
    engines/xeen/sound.cpp
    engines/xeen/sound.h
    engines/xeen/window.cpp
    engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp


diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index 65a3e95..bfd2082 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -58,6 +58,14 @@ void Sound::playSound(const Common::String &name, int unused) {
 	playSound(f);
 }
 
+void Sound::playSound(const Common::String &name, int ccNum, int unused) {
+	File f;
+	if (!f.open(name, ccNum))
+		error("Could not open sound - %s", name.c_str());
+
+	playSound(f);
+}
+
 void Sound::stopSound() {
 	_mixer->stopHandle(_soundHandle);
 }
diff --git a/engines/xeen/sound.h b/engines/xeen/sound.h
index a79885a..f474063 100644
--- a/engines/xeen/sound.h
+++ b/engines/xeen/sound.h
@@ -53,6 +53,11 @@ public:
 	void playSound(const Common::String &name, int unused = 0);
 
 	/**
+	 * Play a given sound
+	 */
+	void playSound(const Common::String &name, int ccNum, int unused);
+
+	/**
 	 * Stop playing a sound
 	 * @remarks		In the original, passing 1 to playSound stopped the sound
 	 */
diff --git a/engines/xeen/window.cpp b/engines/xeen/window.cpp
index 43ebe40..99ceb9a 100644
--- a/engines/xeen/window.cpp
+++ b/engines/xeen/window.cpp
@@ -37,7 +37,7 @@ Windows::Windows() {
 	_fontReduced = false;
 	_fontJustify = JUSTIFY_NONE;
 
-	Window windows[40] = {
+	Window windows[48] = {
 		Window(Common::Rect(0, 0, 320, 200), 0, 0, 0, 0, 320, 200),
 		Window(Common::Rect(237, 9, 317, 74), 0, 0, 237, 12, 307, 68),
 		Window(Common::Rect(225, 1, 319, 73), 1, 8, 225, 1, 319, 73),
@@ -77,10 +77,12 @@ Windows::Windows() {
 		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(12, 8, 162, 198), 0, 0, 128, 0, 119, 0)
+		Window(Common::Rect(12, 8, 162, 198), 0, 0, 128, 0, 119, 0),
+		Window(Common::Rect(0, 0, 320, 200), 32, 8, 0, 0, 320, 190),
+		Window(Common::Rect(0, 0, 320, 200), 33, 8, 0, 0, 320, 200)
 	};
 
-	_windows = Common::Array<Window>(windows, 40);
+	_windows = Common::Array<Window>(windows, 42);
 }
 
 Windows::~Windows() {
diff --git a/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp b/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
index 1947260..19b5c2a 100644
--- a/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp
@@ -52,7 +52,7 @@ void WorldOfXeenCutscenes::worldEnding1() {
 	files.setGameCc(0);
 	sound.playSong("outday3.m");
 	showPharaohEndText(Res.WORLD_END_TEXT[0], nullptr, nullptr);
-	sound.playSound("elect.voc");
+	sound.playSound("elect.voc", 1, 0);
 
 	screen.loadBackground("skymain.raw");
 	savedBg.blitFrom(screen);
@@ -69,7 +69,7 @@ void WorldOfXeenCutscenes::worldEnding1() {
 		SpriteResource("sc3b1.eg2"), SpriteResource("sc3b2.eg2")
 	};
 	SpriteResource sc20[4] = {
-		SpriteResource("sc20[0].eg2"), SpriteResource("sc20b.eg2"),
+		SpriteResource("sc20a.eg2"), SpriteResource("sc20b.eg2"),
 		SpriteResource("sc20c.eg2"), SpriteResource("sc20d.eg2")
 	};
 	SpriteResource sc22[2] = {
@@ -432,7 +432,7 @@ void WorldOfXeenCutscenes::worldEnding1() {
 		if (idx == 3)
 			sound.playSound("click.voc");
 		else if (idx == 5 || idx == 15)
-			sound.playSound("elect.voc");
+			sound.playSound("elect.voc", 1, 0);
 		else if (idx == 22)
 			sound.playSound("explosio.voc");
 
@@ -667,18 +667,28 @@ void WorldOfXeenCutscenes::worldEnding4() {
 
 void WorldOfXeenCutscenes::setSubtitle(const Common::String &msg) {
 	Windows &windows = *_vm->_windows;
+	Window &w = windows[28];
+
 	const char *const FORMAT1 = "\xB""000\t000\xC""38\x3""c%s";
+	w.setBounds(Common::Rect(2, 157, SCREEN_WIDTH, SCREEN_HEIGHT - 2));
+	w.writeString(Common::String::format(FORMAT1, msg.c_str()));
+
 	const char *const FORMAT2 = "\xB""000\t000\xC""39\x3""c%s";
-	windows[28].writeString(Common::String::format(FORMAT1, msg.c_str()));
-	windows[28].writeString(Common::String::format(FORMAT2, msg.c_str()));
+	w.setBounds(Common::Rect(1, 156, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 4));
+	w.writeString(Common::String::format(FORMAT2, msg.c_str()));
 }
 
 void WorldOfXeenCutscenes::setSubtitle2(const Common::String &msg) {
 	Windows &windows = *_vm->_windows;
+	Window &w = windows[28];
+
 	const char *const FORMAT1 = "\xB""000\t000\xC""05\x3""c%s";
+	w.setBounds(Common::Rect(2, 157, SCREEN_WIDTH, SCREEN_HEIGHT - 2));
+	w.writeString(Common::String::format(FORMAT1, msg.c_str()));
+
 	const char *const FORMAT2 = "\xB""000\t000\xC""11\x3""c%s";
-	windows[28].writeString(Common::String::format(FORMAT1, msg.c_str()));
-	windows[28].writeString(Common::String::format(FORMAT2, msg.c_str()));
+	w.setBounds(Common::Rect(1, 156, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 4));
+	w.writeString(Common::String::format(FORMAT2, msg.c_str()));
 }
 
 } // End of namespace WorldOfXeen





More information about the Scummvm-git-logs mailing list