Skip to content

Commit

Permalink
XEEN: Added Swords of Xeen endgame screen
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Mar 27, 2018
1 parent 5416e64 commit 8dbe01e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions engines/xeen/swordsofxeen/swordsofxeen.cpp
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions engines/xeen/swordsofxeen/swordsofxeen.h
Expand Up @@ -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
Expand Down

0 comments on commit 8dbe01e

Please sign in to comment.