diff options
author | Paul Gilbert | 2013-11-12 21:50:52 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-11-12 21:50:52 -0500 |
commit | 4f7913c3553a0294675b46a9ccbbee19fceecb8d (patch) | |
tree | 5fbc58fb936ce48288d377cc07ed65428e3ce55d /engines/tsage | |
parent | 2b8281b3190d17a7a0769f04926d6b6ecd267b3a (diff) | |
download | scummvm-rg350-4f7913c3553a0294675b46a9ccbbee19fceecb8d.tar.gz scummvm-rg350-4f7913c3553a0294675b46a9ccbbee19fceecb8d.tar.bz2 scummvm-rg350-4f7913c3553a0294675b46a9ccbbee19fceecb8d.zip |
TSAGE: R2R Fix for restoriong scenes with objects using a shadow map
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/core.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index f2744d5bf8..040dbc8c25 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2737,15 +2737,16 @@ void SceneObject::reposition() { */ void SceneObject::draw() { Rect destRect = _bounds; - destRect.translate(-g_globals->_sceneManager._scene->_sceneBounds.left, - -g_globals->_sceneManager._scene->_sceneBounds.top); + Scene *scene = g_globals->_sceneManager._scene; + destRect.translate(-scene->_sceneBounds.left, -scene->_sceneBounds.top); GfxSurface frame = getFrame(); - Region *priorityRegion = g_globals->_sceneManager._scene->_priorities.find(_priority); + Region *priorityRegion = scene->_priorities.find(_priority); if (g_vm->getGameID() == GType_Ringworld2) { switch (_effect) { case EFFECT_SHADOW_MAP: { - assert(_shadowMap); + if (!_shadowMap) + _shadowMap = static_cast<Ringworld2::SceneExt *>(scene)->_shadowPaletteMap; GLOBALS.gfxManager().getSurface().copyFrom(frame, frame.getBounds(), destRect, priorityRegion, _shadowMap); |