22 #ifndef MOHAWK_LIVINGBOOKS_CODE_H 23 #define MOHAWK_LIVINGBOOKS_CODE_H 25 #include "common/ptr.h" 26 #include "common/rect.h" 27 #include "common/stack.h" 28 #include "common/substream.h" 32 class MohawkEngine_LivingBooks;
50 type = kLBValueInteger;
54 type = kLBValueInteger;
58 type = kLBValueString;
70 type = kLBValueItemPtr;
92 integer = val.integer;
103 case kLBValueItemPtr:
129 bool operator==(
const LBValue &x)
const;
130 bool operator!=(
const LBValue &x)
const;
132 bool isNumeric()
const;
137 double toDouble()
const;
147 kLBCodeLiteralInteger = 0x1,
148 kLBCodeLiteralIntegerLE = 0x11
152 kTokenIdentifier = 0x1,
155 kTokenEndOfStatement = 0x7,
156 kTokenEndOfFile = 0x8,
158 kTokenSingleQuote = 0xc,
159 kTokenDoubleQuote = 0xd,
160 kTokenMultiply = 0xe,
161 kTokenOpenBracket = 0xf,
162 kTokenCloseBracket = 0x10,
164 kTokenMinusMinus = 0x12,
165 kTokenPlusEquals = 0x13,
167 kTokenPlusPlus = 0x15,
169 kTokenMinusEquals = 0x17,
170 kTokenMultiplyEquals = 0x18,
171 kTokenDivideEquals = 0x19,
172 kTokenListStart = 0x1a,
173 kTokenListEnd = 0x1b,
175 kTokenLessThan = 0x1d,
176 kTokenGreaterThan = 0x1e,
177 kTokenAndEquals = 0x1f,
178 kTokenDotOperator = 0x20,
181 kTokenLessThanEq = 0x23,
182 kTokenGreaterThanEq = 0x24,
187 kTokenConstMode = 0x31,
188 kTokenIntDivide = 0x32,
194 kTokenConstDataType = 0x3b,
195 kTokenConstItemType = 0x3c,
196 kTokenConstEventId = 0x42,
197 kTokenConstScriptOpcode = 0x43,
198 kTokenConstScriptParam = 0x44,
200 kTokenGeneralCommand = 0x4d,
201 kTokenItemCommand = 0x4e,
202 kTokenNotifyCommand = 0x4f,
204 kTokenKeycode = 0x5f,
208 kTokenPropListCommand = 0x70,
209 kTokenRectCommand = 0x71
236 LBValue runCode(byte terminator);
237 void parseStatement();
238 void parseComparisons();
240 void parseArithmetic1();
241 void parseArithmetic2();
249 void runGeneralCommand();
250 void runItemCommand();
251 void runNotifyCommand();
253 uint nextFreeString();
Definition: livingbooks_code.h:142
Definition: livingbooks_code.h:212
Definition: livingbooks.h:381
Definition: livingbooks_code.h:48
Definition: livingbooks.h:707