diff options
author | richiesams | 2013-08-10 17:12:23 -0500 |
---|---|---|
committer | richiesams | 2013-08-10 17:14:15 -0500 |
commit | 694a6099a6f4da7807b1ac1efba75953522da206 (patch) | |
tree | 5f0951030b6b6239b30e3815de33dc48d48571db /engines/zvision | |
parent | 416cde1358ecdb18ae3f6c8bc2f794e9ac13755b (diff) | |
download | scummvm-rg350-694a6099a6f4da7807b1ac1efba75953522da206.tar.gz scummvm-rg350-694a6099a6f4da7807b1ac1efba75953522da206.tar.bz2 scummvm-rg350-694a6099a6f4da7807b1ac1efba75953522da206.zip |
ZVISION: Implement ActionQuit
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)) { |