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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Aug 10 19:16:38 CEST 2010


Revision: 51954
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51954&view=rev
Author:   m_kiewitz
Date:     2010-08-10 17:16:38 +0000 (Tue, 10 Aug 2010)

Log Message:
-----------
SCI: kAddToPic(list) set fixed priority flag

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

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-08-10 16:24:00 UTC (rev 51953)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-08-10 17:16:38 UTC (rev 51954)
@@ -518,6 +518,19 @@
 	}
 }
 
+void GfxAnimate::preprocessAddToPicList() {
+	AnimateList::iterator it;
+	const AnimateList::iterator end = _list.end();
+
+	for (it = _list.begin(); it != end; ++it) {
+		if (it->priority == -1)
+			it->priority = _ports->kernelCoordinateToPriority(it->y);
+
+		// Do not allow priority to get changed by fill()
+		it->signal |= kSignalFixedPriority;
+	}
+}
+
 void GfxAnimate::addToPicDrawCels() {
 	reg_t curObject;
 	GfxView *view = NULL;
@@ -527,9 +540,6 @@
 	for (it = _list.begin(); it != end; ++it) {
 		curObject = it->object;
 
-		if (it->priority == -1)
-			it->priority = _ports->kernelCoordinateToPriority(it->y);
-
 		// Get the corresponding view
 		view = _cache->getView(it->viewId);
 
@@ -687,6 +697,7 @@
 		error("kAddToPic called with non-list as parameter");
 
 	makeSortedList(list);
+	preprocessAddToPicList();
 	fill(tempPicNotValid);
 	addToPicDrawCels();
 

Modified: scummvm/trunk/engines/sci/graphics/animate.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.h	2010-08-10 16:24:00 UTC (rev 51953)
+++ scummvm/trunk/engines/sci/graphics/animate.h	2010-08-10 17:16:38 UTC (rev 51954)
@@ -100,6 +100,7 @@
 	void updateScreen(byte oldPicNotValid);
 	void restoreAndDelete(int argc, reg_t *argv);
 	void reAnimate(Common::Rect rect);
+	void preprocessAddToPicList();
 	void addToPicDrawCels();
 	void addToPicDrawView(GuiResourceId viewId, int16 loopNo, int16 celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
 


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