[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.236,2.237

Max Horn fingolfin at users.sourceforge.net
Thu Dec 25 14:38:00 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9522

Modified Files:
	gfx.cpp 
Log Message:
fix indirect palette cycling

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.236
retrieving revision 2.237
diff -u -d -r2.236 -r2.237
--- gfx.cpp	17 Dec 2003 17:12:09 -0000	2.236
+++ gfx.cpp	25 Dec 2003 22:36:55 -0000	2.237
@@ -2790,13 +2790,15 @@
 }
 
 /**
- * Adjust an 'indirect' color palette for the color cycling performed on its master
- * palette. An indirect palette is a palette which contains indices pointing into
- * another palette - it provides a level of indirection to map palette colors to
- * other colors. Now when the target palette is cycled, the indirect palette suddenly
- * point at the wrong color(s). This function takes care of adjusting an indirect
- * palette by searching through it and replacing all indices that are in the
- * cycle range by the new (cycled) index.
+ * Adjust an 'indirect' color palette for the color cycling performed on its
+ * master palette. An indirect palette is a palette which contains indices
+ * pointing into another palette - it provides a level of indirection to map
+ * palette colors to other colors. Now when the target palette is cycled, the
+ * indirect palette suddenly point at the wrong color(s). This function takes
+ * care of adjusting an indirect palette by searching through it and replacing
+ * all indices that are in the cycle range by the new (cycled) index.
+ *
+ * Finally, the palette entries still have to be cycled normally.
  */
 static void doCycleIndirectPalette(byte *palette, int cycleStart, int cycleEnd, bool forward) {
 	int num = cycleEnd - cycleStart + 1;
@@ -2808,6 +2810,8 @@
 			palette[i] = (palette[i] - cycleStart + offset) % num + cycleStart;
 		}
 	}
+	
+	doCyclePalette(palette, cycleStart, cycleEnd, 1, forward);
 }
 
 





More information about the Scummvm-git-logs mailing list