[Scummvm-cvs-logs] SF.net SVN: scummvm:[54978] scummvm/trunk/common/system.h

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Dec 20 18:28:17 CET 2010


Revision: 54978
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54978&view=rev
Author:   lordhoto
Date:     2010-12-20 17:28:17 +0000 (Mon, 20 Dec 2010)

Log Message:
-----------
OSYSTEM: Clarify grabPalette documentation after talking with Max about it.

Modified Paths:
--------------
    scummvm/trunk/common/system.h

Modified: scummvm/trunk/common/system.h
===================================================================
--- scummvm/trunk/common/system.h	2010-12-20 17:25:58 UTC (rev 54977)
+++ scummvm/trunk/common/system.h	2010-12-20 17:28:17 UTC (rev 54978)
@@ -548,6 +548,23 @@
 	 * Grabs a specified part of the currently active palette.
 	 * The format is the same as for setPalette.
 	 *
+	 * This should return exactly the same RGB data as was setup via previous
+	 * setPalette calls.
+	 *
+	 * For example, for every valid value of start and num of the following
+	 * code:
+	 *
+	 * byte origPal[num*4];
+	 * // Setup origPal's data however you like
+	 * g_system->setPalette(origPal, start, num);
+	 * byte obtainedPal[num*4];
+	 * g_system->grabPalette(obtainedPal, start, num);
+	 *
+	 * the following should be true:
+	 *
+	 * For each i < num : memcmp(&origPal[i*4], &obtainedPal[i*4], 3) == 0
+	 * (i is an uint here)
+	 *
 	 * @see setPalette
 	 * @param colors	the palette data, in interleaved RGBA format
 	 * @param start		the first platte entry to be read


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