aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/script_fw.cpp
diff options
context:
space:
mode:
authorDavid Turner2010-12-31 09:14:49 +0000
committerDavid Turner2010-12-31 09:14:49 +0000
commitf96c8f6e39e39a92adfeeb07db78861ee7383226 (patch)
treefcd696c763ed2b86b3bd11c8d58ec31db0cb5fb9 /engines/cine/script_fw.cpp
parentc9330fb79eb5703aa3fccfe31a4631209ceecbc0 (diff)
downloadscummvm-rg350-f96c8f6e39e39a92adfeeb07db78861ee7383226.tar.gz
scummvm-rg350-f96c8f6e39e39a92adfeeb07db78861ee7383226.tar.bz2
scummvm-rg350-f96c8f6e39e39a92adfeeb07db78861ee7383226.zip
CINE: Fix CollisionPage Uninitialised Reads in Operation Stealth.
The collisionPage is only initialised with values when loadCtFw() / loadCtOS() is called. However, currently during the display of the Delphine Software Logo in Operation Stealth, checkCollision() is called, but the collisionPage has not been loaded. To fix the invalid reads, have added code to set the page to zero after allocation. Shouldn't cause any issues to FW as this will load over the top anyway. Have also added debug output around this behaviour so that if this is not sufficient i.e. a collision page load is actually missing, then this will aid investigation. svn-id: r55071
Diffstat (limited to 'engines/cine/script_fw.cpp')
-rw-r--r--engines/cine/script_fw.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index 7bd0d99e46..3574a1b73a 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -1915,6 +1915,7 @@ int16 getZoneFromPositionRaw(byte *page, int16 x, int16 y, int16 width) {
}
int16 checkCollision(int16 objIdx, int16 x, int16 y, int16 numZones, int16 zoneIdx) {
+ debugC(1, kCineDebugCollision, "checkCollision(objIdx: %d x: %d y:%d numZones:%d zoneIdx: %d)", objIdx, x, y, numZones, zoneIdx);
int16 lx = g_cine->_objectTable[objIdx].x + x;
int16 ly = g_cine->_objectTable[objIdx].y + y;
int16 idx;