aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script_v1.cpp6
-rw-r--r--scumm.h4
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();
diff --git a/scumm.h b/scumm.h
index dfc8fb72e4..7d5f1b76b4 100644
--- a/scumm.h
+++ b/scumm.h
@@ -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);