[Scummvm-cvs-logs] CVS: scummvm/bs2/driver palette.cpp,1.11,1.12

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Aug 26 08:22:31 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv5216/driver

Modified Files:
	palette.cpp 
Log Message:
Handle the fadeNow parameter to BS2_SetPalette() so that the palette is
only uploaded to the backend if fadeNow == RDPAL_INSTANT. Otherwise, assume
that FadeServer() will do it for us, eventually.

I think this is the correct behaviour, and it prevents the bug where the
unfaded room image might flash by briefly when moving the mouse while
changing rooms.


Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/palette.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- palette.cpp	25 Aug 2003 06:13:28 -0000	1.11
+++ palette.cpp	26 Aug 2003 15:19:29 -0000	1.12
@@ -325,10 +325,9 @@
 		return RD_OK;
 	}
 
-	// FIXME: Handle the fadeNow parameter
-
 	memcpy(&palCopy[startEntry][0], colourTable, noEntries * 4);
-	g_sword2->_system->set_palette((byte *) palCopy, startEntry, noEntries);
+	if (fadeNow == RDPAL_INSTANT)
+		g_sword2->_system->set_palette((byte *) palCopy, startEntry, noEntries);
 
 /*
 





More information about the Scummvm-git-logs mailing list