TSAGE: R2R Fix for restoriong scenes with objects using a shadow map
This commit is contained in:
parent
2b8281b319
commit
4f7913c355
1 changed files with 5 additions and 4 deletions
|
@ -2737,15 +2737,16 @@ void SceneObject::reposition() {
|
||||||
*/
|
*/
|
||||||
void SceneObject::draw() {
|
void SceneObject::draw() {
|
||||||
Rect destRect = _bounds;
|
Rect destRect = _bounds;
|
||||||
destRect.translate(-g_globals->_sceneManager._scene->_sceneBounds.left,
|
Scene *scene = g_globals->_sceneManager._scene;
|
||||||
-g_globals->_sceneManager._scene->_sceneBounds.top);
|
destRect.translate(-scene->_sceneBounds.left, -scene->_sceneBounds.top);
|
||||||
GfxSurface frame = getFrame();
|
GfxSurface frame = getFrame();
|
||||||
Region *priorityRegion = g_globals->_sceneManager._scene->_priorities.find(_priority);
|
Region *priorityRegion = scene->_priorities.find(_priority);
|
||||||
|
|
||||||
if (g_vm->getGameID() == GType_Ringworld2) {
|
if (g_vm->getGameID() == GType_Ringworld2) {
|
||||||
switch (_effect) {
|
switch (_effect) {
|
||||||
case EFFECT_SHADOW_MAP: {
|
case EFFECT_SHADOW_MAP: {
|
||||||
assert(_shadowMap);
|
if (!_shadowMap)
|
||||||
|
_shadowMap = static_cast<Ringworld2::SceneExt *>(scene)->_shadowPaletteMap;
|
||||||
|
|
||||||
GLOBALS.gfxManager().getSurface().copyFrom(frame, frame.getBounds(),
|
GLOBALS.gfxManager().getSurface().copyFrom(frame, frame.getBounds(),
|
||||||
destRect, priorityRegion, _shadowMap);
|
destRect, priorityRegion, _shadowMap);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue