aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/cine.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/cine.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/cine.cpp')
-rw-r--r--engines/cine/cine.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 38a0eda13e..5498b0f977 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -53,9 +53,10 @@ Sound *g_sound = 0;
CineEngine *g_cine = 0;
CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
- DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
- DebugMan.addDebugChannel(kCineDebugPart, "Part", "Part debug level");
- DebugMan.addDebugChannel(kCineDebugSound, "Sound", "Sound debug level");
+ DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
+ DebugMan.addDebugChannel(kCineDebugPart, "Part", "Part debug level");
+ DebugMan.addDebugChannel(kCineDebugSound, "Sound", "Sound debug level");
+ DebugMan.addDebugChannel(kCineDebugCollision, "Collision", "Collision debug level");
_console = new CineConsole(this);
// Setup mixer
@@ -161,6 +162,7 @@ void CineEngine::initialize() {
renderer->initialize();
collisionPage = new byte[320 * 200];
+ memset(collisionPage, 0, 320 * 200);
// Clear part buffer as there's nothing loaded into it yet.
// Its size will change when loading data into it with the loadPart function.