[Scummvm-git-logs] scummvm master -> 2fe8c9418020d3a36e31db85013de04734237e93

dreammaster dreammaster at scummvm.org
Sat Feb 24 21:45:14 CET 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:
2fe8c94180 XEEN: Implemented Swords of Xeen death screen


Commit: 2fe8c9418020d3a36e31db85013de04734237e93
    https://github.com/scummvm/scummvm/commit/2fe8c9418020d3a36e31db85013de04734237e93
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-02-24T15:42:58-05:00

Commit Message:
XEEN: Implemented Swords of Xeen death screen

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


diff --git a/engines/xeen/swordsofxeen/swordsofxeen.cpp b/engines/xeen/swordsofxeen/swordsofxeen.cpp
index 671a1bc..afd8467 100644
--- a/engines/xeen/swordsofxeen/swordsofxeen.cpp
+++ b/engines/xeen/swordsofxeen/swordsofxeen.cpp
@@ -36,7 +36,51 @@ void SwordsOfXeenEngine::outerGameLoop() {
 }
 
 void SwordsOfXeenEngine::death() {
-	error("TODO: Swords of Xeen death screen");
+	Windows &windows = *g_vm->_windows;
+
+	_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);
+
+	SpriteResource lose("lose.int");
+	lose.draw(0, 0, Common::Point(0, 0));
+	lose.draw(0, 1, Common::Point(160, 0));
+	_sound->playSound("laff1.voc");
+
+	bool breakFlag = false;
+	for (int idx = 0, idx2 = 0; idx < (_files->_isDarkCc ? 10 : 23); ++idx) {
+		_events->updateGameCounter();
+
+		if (_files->_isDarkCc) {
+			breakFlag = _events->wait(2);
+		} else {
+			if (idx == 1 || idx == 11)
+				_sound->playFX(33);
+			breakFlag = _events->wait(2);
+
+			if (idx == 15)
+				_sound->playFX(34);
+		}
+
+		if ((_files->_isDarkCc ? 9 : 10) == idx) {
+			if ((_files->_isDarkCc ? 2 : 1) > idx2) {
+				// Restart loop
+				idx = -1;
+				++idx2;
+			}
+		}
+	}
+
+	// Wait for press
+	if (!breakFlag)
+		_events->waitForPress();
+
+	_screen->fadeOut(4);
+	_screen->loadBackground("blank.raw");
+	_screen->loadPalette("dark.pal");
+	_sound->stopAllAudio();
 }
 
 void SwordsOfXeenEngine::dream() {





More information about the Scummvm-git-logs mailing list