diff options
author | Alyssa Milburn | 2010-12-05 16:19:35 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-12-05 16:19:35 +0000 |
commit | 9e6fe3bd888625de33c029998b0403ca7f0b48da (patch) | |
tree | 744d67f6f608d1e05ba890e6ae8b21d4be27c2cf /engines/mohawk/livingbooks.h | |
parent | 24a0b50ac399e71634725ddaaf4ac87288916d3c (diff) | |
download | scummvm-rg350-9e6fe3bd888625de33c029998b0403ca7f0b48da.tar.gz scummvm-rg350-9e6fe3bd888625de33c029998b0403ca7f0b48da.tar.bz2 scummvm-rg350-9e6fe3bd888625de33c029998b0403ca7f0b48da.zip |
MOHAWK: add runCommand/checkCondition routines for LB 2/3
svn-id: r54777
Diffstat (limited to 'engines/mohawk/livingbooks.h')
-rw-r--r-- | engines/mohawk/livingbooks.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h index 47bd586c6c..862c682048 100644 --- a/engines/mohawk/livingbooks.h +++ b/engines/mohawk/livingbooks.h @@ -224,6 +224,22 @@ protected: Common::Array<Common::Point> _shapeOffsets; }; +enum LBValueType { + kLBValueString, + kLBValueInteger +}; + +struct LBValue { + LBValue() { type = kLBValueInteger; integer = 0; } + + LBValueType type; + Common::String string; + int integer; + + bool operator==(const LBValue &x) const; + bool operator!=(const LBValue &x) const; +}; + class LBItem { public: LBItem(MohawkEngine_LivingBooks *vm, Common::Rect rect); @@ -280,6 +296,10 @@ protected: Common::Array<LBScriptEntry *> _scriptEntries; void runScript(uint id); + + LBValue parseValue(const Common::String &command, uint &pos); + void runCommand(const Common::String &command); + bool checkCondition(const Common::String &condition); }; class LBSoundItem : public LBItem { @@ -460,6 +480,9 @@ public: void prevPage(); void nextPage(); + // TODO: make private + Common::HashMap<Common::String, LBValue> _variables; + private: LivingBooksConsole *_console; Common::ConfigFile _bookInfoFile; |