aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-02-26 22:15:22 +1100
committerPaul Gilbert2011-02-26 22:15:22 +1100
commit3a601812d22afdb0178ffd261a864a0a9e3cc88a (patch)
tree3e32daf936e5791530a8d896adfe6eeed9889501
parent597984abc32f04ba1209e3b7dcc671ba951110b0 (diff)
downloadscummvm-rg350-3a601812d22afdb0178ffd261a864a0a9e3cc88a.tar.gz
scummvm-rg350-3a601812d22afdb0178ffd261a864a0a9e3cc88a.tar.bz2
scummvm-rg350-3a601812d22afdb0178ffd261a864a0a9e3cc88a.zip
TSAGE: Bugfixes for drawing objects in wide screen areas
-rw-r--r--engines/tsage/core.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 9f20ea398f..96723570fc 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2138,18 +2138,18 @@ void SceneObject::draw() {
* in case it is moving
*/
void SceneObject::updateScreen() {
- Rect objRect = _paneRects[CURRENT_PANENUM];
+ Rect srcRect = _paneRects[CURRENT_PANENUM];
const Rect &sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
- objRect.left = (objRect.left / 4) * 4;
- objRect.right = ((objRect.right + 3) / 4) * 4;
- objRect.clip(_globals->_sceneManager._scene->_sceneBounds);
+ srcRect.left = (srcRect.left / 4) * 4;
+ srcRect.right = ((srcRect.right + 3) / 4) * 4;
+ srcRect.clip(_globals->_sceneManager._scene->_sceneBounds);
- if (objRect.isValidRect()) {
- Rect tempRect = objRect;
- tempRect.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y);
- objRect.translate(-sceneBounds.left, -sceneBounds.top);
+ if (srcRect.isValidRect()) {
+ Rect destRect = srcRect;
+ destRect.translate(-_globals->_sceneOffset.x, -_globals->_sceneOffset.y);
+ destRect.translate(-sceneBounds.left, -sceneBounds.top);
- _globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface, objRect, tempRect);
+ _globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface, srcRect, destRect);
}
}
@@ -2280,6 +2280,7 @@ redraw:
// Update the palette
_globals->_sceneManager.fadeInIfNecessary();
+ _globals->_sceneManager._scene->_sceneMode = 0;
_globals->_paneRefreshFlag[paneNum] = 0;
// Loop through the object list, removing any objects and refreshing the screen as necessary