aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-27 19:14:13 -0400
committerPaul Gilbert2018-03-27 19:14:13 -0400
commit8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787 (patch)
treed7829abc6a6a60df434126954aadc3abf989e06e /engines/xeen
parent5416e640a3de47b1a7d2d6962ac688b463d5fba1 (diff)
downloadscummvm-rg350-8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787.tar.gz
scummvm-rg350-8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787.tar.bz2
scummvm-rg350-8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787.zip
XEEN: Added Swords of Xeen endgame screen
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/swordsofxeen/swordsofxeen.cpp32
-rw-r--r--engines/xeen/swordsofxeen/swordsofxeen.h5
2 files changed, 37 insertions, 0 deletions
diff --git a/engines/xeen/swordsofxeen/swordsofxeen.cpp b/engines/xeen/swordsofxeen/swordsofxeen.cpp
index a060b92eec..6f3963e1d0 100644
--- a/engines/xeen/swordsofxeen/swordsofxeen.cpp
+++ b/engines/xeen/swordsofxeen/swordsofxeen.cpp
@@ -82,12 +82,44 @@ void SwordsOfXeenEngine::death() {
_sound->stopAllAudio();
}
+bool SwordsOfXeenEngine::showEnding() {
+ Windows &windows = *_windows;
+ SpriteResource win("win.int");
+
+ _screen->loadBackground("blank.raw");
+ windows[28].setBounds(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
+ _screen->fadeIn(0x81);
+ _screen->loadPalette("scr.pal");
+ _screen->fadeIn(0x81);
+
+ win.draw(0, 0, Common::Point(0, 0));
+ win.draw(0, 1, Common::Point(160, 0));
+ _sound->playSound("ch1.voc");
+ _events->waitForPress();
+
+ _screen->fadeOut();
+ _screen->loadBackground("blank.raw");
+ return true;
+}
+
void SwordsOfXeenEngine::dream() {
// Swords of Xeen doesn't have any dreams
}
void SwordsOfXeenEngine::showCutscene(const Common::String &name, int status, uint score) {
+ _sound->stopAllAudio();
+ _events->clearEvents();
+
+ if (name != "ENDGAME")
+ error("Unknown cutscene specified");
+
+ showEnding();
+
+ _screen->freePages();
+ _sound->stopAllAudio();
+ _events->clearEvents();
_gameMode = GMODE_MENU;
+
}
} // End of namespace SwordsOfXeen
diff --git a/engines/xeen/swordsofxeen/swordsofxeen.h b/engines/xeen/swordsofxeen/swordsofxeen.h
index d301423287..b19f4e1d53 100644
--- a/engines/xeen/swordsofxeen/swordsofxeen.h
+++ b/engines/xeen/swordsofxeen/swordsofxeen.h
@@ -34,6 +34,11 @@ namespace SwordsOfXeen {
* Swords of Xeen specific game code
*/
class SwordsOfXeenEngine: public XeenEngine {
+private:
+ /**
+ * Show the ending "You won" screen
+ */
+ bool showEnding();
protected:
/**
* Show the starting sequence/intro