diff options
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/actions.cpp | 11 | ||||
-rw-r--r-- | engines/zvision/actions.h | 6 | ||||
-rw-r--r-- | engines/zvision/scr_file_handling.cpp | 3 |
3 files changed, 18 insertions, 2 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index bddec38450..81b6960378 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -204,6 +204,17 @@ bool ActionPlayAnimation::execute(ZVision *engine) { ////////////////////////////////////////////////////////////////////////////// +// ActionQuit +////////////////////////////////////////////////////////////////////////////// + +bool ActionQuit::execute(ZVision *engine) { + engine->quitGame(); + + return true; +} + + +////////////////////////////////////////////////////////////////////////////// // ActionRandom ////////////////////////////////////////////////////////////////////////////// diff --git a/engines/zvision/actions.h b/engines/zvision/actions.h index b75ca8bdad..48703b95e5 100644 --- a/engines/zvision/actions.h +++ b/engines/zvision/actions.h @@ -254,6 +254,12 @@ private: uint _framerate; }; +class ActionQuit : public ResultAction { +public: + ActionQuit() {} + bool execute(ZVision *engine); +}; + // TODO: See if this exists in ZGI. It doesn't in ZNem class ActionUnloadAnimation : public ResultAction { public: diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp index 06fb0fab89..0bb8d2690b 100644 --- a/engines/zvision/scr_file_handling.cpp +++ b/engines/zvision/scr_file_handling.cpp @@ -211,8 +211,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:quit*", true)) { - - + actionList.push_back(Common::SharedPtr<ResultAction>(new ActionQuit())); } else if (line.matchString("*:random*", true)) { |