diff options
author | Filippos Karapetis | 2012-06-22 09:43:44 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-22 09:43:44 +0300 |
commit | 547fdfe12a3b999473304925bf80ae1afda5f8d6 (patch) | |
tree | eb794c70133854a198fd6fa547e8a837ba5047e9 /engines | |
parent | 08124396035e8fd0996c9d347be3d606a58ecd1f (diff) | |
download | scummvm-rg350-547fdfe12a3b999473304925bf80ae1afda5f8d6.tar.gz scummvm-rg350-547fdfe12a3b999473304925bf80ae1afda5f8d6.tar.bz2 scummvm-rg350-547fdfe12a3b999473304925bf80ae1afda5f8d6.zip |
SCI: Further cleanup of the frame drawing code
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 0681102863..265a175e66 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -648,15 +648,14 @@ void GfxFrameout::kernelFrameout() { drawPicture(itemEntry, it->planeOffsetX, it->planeOffsetY, it->planePictureMirrored); } else { GfxView *view = (itemEntry->viewId != 0xFFFF) ? _cache->getView(itemEntry->viewId) : NULL; - + int16 dummyX = 0; + if (view && view->isSci2Hires()) { - int16 dummyX = 0; view->adjustToUpscaledCoordinates(itemEntry->y, itemEntry->x); view->adjustToUpscaledCoordinates(itemEntry->z, dummyX); } else if (getSciVersion() == SCI_VERSION_2_1) { _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); - int16 tmpVal = 0; - _coordAdjuster->fromScriptToDisplay(itemEntry->z, tmpVal); + _coordAdjuster->fromScriptToDisplay(itemEntry->z, dummyX); } // Adjust according to current scroll position @@ -707,17 +706,9 @@ void GfxFrameout::kernelFrameout() { g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect); } - int16 screenHeight = _screen->getHeight(); - int16 screenWidth = _screen->getWidth(); - if (view && view->isSci2Hires()) { - screenHeight = _screen->getDisplayHeight(); - screenWidth = _screen->getDisplayWidth(); - } - - if (itemEntry->celRect.bottom < 0 || itemEntry->celRect.top >= screenHeight) - continue; - - if (itemEntry->celRect.right < 0 || itemEntry->celRect.left >= screenWidth) + // FIXME: When does this happen, and why? + if (itemEntry->celRect.bottom < 0 || itemEntry->celRect.top >= _screen->getDisplayHeight() || + itemEntry->celRect.right < 0 || itemEntry->celRect.left >= _screen->getDisplayWidth()) continue; Common::Rect clipRect, translatedClipRect; |