diff options
author | Sven Hesse | 2009-09-04 21:38:28 +0000 |
---|---|---|
committer | Sven Hesse | 2009-09-04 21:38:28 +0000 |
commit | d46ca7a5e30371e33b38c648291b3ee3fef32c5d (patch) | |
tree | 047c7dd7ca98130f1bf1cf0b84e7c3c0eeea0919 | |
parent | 033bedd9061654ae8605ab88e478cfbc258ebc91 (diff) | |
download | scummvm-rg350-d46ca7a5e30371e33b38c648291b3ee3fef32c5d.tar.gz scummvm-rg350-d46ca7a5e30371e33b38c648291b3ee3fef32c5d.tar.bz2 scummvm-rg350-d46ca7a5e30371e33b38c648291b3ee3fef32c5d.zip |
Some more int16->uint16 changes, to accommodate for Playtoons larger variable space
svn-id: r43950
-rw-r--r-- | engines/gob/expression.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/gob/expression.cpp b/engines/gob/expression.cpp index 789ac3211d..7e96a7d932 100644 --- a/engines/gob/expression.cpp +++ b/engines/gob/expression.cpp @@ -623,15 +623,15 @@ int16 Expression::parseVarIndex(uint16 *size, uint16 *type) { return varBase + offset * _vm->_global->_inter_animDataSize + temp; case OP_LOAD_VAR_INT16: - return varBase + _vm->_game->_script->readInt16() * 2; + return varBase + _vm->_game->_script->readUint16() * 2; case OP_LOAD_VAR_INT8: - return varBase + _vm->_game->_script->readInt16(); + return varBase + _vm->_game->_script->readUint16(); case OP_LOAD_VAR_INT32: case OP_LOAD_VAR_INT32_AS_INT16: case OP_LOAD_VAR_STR: - temp = _vm->_game->_script->readInt16() * 4; + temp = _vm->_game->_script->readUint16() * 4; debugC(5, kDebugExpression, "oper = %d", _vm->_game->_script->peekInt16()); if ((operation == OP_LOAD_VAR_STR) && (_vm->_game->_script->peekByte() == 13)) { _vm->_game->_script->skip(1); @@ -701,12 +701,12 @@ void Expression::loadValue(byte operation, uint32 varBase, const StackFrame &sta case OP_LOAD_VAR_INT16: *stackFrame.opers = OP_LOAD_IMM_INT16; - *stackFrame.values = (int16) READ_VARO_UINT16(varBase + _vm->_game->_script->readInt16() * 2); + *stackFrame.values = (int16) READ_VARO_UINT16(varBase + _vm->_game->_script->readUint16() * 2); break; case OP_LOAD_VAR_INT8: *stackFrame.opers = OP_LOAD_IMM_INT16; - *stackFrame.values = (int8) READ_VARO_UINT8(varBase + _vm->_game->_script->readInt16()); + *stackFrame.values = (int8) READ_VARO_UINT8(varBase + _vm->_game->_script->readUint16()); break; case OP_LOAD_IMM_INT32: @@ -731,17 +731,17 @@ void Expression::loadValue(byte operation, uint32 varBase, const StackFrame &sta case OP_LOAD_VAR_INT32: *stackFrame.opers = OP_LOAD_IMM_INT16; - *stackFrame.values = READ_VARO_UINT32(varBase + _vm->_game->_script->readInt16() * 4); + *stackFrame.values = READ_VARO_UINT32(varBase + _vm->_game->_script->readUint16() * 4); break; case OP_LOAD_VAR_INT32_AS_INT16: *stackFrame.opers = OP_LOAD_IMM_INT16; - *stackFrame.values = (int16) READ_VARO_UINT16(varBase + _vm->_game->_script->readInt16() * 4); + *stackFrame.values = (int16) READ_VARO_UINT16(varBase + _vm->_game->_script->readUint16() * 4); break; case OP_LOAD_VAR_STR: *stackFrame.opers = OP_LOAD_IMM_STR; - temp = _vm->_game->_script->readInt16() * 4; + temp = _vm->_game->_script->readUint16() * 4; *stackFrame.values = encodePtr(_vm->_inter->_variables->getAddressOff8(varBase + temp), kInterVar); if (_vm->_game->_script->peekByte() == 13) { _vm->_game->_script->skip(1); |