diff options
Diffstat (limited to 'engines/adl/adl.h')
-rw-r--r-- | engines/adl/adl.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/adl/adl.h b/engines/adl/adl.h index ce421143ba..8e4a7fea0f 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -124,10 +124,15 @@ struct Command { Script script; }; -struct ScriptEnv { +class ScriptEnv { +public: ScriptEnv(const Command &cmd_, byte verb_, byte noun_) : cmd(cmd_), verb(verb_), noun(noun_), ip(0) { } + byte op() const { return cmd.script[ip]; } + // We keep this 1-based for easier comparison with the original engine + byte arg(uint i) const { return cmd.script[ip + i]; } + const Command &cmd; byte verb, noun; byte ip; |