[Scummvm-cvs-logs] SF.net SVN: scummvm:[53045] scummvm/trunk/engines/sci/graphics/compare.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Oct 7 13:25:09 CEST 2010


Revision: 53045
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53045&view=rev
Author:   m_kiewitz
Date:     2010-10-07 11:25:09 +0000 (Thu, 07 Oct 2010)

Log Message:
-----------
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

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/compare.cpp

Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp	2010-10-07 09:18:40 UTC (rev 53044)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp	2010-10-07 11:25:09 UTC (rev 53045)
@@ -237,20 +237,24 @@
 		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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list