diff options
author | Paul Gilbert | 2018-02-02 20:07:55 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-02 20:07:55 -0500 |
commit | 4ce615b1bb7b8978fdb692af86c81fd0194ab54a (patch) | |
tree | 4ecc638d322dbdfd14a5de7a1ad7c6a227cffa1b | |
parent | 9e5b54ddc875a29e0b1de604e4e00cfe2a66dfc3 (diff) | |
download | scummvm-rg350-4ce615b1bb7b8978fdb692af86c81fd0194ab54a.tar.gz scummvm-rg350-4ce615b1bb7b8978fdb692af86c81fd0194ab54a.tar.bz2 scummvm-rg350-4ce615b1bb7b8978fdb692af86c81fd0194ab54a.zip |
XEEN: Fixes for initial start of World ending
-rw-r--r-- | engines/xeen/sound.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/sound.h | 5 | ||||
-rw-r--r-- | engines/xeen/window.cpp | 8 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/worldofxeen_cutscenes.cpp | 24 |
4 files changed, 35 insertions, 10 deletions
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp index 65a3e95784..bfd2082e45 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 a79885a70f..f474063785 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 43ebe40047..99ceb9a0be 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 1947260732..19b5c2a07a 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 |