[Scummvm-git-logs] scummvm master -> 8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787

dreammaster dreammaster at scummvm.org
Wed Mar 28 01:14:17 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8dbe01e065 XEEN: Added Swords of Xeen endgame screen


Commit: 8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787
    https://github.com/scummvm/scummvm/commit/8dbe01e065e7db6bdd00edfe26dd86a8fe9b6787
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-27T19:14:13-04:00

Commit Message:
XEEN: Added Swords of Xeen endgame screen

Changed paths:
    engines/xeen/swordsofxeen/swordsofxeen.cpp
    engines/xeen/swordsofxeen/swordsofxeen.h


diff --git a/engines/xeen/swordsofxeen/swordsofxeen.cpp b/engines/xeen/swordsofxeen/swordsofxeen.cpp
index a060b92..6f3963e 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 d301423..b19f4e1 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





More information about the Scummvm-git-logs mailing list