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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Jan 15 22:13:34 CET 2010


Revision: 47311
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47311&view=rev
Author:   m_kiewitz
Date:     2010-01-15 21:13:33 +0000 (Fri, 15 Jan 2010)

Log Message:
-----------
SCI: adding caching for scalesignal, scaleX and scaleY within kAnimate()

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/animate.cpp
    scummvm/trunk/engines/sci/graphics/helpers.h

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-01-15 20:01:55 UTC (rev 47310)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-01-15 21:13:33 UTC (rev 47311)
@@ -158,6 +158,16 @@
 		listEntry->z = GET_SEL32V(_s->_segMan, curObject, z);
 		listEntry->priority = GET_SEL32V(_s->_segMan, curObject, priority);
 		listEntry->signal = GET_SEL32V(_s->_segMan, curObject, signal);
+		if (getSciVersion() >= SCI_VERSION_1_1) {
+			// Cel scaling
+			listEntry->scaleSignal = GET_SEL32V(_s->_segMan, curObject, scalesignal);
+			listEntry->scaleX = GET_SEL32V(_s->_segMan, curObject, scaleX);
+			listEntry->scaleY = GET_SEL32V(_s->_segMan, curObject, scaleY);
+		} else {
+			listEntry->scaleSignal = 0;
+			listEntry->scaleX = 128;
+			listEntry->scaleY = 128;
+		}
 		// listEntry->celRect is filled in AnimateFill()
 		listEntry->showBitsFlag = false;
 
@@ -347,7 +357,6 @@
 	reg_t bitsHandle;
 	AnimateList::iterator listIterator;
 	AnimateList::iterator listEnd = _list.end();
-	uint16 scaleX = 128, scaleY = 128;	// no scaling
 	_lastCastCount = 0;
 
 	listIterator = _list.begin();
@@ -361,14 +370,8 @@
 			bitsHandle = _gfx->BitsSave(listEntry->celRect, SCI_SCREEN_MASK_ALL);
 			PUT_SEL32(_s->_segMan, curObject, underBits, bitsHandle);
 
-			if (getSciVersion() >= SCI_VERSION_1_1) {
-				// View scaling
-				scaleX = GET_SEL32V(_s->_segMan, curObject, scaleX);
-				scaleY = GET_SEL32V(_s->_segMan, curObject, scaleY);
-			}
-
 			// draw corresponding cel
-			_gfx->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo, scaleX, scaleY);
+			_gfx->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo, listEntry->scaleX, listEntry->scaleY);
 			listEntry->showBitsFlag = true;
 
 			if (signal & kSignalRemoveView) {

Modified: scummvm/trunk/engines/sci/graphics/helpers.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/helpers.h	2010-01-15 20:01:55 UTC (rev 47310)
+++ scummvm/trunk/engines/sci/graphics/helpers.h	2010-01-15 21:13:33 UTC (rev 47311)
@@ -87,6 +87,9 @@
 	int16 x, y, z;
 	int16 priority;
 	uint16 signal;
+	uint16 scaleSignal;
+	int16 scaleX;
+	int16 scaleY;
 	Common::Rect celRect;
 	bool showBitsFlag;
 	reg_t castHandle;


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