From 1c7a5e5a0108e9368d24f381858e050277499432 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 16 Nov 2015 16:08:29 +0100 Subject: 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 --- graphics/pixelformat.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'graphics/pixelformat.cpp') 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) { -- cgit v1.2.3