diff options
author | Johannes Schickel | 2011-02-13 20:45:54 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-14 17:08:33 +0100 |
commit | 02f93b4aeb1e80cff4c0bdb88004f1dd2de65228 (patch) | |
tree | b4536de6dab14bb8a5622a7e6c2fba72821779d4 | |
parent | 362b0cd5e4a71a0b2610ff8abb6aeecddc842cf0 (diff) | |
download | scummvm-rg350-02f93b4aeb1e80cff4c0bdb88004f1dd2de65228.tar.gz scummvm-rg350-02f93b4aeb1e80cff4c0bdb88004f1dd2de65228.tar.bz2 scummvm-rg350-02f93b4aeb1e80cff4c0bdb88004f1dd2de65228.zip |
TESTBED: Adapt to setPalette RGBA->RGB change.
-rw-r--r-- | engines/testbed/graphics.cpp | 22 | ||||
-rw-r--r-- | engines/testbed/graphics.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index ed51b33e94..a0e2754fe4 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -38,7 +38,7 @@ namespace Testbed { -byte GFXTestSuite::_palette[256 * 4] = {0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0}; +byte GFXTestSuite::_palette[256 * 3] = {0, 0, 0, 255, 255, 255, 255, 255, 255}; GFXTestSuite::GFXTestSuite() { // Initialize color palettes @@ -79,12 +79,12 @@ GFXTestSuite::GFXTestSuite() { } void GFXTestSuite::setCustomColor(uint r, uint g, uint b) { - _palette[8] = r; - _palette[9] = g; - _palette[10] = b; + _palette[6] = r; + _palette[7] = g; + _palette[8] = b; // Set colorNum kColorSpecial with a special color. - int absIndx = kColorSpecial * 4; + int absIndx = kColorSpecial * 3; _palette[absIndx + 1] = 173; _palette[absIndx + 2] = 255; _palette[absIndx + 3] = 47; @@ -94,12 +94,12 @@ void GFXTestSuite::setCustomColor(uint r, uint g, uint b) { // Helper functions used by GFX tests void GFXtests::initMousePalette() { - byte palette[3 * 4]; // Black, white and yellow + byte palette[3 * 3]; // Black, white and yellow palette[0] = palette[1] = palette[2] = 0; - palette[4] = palette[5] = palette[6] = 255; - palette[8] = palette[9] = 255; - palette[10] = 0; + palette[3] = palette[4] = palette[5] = 255; + palette[6] = palette[7] = 255; + palette[8] = 0; CursorMan.replaceCursorPalette(palette, 0, 3); } @@ -968,14 +968,14 @@ TestExitStatus GFXtests::paletteRotation() { Testsuite::clearEntireScreen(); // Use 256 colors - byte palette[256 * 4] = {0}; + byte palette[256 * 3] = {0}; int r, g, b; int colIndx; for (int i = 0; i < 256; i++) { HSVtoRGB(r, g, b, i, 1, 1); - colIndx = i * 4; + colIndx = i * 3; palette[colIndx] = r; palette[colIndx + 1] = g; palette[colIndx + 2] = b; diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h index 4ab4ba65ab..01c76efea5 100644 --- a/engines/testbed/graphics.h +++ b/engines/testbed/graphics.h @@ -86,7 +86,7 @@ private: * 2 (R:255, G:255, B:255) your customized color (by default white) (kColorCustom) * The remaining values are zero */ - static byte _palette[256 * 4]; + static byte _palette[256 * 3]; }; } // End of namespace Testbed |