aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/livingbooks.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk/livingbooks.h')
-rw-r--r--engines/mohawk/livingbooks.h23
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;