28 #ifndef GOB_EXPRESSION_H 29 #define GOB_EXPRESSION_H 31 #include "common/scummsys.h" 54 OP_LOAD_VAR_INT16 = 17,
55 OP_LOAD_VAR_INT8 = 18,
56 OP_LOAD_IMM_INT32 = 19,
57 OP_LOAD_IMM_INT16 = 20,
58 OP_LOAD_IMM_INT8 = 21,
60 OP_LOAD_VAR_INT32 = 23,
61 OP_LOAD_VAR_INT32_AS_INT16 = 24,
90 TYPE_IMM_INT8 = OP_LOAD_IMM_INT8,
91 TYPE_IMM_INT32 = OP_LOAD_IMM_INT32,
92 TYPE_IMM_INT16 = OP_LOAD_IMM_INT16,
93 TYPE_IMM_STR = OP_LOAD_IMM_STR,
94 TYPE_VAR_INT8 = OP_LOAD_VAR_INT8,
95 TYPE_VAR_INT16 = OP_LOAD_VAR_INT16,
96 TYPE_VAR_INT32 = OP_LOAD_VAR_INT32,
97 TYPE_VAR_STR = OP_LOAD_VAR_STR,
98 TYPE_ARRAY_INT8 = OP_ARRAY_INT8,
99 TYPE_ARRAY_INT16 = OP_ARRAY_INT16,
100 TYPE_ARRAY_INT32 = OP_ARRAY_INT32,
101 TYPE_ARRAY_STR = OP_ARRAY_STR,
102 TYPE_VAR_INT32_AS_INT16 = OP_LOAD_VAR_INT32_AS_INT16
119 void skipExpr(
char stopToken);
120 void printExpr(
char stopToken);
121 void printVarIndex();
123 uint16 parseVarIndex(uint16 *size = 0, uint16 *type = 0);
124 int16 parseValExpr(byte stopToken = 99);
125 int16 parseExpr(byte stopToken, byte *type);
127 int32 getResultInt();
128 char *getResultStr();
136 Stack(
size_t size = 20);
145 StackFrame(
const Stack &stack);
147 void push(
int count = 1);
148 void pop(
int count = 1);
160 char _resultStr[200];
162 int32 encodePtr(byte *ptr,
int type);
163 byte *decodePtr(int32 n);
165 void printExpr_internal(
char stopToken);
167 bool getVarBase(uint32 &varBase,
bool mindStop =
false,
168 uint16 *size = 0, uint16 *type = 0);
169 int cmpHelper(
const StackFrame &stackFrame);
170 void loadValue(byte operation, uint32 varBase,
const StackFrame &stackFrame);
172 void simpleArithmetic1(StackFrame &stackFrame);
173 void simpleArithmetic2(StackFrame &stackFrame);
174 bool complexArithmetic(Stack &stack, StackFrame &stackFrame, int16 brackStart);
175 void getResult(byte operation, int32 value, byte *type);
180 #endif // GOB_EXPRESSION_H
Definition: expression.h:114