aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Haisch2008-08-14 19:45:04 +0000
committerWillem Jan Palenstijn2011-11-20 22:43:05 +0100
commit2930003864ee02f675948a5e35cbf8ac8c4d744b (patch)
tree3d2b3e46af4e7e04d5003ce1ab3fe6167f60bf30
parente2b3a35486fb5261a2773f097d906d3e1b918f56 (diff)
downloadscummvm-rg350-2930003864ee02f675948a5e35cbf8ac8c4d744b.tar.gz
scummvm-rg350-2930003864ee02f675948a5e35cbf8ac8c4d744b.tar.bz2
scummvm-rg350-2930003864ee02f675948a5e35cbf8ac8c4d744b.zip
TOLTECS: Fixed a script bug (compare opcodes work on unsigned values). So far this caused one error I noticed when climbing up the ladder in the barn where the camera didn't scroll up properly, but now it's all fine.
-rw-r--r--engines/toltecs/script.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 495b981011..8f20b624cc 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -357,7 +357,6 @@ void ScriptInterpreter::execOpcode(byte opcode) {
break;
case 49:
ofs = readByte();
- debug(0, "49, len = %d", ofs);
_code += ofs;
break;
case 50:
@@ -383,22 +382,22 @@ void ScriptInterpreter::execOpcode(byte opcode) {
_code++;
break;
case 52:
- if (_regs.reg1 >= _regs.reg8)
+ if ((uint16)_regs.reg1 >= (uint16)_regs.reg8)
_code += 4;
_code++;
break;
case 53:
- if (_regs.reg1 <= _regs.reg8)
+ if ((uint16)_regs.reg1 <= (uint16)_regs.reg8)
_code += 4;
_code++;
break;
case 54:
- if (_regs.reg1 < _regs.reg8)
+ if ((uint16)_regs.reg1 < (uint16)_regs.reg8)
_code += 4;
_code++;
break;
case 55:
- if (_regs.reg1 > _regs.reg8)
+ if ((uint16)_regs.reg1 > (uint16)_regs.reg8)
_code += 4;
_code++;
break;