diff options
author | Walter van Niftrik | 2018-07-25 10:40:30 +0200 |
---|---|---|
committer | Walter van Niftrik | 2018-12-27 12:33:10 +0100 |
commit | 76a0c20481bd68d60d8347fd922a74b292421d51 (patch) | |
tree | e74166628b3ffbbcb3d1cd98a91daefee3e43ac6 /engines/adl/adl.h | |
parent | b37a41286099faf4a36e73e69b377022345091e7 (diff) | |
download | scummvm-rg350-76a0c20481bd68d60d8347fd922a74b292421d51.tar.gz scummvm-rg350-76a0c20481bd68d60d8347fd922a74b292421d51.tar.bz2 scummvm-rg350-76a0c20481bd68d60d8347fd922a74b292421d51.zip |
ADL: Refactor opcode tables
Diffstat (limited to 'engines/adl/adl.h')
-rw-r--r-- | engines/adl/adl.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/adl/adl.h b/engines/adl/adl.h index 143b07471c..24b6ead8d9 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -284,6 +284,13 @@ protected: void loadDroppedItemOffsets(Common::ReadStream &stream, byte count); // Opcodes + typedef Common::Functor1<ScriptEnv &, int> Opcode; + + template <class T> + Opcode *opcode(int (T::*f)(ScriptEnv &)) { + return new Common::Functor1Mem<ScriptEnv &, int, T>(static_cast<T *>(this), f); + } + int o1_isItemInRoom(ScriptEnv &e); int o1_isMovesGT(ScriptEnv &e); int o1_isVarEQ(ScriptEnv &e); @@ -357,7 +364,6 @@ protected: bool _textMode; // Opcodes - typedef Common::Functor1<ScriptEnv &, int> Opcode; Common::Array<const Opcode *> _condOpcodes, _actOpcodes; // Message strings in data file Common::Array<DataBlockPtr> _messages; |