diff options
author | Bastien Bouclet | 2016-11-05 08:35:03 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | e7146c9bf7d5bdc62b977dca47c445e7f828392e (patch) | |
tree | 62a3e7db3dda0340a9ee0be4d92fd00362479a07 /engines/mohawk/riven_scripts.h | |
parent | 6d4260719c79d457c1162feae2a91e7bbacae445 (diff) | |
download | scummvm-rg350-e7146c9bf7d5bdc62b977dca47c445e7f828392e.tar.gz scummvm-rg350-e7146c9bf7d5bdc62b977dca47c445e7f828392e.tar.bz2 scummvm-rg350-e7146c9bf7d5bdc62b977dca47c445e7f828392e.zip |
MOHAWK: Move the changeToStack command to a dedicated class
Diffstat (limited to 'engines/mohawk/riven_scripts.h')
-rw-r--r-- | engines/mohawk/riven_scripts.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h index cac7955612..13c415b850 100644 --- a/engines/mohawk/riven_scripts.h +++ b/engines/mohawk/riven_scripts.h @@ -222,7 +222,6 @@ private: DECLARE_OPCODE(playScriptSLST); DECLARE_OPCODE(playSound); DECLARE_OPCODE(setVariable); - DECLARE_OPCODE(mohawkSwitch); DECLARE_OPCODE(enableHotspot); DECLARE_OPCODE(disableHotspot); DECLARE_OPCODE(stopSound); @@ -234,7 +233,6 @@ private: DECLARE_OPCODE(beginScreenUpdate); DECLARE_OPCODE(applyScreenUpdate); DECLARE_OPCODE(incrementVariable); - DECLARE_OPCODE(changeStack); DECLARE_OPCODE(disableMovie); DECLARE_OPCODE(disableAllMovies); DECLARE_OPCODE(enableMovie); @@ -287,6 +285,30 @@ private: Common::Array<Branch> _branches; }; +/** + * A command to go to a different stack + * + * Changes the active stack and sets the initial card. + * The stack can be specified by global id or name id in the initial stack. + * The destination card must be specified by global id. + */ +class RivenStackChangeCommand : public RivenCommand { +public: + RivenStackChangeCommand(MohawkEngine_Riven *vm, uint16 stackId, uint32 globalCardId, bool byStackId); + + static RivenStackChangeCommand *createFromStream(MohawkEngine_Riven *vm, int type, Common::ReadStream *stream); + virtual ~RivenStackChangeCommand(); + + // RivenCommand API + virtual void dump(byte tabs) override; + virtual void execute() override; + +private: + uint16 _stackId; + uint32 _cardId; + bool _byStackId; // Otherwise by stack name id +}; + } // End of namespace Mohawk #undef DECLARE_OPCODE |