diff options
-rw-r--r-- | engines/xeen/swordsofxeen/swordsofxeen.cpp | 32 | ||||
-rw-r--r-- | engines/xeen/swordsofxeen/swordsofxeen.h | 5 |
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 |