diff options
author | Matthew Hoops | 2011-01-18 17:42:34 +0000 |
---|---|---|
committer | Matthew Hoops | 2011-01-18 17:42:34 +0000 |
commit | c35fa646ce4e40ab0e3223a5aec4049e8cb7bbc8 (patch) | |
tree | abab71bb36e18abbede501e4bd0680d594cecb36 | |
parent | 5cd4bd3ce774b9880882561e28aadcaa6125f92a (diff) | |
download | scummvm-rg350-c35fa646ce4e40ab0e3223a5aec4049e8cb7bbc8.tar.gz scummvm-rg350-c35fa646ce4e40ab0e3223a5aec4049e8cb7bbc8.tar.bz2 scummvm-rg350-c35fa646ce4e40ab0e3223a5aec4049e8cb7bbc8.zip |
MOHAWK: Move Myst's o_quit opcode to the base class
svn-id: r55304
-rw-r--r-- | engines/mohawk/myst_scripts.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/myst_scripts.h | 4 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/credits.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/credits.h | 1 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/makingof.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/makingof.h | 2 |
6 files changed, 8 insertions, 11 deletions
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp index 645eafdec5..9861054fa5 100644 --- a/engines/mohawk/myst_scripts.cpp +++ b/engines/mohawk/myst_scripts.cpp @@ -909,4 +909,8 @@ void MystScriptParser::o_soundWaitStop(uint16 op, uint16 var, uint16 argc, uint1 // TODO: Implement } +void MystScriptParser::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv) { + _vm->_system->quit(); +} + } // End of namespace Mohawk diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h index b85eb9d969..e4f4cc3cfe 100644 --- a/engines/mohawk/myst_scripts.h +++ b/engines/mohawk/myst_scripts.h @@ -83,6 +83,7 @@ public: DECLARE_OPCODE(unknown); + // Common opcodes DECLARE_OPCODE(o_toggleVar); DECLARE_OPCODE(o_setVar); DECLARE_OPCODE(o_changeCardSwitch); @@ -122,6 +123,9 @@ public: DECLARE_OPCODE(o_restoreMainCursor); DECLARE_OPCODE(o_soundWaitStop); + // Used in multiple stacks + DECLARE_OPCODE(o_quit); + DECLARE_OPCODE(NOP); protected: diff --git a/engines/mohawk/myst_stacks/credits.cpp b/engines/mohawk/myst_stacks/credits.cpp index 93486928ce..df2a1c08cc 100644 --- a/engines/mohawk/myst_stacks/credits.cpp +++ b/engines/mohawk/myst_stacks/credits.cpp @@ -90,10 +90,6 @@ uint16 MystScriptParser_Credits::getVar(uint16 var) { } } -void MystScriptParser_Credits::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - _vm->_system->quit(); -} - void MystScriptParser_Credits::o_runCredits(uint16 op, uint16 var, uint16 argc, uint16 *argv) { // Activate the credits _creditsRunning = true; diff --git a/engines/mohawk/myst_stacks/credits.h b/engines/mohawk/myst_stacks/credits.h index 0a80ae9a67..46d23c67ca 100644 --- a/engines/mohawk/myst_stacks/credits.h +++ b/engines/mohawk/myst_stacks/credits.h @@ -49,7 +49,6 @@ private: void setupOpcodes(); uint16 getVar(uint16 var); - DECLARE_OPCODE(o_quit); DECLARE_OPCODE(o_runCredits); bool _creditsRunning; diff --git a/engines/mohawk/myst_stacks/makingof.cpp b/engines/mohawk/myst_stacks/makingof.cpp index 54de15f50e..28b8665f52 100644 --- a/engines/mohawk/myst_stacks/makingof.cpp +++ b/engines/mohawk/myst_stacks/makingof.cpp @@ -56,8 +56,4 @@ void MystScriptParser_MakingOf::disablePersistentScripts() { void MystScriptParser_MakingOf::runPersistentScripts() { } -void MystScriptParser_MakingOf::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv) { - _vm->_system->quit(); -} - } // End of namespace Mohawk diff --git a/engines/mohawk/myst_stacks/makingof.h b/engines/mohawk/myst_stacks/makingof.h index 5775e7cc80..ab919fd174 100644 --- a/engines/mohawk/myst_stacks/makingof.h +++ b/engines/mohawk/myst_stacks/makingof.h @@ -47,8 +47,6 @@ public: private: void setupOpcodes(); - - DECLARE_OPCODE(o_quit); }; } // End of namespace Mohawk |