aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sky/logic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 41e7be8c30..20b82feafd 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -1242,7 +1242,6 @@ script:
/// low level interface to interpreter
uint16 moduleNo = scriptNo >> 12;
- debug(3, "Doing Script %x", (offset << 16) | scriptNo);
uint16 *scriptData = _moduleList[moduleNo]; // get module address
if (!scriptData) { // We need to load the script module
@@ -1252,11 +1251,13 @@ script:
uint16 *moduleStart = scriptData;
+ debug(3, "Doing Script: %d:%d:%x", moduleNo, scriptNo & 0xFFF, offset ? (offset - moduleStart[scriptNo & 0xFFF]) : 0);
+
// Check whether we have an offset or what
if (offset)
scriptData = moduleStart + offset;
else
- scriptData += scriptData[scriptNo & 0x0fff];
+ scriptData += scriptData[scriptNo & 0x0FFF];
uint32 a = 0, b = 0, c = 0;
uint16 command, s;