diff options
author | Paul Gilbert | 2018-02-06 21:43:50 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-06 21:43:50 -0500 |
commit | 94966010dbe392a4e8c9390db325a6f30d8455ab (patch) | |
tree | df6d8331f90f585d69787f0652d91c643bb0b570 /engines | |
parent | 255aa972c64c4cd0d7ce03bccd2394138d285563 (diff) | |
download | scummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.tar.gz scummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.tar.bz2 scummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.zip |
XEEN: More of Clouds ending
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/events.cpp | 10 | ||||
-rw-r--r-- | engines/xeen/events.h | 5 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/clouds_cutscenes.cpp | 66 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/clouds_cutscenes.h | 5 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/worldofxeen.cpp | 4 |
5 files changed, 77 insertions, 13 deletions
diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp index babfdcb397..bec5b6bd51 100644 --- a/engines/xeen/events.cpp +++ b/engines/xeen/events.cpp @@ -179,6 +179,16 @@ void EventsManager::waitForPressAnimated() { clearEvents(); } +void EventsManager::waitForPress() { + clearEvents(); + + do { + pollEventsAndWait(); + } while (!_vm->shouldQuit() && !isKeyMousePressed()); + + clearEvents(); +} + void EventsManager::nextFrame() { ++_frameCounter; ++_playTime; diff --git a/engines/xeen/events.h b/engines/xeen/events.h index 3ec548dac4..49632596cc 100644 --- a/engines/xeen/events.h +++ b/engines/xeen/events.h @@ -128,6 +128,11 @@ public: * Waits for a key or mouse press, animating the 3d view in the background */ void waitForPressAnimated(); + + /** + * Waits for a key or mouse press + */ + void waitForPress(); }; class GameEvent { diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp index 8b2d532056..e61e47789f 100644 --- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp +++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp @@ -340,7 +340,8 @@ void CloudsCutscenes::showCloudsEnding(uint finalScore) { if (showCloudsEnding1()) if (showCloudsEnding2()) if (!showCloudsEnding3()) - showCloudsEnding4(finalScore); + if (!showCloudsEnding4(finalScore)) + showCloudsEnding5(); } bool CloudsCutscenes::showCloudsEnding1() { @@ -721,7 +722,9 @@ bool CloudsCutscenes::showCloudsEnding2() { } bool CloudsCutscenes::showCloudsEnding3() { - SpriteResource mon088("088.mon"), att034("034.att"); + SpriteResource mon, att; + + // TODO doScroll(true, false); @@ -808,21 +811,58 @@ bool CloudsCutscenes::showCloudsEnding4(uint finalScore) { windows[28].setBounds(Common::Rect(63, 60, 254, 160)); - for (int idx1 = 0; idx1 < 38; ++idx1) { - screen.horizMerge(mergeX); - mergeX = (mergeX + 1) % SCREEN_WIDTH; + for (int idx = 1; idx <= 2; ++idx) { + events.clearEvents(); + do { + screen.horizMerge(mergeX); + mergeX = (mergeX + 1) % SCREEN_WIDTH; - mirrBack.draw(0, 0); - mirror.draw(0, 0); - endText.draw(0, 19); + mirrBack.draw(0, 0); + mirror.draw(0, 0); + endText.draw(0, 19); - for (int idx2 = 0; idx2 < 10; ++idx2) - endText.draw(0, frames[idx2], Common::Point(FRAMEX[idx2], 110)); - windows[28].writeString(Res.CLOUDS_CONGRATULATIONS1); + for (int idx2 = 0; idx2 < 10; ++idx2) + endText.draw(0, frames[idx2], Common::Point(FRAMEX[idx2], 110)); + windows[28].writeString(idx == 1 ? Res.CLOUDS_CONGRATULATIONS1 : + Res.CLOUDS_CONGRATULATIONS2); - WAIT(1); + WAIT(1); + } while (!events.isKeyMousePressed()); } - // TODO + + doScroll(true, false); + screen.fadeOut(); + + return true; +} + +bool CloudsCutscenes::showCloudsEnding5() { + EventsManager &events = *_vm->_events; + Screen &screen = *_vm->_screen; + Sound &sound = *_vm->_sound; + SpriteResource king("king.end"); + + king.draw(0, 0, Common::Point(0, 0)); + king.draw(0, 1, Common::Point(160, 0)); + screen.fadeIn(); + + sound.playSound("king4.voc"); + do { + king.draw(0, 0, Common::Point(0, 0)); + king.draw(0, 1, Common::Point(160, 0)); + int frame = getSpeakingFrame(1, 6); + if (frame > 1) + king.draw(0, frame); + + showSubtitles(); + WAIT(3); + } while (sound.isPlaying() || _subtitleSize); + + king.draw(0, 0, Common::Point(0, 0)); + king.draw(0, 1, Common::Point(160, 0)); + WAIT(1); + doScroll(true, false); + return true; } diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.h b/engines/xeen/worldofxeen/clouds_cutscenes.h index a1579ca792..de56039ea8 100644 --- a/engines/xeen/worldofxeen/clouds_cutscenes.h +++ b/engines/xeen/worldofxeen/clouds_cutscenes.h @@ -60,6 +60,11 @@ private: * Shows part 4 of the Clouds of Xeen ending, the final score */ bool showCloudsEnding4(uint finalScore); + + /** + * Shows part 5 of the Clouds of Xeen ending, final king display + */ + bool showCloudsEnding5(); public: CloudsCutscenes(XeenEngine *vm) : Cutscenes(vm) {} diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp index c02e6f7969..b2ff215ebf 100644 --- a/engines/xeen/worldofxeen/worldofxeen.cpp +++ b/engines/xeen/worldofxeen/worldofxeen.cpp @@ -167,6 +167,7 @@ void WorldOfXeenEngine::death() { void WorldOfXeenEngine::showCutscene(const Common::String &name, int status, uint score) { _sound->stopAllAudio(); + _events->clearEvents(); if (name == "ENDGAME") showCloudsEnding(score); @@ -174,6 +175,9 @@ void WorldOfXeenEngine::showCutscene(const Common::String &name, int status, uin showDarkSideEnding(); else if (name == "WORLDEND") showWorldOfXeenEnding((GooberState)status, score); + + _events->clearEvents(); + _quitMode = QMODE_MENU; } } // End of namespace WorldOfXeen |