diff options
author | Eugene Sandulenko | 2015-12-22 09:59:09 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-27 15:40:59 +0100 |
commit | 878d1dc78bf62fda3ccfc9ffb04e63f7ad7d3742 (patch) | |
tree | b13aa6b1ae719ccd0ef5816f5ed72fe2480b7a94 /engines | |
parent | 423d3642960e2187d90eae17b5ce0115b2219c48 (diff) | |
download | scummvm-rg350-878d1dc78bf62fda3ccfc9ffb04e63f7ad7d3742.tar.gz scummvm-rg350-878d1dc78bf62fda3ccfc9ffb04e63f7ad7d3742.tar.bz2 scummvm-rg350-878d1dc78bf62fda3ccfc9ffb04e63f7ad7d3742.zip |
WAGE: Fixed uservar addressing
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/script.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index 0c550da426..60a7e95e36 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -225,9 +225,7 @@ Script::Operand *Script::readOperand() { case 0xFF: { // user variable - int value = _data->readSByte(); - if (value < 0) - value += 256; + int value = _data->readByte(); // TODO: Verify that we're using the right index. return new Operand(cont->_userVariables[value - 1], Operand::NUMBER); @@ -283,13 +281,8 @@ void Script::assign(byte operandType, int uservar, uint16 value) { switch (operandType) { case 0xFF: - { - // user variable - if (uservar < 0) - uservar += 256; - - cont->_userVariables[uservar - 1] = value; - } + cont->_userVariables[uservar - 1] = value; + break; case 0xD0: cont->_statVariables[Context::PHYS_STR_BAS] = value; break; @@ -421,7 +414,7 @@ void Script::processLet() { int uservar = 0; if (operandType == 0xff) - uservar = _data->readSByte(); + uservar = _data->readByte(); _data->readByte(); // skip "=" operator do { |