diff options
author | Johannes Schickel | 2015-11-16 16:08:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-11-16 16:28:01 +0100 |
commit | 1c7a5e5a0108e9368d24f381858e050277499432 (patch) | |
tree | de75ee23e066636ecdc487517bf9c853cd86e53a /graphics/pixelformat.cpp | |
parent | eee8ef9dce40c3f5be80f38822fe7e37ddadb432 (diff) | |
download | scummvm-rg350-1c7a5e5a0108e9368d24f381858e050277499432.tar.gz scummvm-rg350-1c7a5e5a0108e9368d24f381858e050277499432.tar.bz2 scummvm-rg350-1c7a5e5a0108e9368d24f381858e050277499432.zip |
GRAPHICS: Fix component order in PixelFormat::toString output.
Formerly components were printed from bottom to top, common notation is from
top to bottom. For reference check how we name formats, like in for example:
backends/graphics/openglsdl/openglsdl-graphics.cpp:190-230
backends/graphics/surfacesdl/surfacesdl-graphics.cpp:409-490
sherlock/scalpel/scalpel.cpp:207
Diffstat (limited to 'graphics/pixelformat.cpp')
-rw-r--r-- | graphics/pixelformat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/pixelformat.cpp b/graphics/pixelformat.cpp index a712813b45..7443aabe2a 100644 --- a/graphics/pixelformat.cpp +++ b/graphics/pixelformat.cpp @@ -42,18 +42,18 @@ Common::String PixelFormat::toString() const { for (int c = 0; c < 4; c++) { int compPos = -1; - int minshift = 100; + int maxshift = -1; - // Find minimal component + // Find maximal component for (int i = 0; i < 4; i++) - if (component[i] >= 0 && component[i] < minshift) { - minshift = component[i]; + if (component[i] >= 0 && component[i] > maxshift) { + maxshift = component[i]; compPos = i; } // Clean duplicates for (int i = 0; i < 4; i++) - if (component[i] == minshift) + if (component[i] == maxshift) component[i] = -1; switch (compPos) { |