diff options
author | Nicolas Bacca | 2002-03-31 08:35:42 +0000 |
---|---|---|
committer | Nicolas Bacca | 2002-03-31 08:35:42 +0000 |
commit | 8780d0e5d656b543567d7e3c0654b2ab16f83c02 (patch) | |
tree | 6ca5c9ce5ead8d49073ecc9db66571df22ac2f1f | |
parent | bbf5a49a95e2fa61ef0ef80d2df7497e9f109d8d (diff) | |
download | scummvm-rg350-8780d0e5d656b543567d7e3c0654b2ab16f83c02.tar.gz scummvm-rg350-8780d0e5d656b543567d7e3c0654b2ab16f83c02.tar.bz2 scummvm-rg350-8780d0e5d656b543567d7e3c0654b2ab16f83c02.zip |
Reswitched getVarOrDirectByte/Word to SIGNED int - fixes some disappearing objects problem due to an invalid elevation. Please yell if it breaks something else :)
svn-id: r3843
-rw-r--r-- | script_v1.cpp | 6 | ||||
-rw-r--r-- | scumm.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/script_v1.cpp b/script_v1.cpp index b8bf76390f..5142a3049b 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -2409,13 +2409,13 @@ int Scumm::getWordVararg(int16 *ptr) { return i; } -uint Scumm::getVarOrDirectWord(byte mask) { +int Scumm::getVarOrDirectWord(byte mask) { if (_opcode&mask) return readVar(fetchScriptWord()); - return (uint16)fetchScriptWord(); + return (int16)fetchScriptWord(); } -uint Scumm::getVarOrDirectByte(byte mask) { +int Scumm::getVarOrDirectByte(byte mask) { if (_opcode&mask) return readVar(fetchScriptWord()); return fetchScriptByte(); @@ -736,8 +736,8 @@ public: int fetchScriptWord(); void ignoreScriptWord() { fetchScriptWord(); } void ignoreScriptByte() { fetchScriptByte(); } - uint getVarOrDirectWord(byte mask); - uint getVarOrDirectByte(byte mask); + int getVarOrDirectWord(byte mask); + int getVarOrDirectByte(byte mask); void getResultPos(); void setResult(int result); int readVar(uint var); |