diff options
author | Eugene Sandulenko | 2013-08-08 01:14:24 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:11 +0300 |
commit | 1d55aa0c6ecade00b1b31932a86dd2f97b377882 (patch) | |
tree | 2b26bf245f5fba5ff5d717e19817a998814f0a24 /engines/fullpipe/statics.cpp | |
parent | ea91b8f7998cc4a06f4f5d8732a1b9b0309d95d2 (diff) | |
download | scummvm-rg350-1d55aa0c6ecade00b1b31932a86dd2f97b377882.tar.gz scummvm-rg350-1d55aa0c6ecade00b1b31932a86dd2f97b377882.tar.bz2 scummvm-rg350-1d55aa0c6ecade00b1b31932a86dd2f97b377882.zip |
FULLPIPE: Attempt to fix crash on SC_1 startup. Domino is missing
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r-- | engines/fullpipe/statics.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6939005b22..e64c3d2dfc 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -272,18 +272,23 @@ void StaticANIObject::draw() { Common::Point point; Common::Rect rect; - debug(0, "StaticANIObject::draw()"); + debug(0, "StaticANIObject::draw() (%s) [%d]", transCyrillic((byte *)_objectName), _id); if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows && (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) { DynamicPhase *dyn; - if (!_movement || _flags & 0x20 ) + if (!_movement || _flags & 0x20) dyn = _statics; else dyn = _movement->_currDynamicPhase; + if (!dyn) { + warning("HACK: StaticANIObject::draw(): dyn is missing"); + return; + } + if (dyn->getDynFlags() & 4) { rect = *dyn->_rect; @@ -410,6 +415,8 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { return false; } + debug(0, "StaticANIObject::setPicAniInfo() (%s [%d])", transCyrillic((byte *)_objectName), _id); + if (picAniInfo->type & 3) { setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; @@ -421,10 +428,11 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { if (picAniInfo->type & 1) { _messageQueueId = picAniInfo->type >> 16; - if (picAniInfo->staticsId) + if (picAniInfo->staticsId) { _statics = getStaticsById(picAniInfo->staticsId); - else + } else { _statics = 0; + } if (picAniInfo->movementId) { _movement = getMovementById(picAniInfo->movementId); |