[Scummvm-git-logs] scummvm master -> 104c01f85a43297a2eff5fc88fc24ac8dd39f223

dreammaster dreammaster at scummvm.org
Tue Jan 30 01:10:46 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:
104c01f85a XEEN: Hook up script opcodes to show ending cutscenes


Commit: 104c01f85a43297a2eff5fc88fc24ac8dd39f223
    https://github.com/scummvm/scummvm/commit/104c01f85a43297a2eff5fc88fc24ac8dd39f223
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-01-29T19:10:38-05:00

Commit Message:
XEEN: Hook up script opcodes to show ending cutscenes

Changed paths:
    engines/xeen/scripts.cpp
    engines/xeen/worldofxeen/worldofxeen.cpp
    engines/xeen/worldofxeen/worldofxeen.h
    engines/xeen/xeen.h


diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 0e5b412..255b9e5 100644
--- a/engines/xeen/scripts.cpp
+++ b/engines/xeen/scripts.cpp
@@ -1442,8 +1442,6 @@ void Scripts::doWorldEnding() {
 }
 
 void Scripts::doEnding(const Common::String &endStr) {
-	//_vm->_saves->saveChars();
-
 	Party &party = *_vm->_party;
 
 	int state = 0;
@@ -1458,7 +1456,8 @@ void Scripts::doEnding(const Common::String &endStr) {
 		}
 	}
 
-	error("TODO: doEnding state:%d", state);
+	g_vm->showCutscene(endStr);
+	g_vm->_quitMode = QMODE_MENU;
 }
 
 bool Scripts::ifProc(int action, uint32 val, int mode, int charIndex) {
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index e67024c..9812b45 100644
--- a/engines/xeen/worldofxeen/worldofxeen.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen.cpp
@@ -166,5 +166,20 @@ void WorldOfXeenEngine::death() {
 	w.update();
 }
 
+void WorldOfXeenEngine::showCutscene(const Common::String &name) {
+	_sound->stopAllAudio();
+
+	if (name == "ENDGAME")
+		showCloudsEnding();
+	else if (name == "ENDGAME2")
+		showDarkSideEnding();
+	else if (name == "WORLDEND")
+		showWorldOfXeenEnding();
+}
+
+void WorldOfXeenEngine::showWorldOfXeenEnding() {
+	// TODO
+}
+
 } // End of namespace WorldOfXeen
 } // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen.h b/engines/xeen/worldofxeen/worldofxeen.h
index 90fd191..0ec31f3 100644
--- a/engines/xeen/worldofxeen/worldofxeen.h
+++ b/engines/xeen/worldofxeen/worldofxeen.h
@@ -42,6 +42,11 @@ enum WOXGameAction {
  */
 class WorldOfXeenEngine: public XeenEngine, public CloudsCutscenes,
 		public DarkSideCutscenes {
+private:
+	/**
+	 * Show World of Xeen ending
+	 */
+	void showWorldOfXeenEnding();
 protected:
 	/**
 	 * Outer gameplay loop responsible for dispatching control to game-specific
@@ -61,6 +66,11 @@ public:
 	virtual ~WorldOfXeenEngine() {}
 
 	/**
+	 * Show a cutscene
+	 */
+	virtual void showCutscene(const Common::String &name);
+
+	/**
 	 * Set the next overall game action to do
 	 */
 	void setPendingAction(WOXGameAction action) { _pendingAction = action; }
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index 00f3901..34ed538 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -193,12 +193,17 @@ public:
 	/**
 	 * Returns true if a savegame can currently be loaded
 	 */
-	bool canLoadGameStateCurrently();
+	virtual bool canLoadGameStateCurrently();
 
 	/**
 	* Returns true if the game can currently be saved
 	*/
-	bool canSaveGameStateCurrently();
+	virtual bool canSaveGameStateCurrently();
+
+	/**
+	 * Show a cutscene
+	 */
+	virtual void showCutscene(const Common::String &name) {}
 
 	static Common::String printMil(uint value);
 





More information about the Scummvm-git-logs mailing list