aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/worldofxeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-06 21:43:50 -0500
committerPaul Gilbert2018-02-06 21:43:50 -0500
commit94966010dbe392a4e8c9390db325a6f30d8455ab (patch)
treedf6d8331f90f585d69787f0652d91c643bb0b570 /engines/xeen/worldofxeen
parent255aa972c64c4cd0d7ce03bccd2394138d285563 (diff)
downloadscummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.tar.gz
scummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.tar.bz2
scummvm-rg350-94966010dbe392a4e8c9390db325a6f30d8455ab.zip
XEEN: More of Clouds ending
Diffstat (limited to 'engines/xeen/worldofxeen')
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.cpp66
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.h5
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.cpp4
3 files changed, 62 insertions, 13 deletions
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