[Scummvm-cvs-logs] scummvm master -> 8cfcf53b88df94e588f560bc3ecdbf1879fda6e2
bluegr
md5 at scummvm.org
Fri Mar 4 10:45:48 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8cfcf53b88 TESTBED: Update rotatePalette() to use an RGB palette
Commit: 8cfcf53b88df94e588f560bc3ecdbf1879fda6e2
https://github.com/scummvm/scummvm/commit/8cfcf53b88df94e588f560bc3ecdbf1879fda6e2
Author: md5 (md5 at scummvm.org)
Date: 2011-03-04T01:44:30-08:00
Commit Message:
TESTBED: Update rotatePalette() to use an RGB palette
Changed paths:
engines/testbed/graphics.cpp
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index a0e2754..3cdff5f 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -229,16 +229,16 @@ void rotatePalette(byte *palette, int size) {
// Rotate the colors starting from address palette "size" times
// take a temporary palette color
- byte tColor[4] = {0};
+ byte tColor[3] = {0};
// save first color in it.
- memcpy(tColor, &palette[0], 4 * sizeof(byte));
+ memcpy(tColor, &palette[0], 3 * sizeof(byte));
// Move each color upward by 1
for (int i = 0; i < size - 1; i++) {
- memcpy(&palette[i * 4], &palette[(i + 1) * 4], 4 * sizeof(byte));
+ memcpy(&palette[i * 3], &palette[(i + 1) * 3], 3 * sizeof(byte));
}
// Assign last color to tcolor
- memcpy(&palette[(size - 1) * 4], tColor, 4 * sizeof(byte));
+ memcpy(&palette[(size - 1) * 3], tColor, 3 * sizeof(byte));
}
/**
More information about the Scummvm-git-logs
mailing list