diff options
Diffstat (limited to 'engines/gob/parse.h')
-rw-r--r-- | engines/gob/parse.h | 98 |
1 files changed, 48 insertions, 50 deletions
diff --git a/engines/gob/parse.h b/engines/gob/parse.h index 3068991796..61ea674132 100644 --- a/engines/gob/parse.h +++ b/engines/gob/parse.h @@ -29,66 +29,63 @@ namespace Gob { enum { - OP_NEG = 1, - OP_ADD = 2, - OP_SUB = 3, - OP_BITOR = 4, - OP_MUL = 5, - OP_DIV = 6, - OP_MOD = 7, - OP_BITAND = 8, - OP_BEGIN_EXPR = 9, - OP_END_EXPR = 10, - OP_NOT = 11, - - OP_END_MARKER = 12, // Marks end of an array or string - - - OP_ARRAY_UINT8 = 16, - - OP_LOAD_VAR_INT16 = 17, - OP_LOAD_VAR_INT8 = 18, - OP_LOAD_IMM_INT32 = 19, - OP_LOAD_IMM_INT16 = 20, - OP_LOAD_IMM_INT8 = 21, - OP_LOAD_IMM_STR = 22, - - OP_LOAD_VAR_UINT32 = 23, - OP_LOAD_VAR_UINT32_AS_INT16 = 24, - OP_LOAD_VAR_STR = 25, - - OP_ARRAY_UINT32 = 26, - OP_ARRAY_UINT16 = 27, - OP_ARRAY_STR = 28, + OP_NEG = 1, + OP_ADD = 2, + OP_SUB = 3, + OP_BITOR = 4, + OP_MUL = 5, + OP_DIV = 6, + OP_MOD = 7, + OP_BITAND = 8, + OP_BEGIN_EXPR = 9, + OP_END_EXPR = 10, + OP_NOT = 11, + + OP_END_MARKER = 12, // Marks end of an array or string + + + OP_ARRAY_INT8 = 16, + OP_LOAD_VAR_INT16 = 17, + OP_LOAD_VAR_INT8 = 18, + OP_LOAD_IMM_INT32 = 19, + OP_LOAD_IMM_INT16 = 20, + OP_LOAD_IMM_INT8 = 21, + OP_LOAD_IMM_STR = 22, + OP_LOAD_VAR_INT32 = 23, + OP_LOAD_VAR_INT32_AS_INT16 = 24, + OP_LOAD_VAR_STR = 25, + OP_ARRAY_INT32 = 26, + OP_ARRAY_INT16 = 27, + OP_ARRAY_STR = 28, OP_FUNC = 29, - OP_OR = 30, // Logical OR - OP_AND = 31, // Logical AND - OP_LESS = 32, - OP_LEQ = 33, + OP_OR = 30, // Logical OR + OP_AND = 31, // Logical AND + OP_LESS = 32, + OP_LEQ = 33, OP_GREATER = 34, - OP_GEQ = 35, - OP_EQ = 36, - OP_NEQ = 37 + OP_GEQ = 35, + OP_EQ = 36, + OP_NEQ = 37 }; enum { - FUNC_SQRT1 = 0, - FUNC_SQRT2 = 1, - FUNC_SQRT3 = 6, + FUNC_SQRT1 = 0, + FUNC_SQRT2 = 1, + FUNC_SQRT3 = 6, - FUNC_SQR = 5, - FUNC_ABS = 7, - FUNC_RAND = 10 + FUNC_SQR = 5, + FUNC_ABS = 7, + FUNC_RAND = 10 }; enum { // FIXME: The following two 'truth values' are stored inside the list - // of "operators". So they somehow coincide with OP_LOAD_VAR_UINT32 - // and OP_LOAD_VAR_UINT32_AS_UINT16. I haven't yet quite understood + // of "operators". So they somehow coincide with OP_LOAD_VAR_INT32 + // and OP_LOAD_VAR_INT32_AS_INT16. I haven't yet quite understood // how, resp. what that means. You have been warned. - GOB_TRUE = 24, + GOB_TRUE = 24, GOB_FALSE = 23 }; @@ -107,9 +104,9 @@ public: private: enum PointerType { - kExecPtr = 0, + kExecPtr = 0, kInterVar = 1, - kResStr = 2 + kResStr = 2 }; GobEngine *_vm; @@ -121,7 +118,8 @@ private: int cmpHelper(byte *operPtr, int32 *valPtr); - bool getVarBase(uint32 &varBase, bool mindStop = false, uint16 *size = 0, uint16 *type = 0); + bool getVarBase(uint32 &varBase, bool mindStop = false, + uint16 *size = 0, uint16 *type = 0); }; } // End of namespace Gob |