aboutsummaryrefslogtreecommitdiff
path: root/graphics/palette.h
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-13 14:29:00 +0100
committerJohannes Schickel2011-02-14 17:08:31 +0100
commit18ff02a2fa0469eaf6e4bc608ad37243937a054e (patch)
tree1166463f0dcddaf1de001c73c45f962ca6f4eabf /graphics/palette.h
parente0430e6e9e3c08167d48df9540f61843c3faac80 (diff)
downloadscummvm-rg350-18ff02a2fa0469eaf6e4bc608ad37243937a054e.tar.gz
scummvm-rg350-18ff02a2fa0469eaf6e4bc608ad37243937a054e.tar.bz2
scummvm-rg350-18ff02a2fa0469eaf6e4bc608ad37243937a054e.zip
GRAPHICS: Update PaletteManager documentation for RGBA->RGB change.
Diffstat (limited to 'graphics/palette.h')
-rw-r--r--graphics/palette.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/graphics/palette.h b/graphics/palette.h
index 72db16a3d3..2a4fdb656a 100644
--- a/graphics/palette.h
+++ b/graphics/palette.h
@@ -46,12 +46,12 @@ public:
* The palette entries from 'start' till (start+num-1) will be replaced - so
* a full palette update is accomplished via start=0, num=256.
*
- * The palette data is specified in interleaved RGBA format. That is, the
+ * The palette data is specified in interleaved RGB format. That is, the
* first byte of the memory block 'colors' points at is the red component
* of the first new color; the second byte the green component of the first
* new color; the third byte the blue component, the last byte to the alpha
* (transparency) value. Then the second color starts, and so on. So memory
- * looks like this: R1-G1-B1-A1-R2-G2-B2-A2-R3-...
+ * looks like this: R1-G1-B1-R2-G2-B2-R3-...
*
* @param colors the new palette data, in interleaved RGBA format
* @param start the first palette entry to be updated
@@ -79,16 +79,15 @@ public:
* For example, for every valid value of start and num of the following
* code:
*
- * byte origPal[num*4];
+ * byte origPal[num*3];
* // Setup origPal's data however you like
* g_system->setPalette(origPal, start, num);
- * byte obtainedPal[num*4];
+ * byte obtainedPal[num*3];
* 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)
+ * memcmp(origPal, obtainedPal, num*3) == 0
*
* @see setPalette
* @param colors the palette data, in interleaved RGBA format