aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/scripts.cpp5
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.cpp15
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.h10
-rw-r--r--engines/xeen/xeen.h9
4 files changed, 34 insertions, 5 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp
index 0e5b412a63..255b9e5588 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 e67024c883..9812b45e0f 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 90fd191b17..0ec31f3bf0 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 00f3901868..34ed53857c 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);