diff options
author | Ľubomír Remák | 2018-03-18 15:28:46 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | 54c2c0aee6e371f8058c50e0a4113f5b5492169e (patch) | |
tree | ae551cedc20fa03f179340aae9f7497193c80b6e /engines/mutationofjb/script.h | |
parent | 523f973e0a4ba16b278d546da9267a693924f957 (diff) | |
download | scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.tar.gz scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.tar.bz2 scummvm-rg350-54c2c0aee6e371f8058c50e0a4113f5b5492169e.zip |
MUTATIONOFJB: Add support for labels and goto.
Diffstat (limited to 'engines/mutationofjb/script.h')
-rw-r--r-- | engines/mutationofjb/script.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/mutationofjb/script.h b/engines/mutationofjb/script.h index 563dbc74c2..7c5e569702 100644 --- a/engines/mutationofjb/script.h +++ b/engines/mutationofjb/script.h @@ -24,15 +24,19 @@ #define MUTATIONOFJB_SCRIPT_H #include "common/array.h" +#include "common/hashmap.h" +#include "common/hash-str.h" namespace Common { - class SeekableReadStream; - class String; +class SeekableReadStream; +class String; } namespace MutationOfJB { class Command; +class LabelCommand; +class GotoCommand; class ConditionalCommand; typedef Common::Array<Command *> Commands; @@ -53,6 +57,7 @@ struct ActionInfo { }; typedef Common::Array<ActionInfo> ActionInfos; +typedef Common::Array<GotoCommand *> GotoCommands; class ScriptParseContext { @@ -71,9 +76,14 @@ public: char _tag; }; typedef Common::Array<ConditionalCommandInfo> ConditionalCommandInfos; - ConditionalCommandInfos _pendingCondCommands; + typedef Common::HashMap<Common::String, LabelCommand *> LabelMap; + LabelMap _labels; + + typedef Common::HashMap<Common::String, GotoCommands> PendingGotoMap; + PendingGotoMap _pendingGotos; + ActionInfos _actionInfos; private: |