diff options
author | Julien | 2011-06-07 03:50:03 -0400 |
---|---|---|
committer | Julien | 2011-06-07 03:59:12 -0400 |
commit | 55f46a13767e75ffe40582c35a22bbccbb7b1568 (patch) | |
tree | 96a9449df6c48ef1fe8784c7afd374af05c6359d /engines/testbed | |
parent | 3e1c4f8e1624f645c77e1105742ed56e36a1d6f7 (diff) | |
download | scummvm-rg350-55f46a13767e75ffe40582c35a22bbccbb7b1568.tar.gz scummvm-rg350-55f46a13767e75ffe40582c35a22bbccbb7b1568.tar.bz2 scummvm-rg350-55f46a13767e75ffe40582c35a22bbccbb7b1568.zip |
TESTBED: Fix GFXtests::HSVtoRGB() and caller
- update passed values and not local variables when s == 0
- initialize r, g, b values in palette rotation test instead of passing unitialized variables
Diffstat (limited to 'engines/testbed')
-rw-r--r-- | engines/testbed/graphics.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 5b30b3c6ee..36ec726fc7 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -137,7 +137,7 @@ void GFXtests::HSVtoRGB(int &rComp, int &gComp, int &bComp, int hue, int sat, in float f, p, q, t; if (s == 0) { - r = g = b = v * 255; + rComp = gComp = bComp = (int)(v * 255); return; } @@ -969,6 +969,7 @@ TestExitStatus GFXtests::paletteRotation() { byte palette[256 * 3] = {0}; int r, g, b; + r = g = b = 0; int colIndx; for (int i = 0; i < 256; i++) { |