From 5ba3475f93013523f7ea3eec3ea30c89315029d4 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 7 Oct 2010 11:25:09 +0000 Subject: SCI: fixing kBaseSetter on scaled views adding check, if view is scaleable also just copying nsRect now instead of recalculating - fixes lb2 regression at the docks (calling taxi hangs the game, bug #3982289) - i noticed this difference before but copying nsRect didnt work back then (i guess because of other bugs), that's why i recalculated it should get backported, but only after some more testing - maybe someone should play through lb2 again svn-id: r53045 --- engines/sci/graphics/compare.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 1991837102..6a99d2384e 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -237,20 +237,24 @@ void GfxCompare::kernelBaseSetter(reg_t object) { Common::Rect celRect; GfxView *tmpView = _cache->getView(viewId); - if (tmpView->isSci2Hires()) - _screen->adjustToUpscaledCoordinates(y, x); + if (!tmpView->isScaleable()) + scaleSignal = 0; if (scaleSignal & kScaleSignalDoScaling) { - int16 scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX)); - int16 scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY)); - tmpView->getCelScaledRect(loopNo, celNo, x, y, z, scaleX, scaleY, celRect); + celRect.left = readSelectorValue(_segMan, object, SELECTOR(nsLeft)); + celRect.right = readSelectorValue(_segMan, object, SELECTOR(nsRight)); + celRect.top = readSelectorValue(_segMan, object, SELECTOR(nsTop)); + celRect.bottom = readSelectorValue(_segMan, object, SELECTOR(nsBottom)); } else { + if (tmpView->isSci2Hires()) + _screen->adjustToUpscaledCoordinates(y, x); + tmpView->getCelRect(loopNo, celNo, x, y, z, celRect); - } - if (tmpView->isSci2Hires()) { - _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left); - _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right); + if (tmpView->isSci2Hires()) { + _screen->adjustBackUpscaledCoordinates(celRect.top, celRect.left); + _screen->adjustBackUpscaledCoordinates(celRect.bottom, celRect.right); + } } celRect.bottom = y + 1; -- cgit v1.2.3