diff options
author | Eugene Sandulenko | 2010-08-23 08:40:21 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:16:23 +0000 |
commit | 18e2534b63c4dc6e77f36a5091bd2ff9d3b48900 (patch) | |
tree | fe1b76ac42138170d3b52a0ee03bb11b9578fb6d /engines/sword25/gfx/opengl | |
parent | 73ae6739a586294f8b25ee82b01caaee1bb4563c (diff) | |
download | scummvm-rg350-18e2534b63c4dc6e77f36a5091bd2ff9d3b48900.tar.gz scummvm-rg350-18e2534b63c4dc6e77f36a5091bd2ff9d3b48900.tar.bz2 scummvm-rg350-18e2534b63c4dc6e77f36a5091bd2ff9d3b48900.zip |
SWORD25: Fix color format
svn-id: r53285
Diffstat (limited to 'engines/sword25/gfx/opengl')
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp index 961215b4d4..dac31ce709 100644 --- a/engines/sword25/gfx/opengl/glimage.cpp +++ b/engines/sword25/gfx/opengl/glimage.cpp @@ -79,7 +79,7 @@ GLImage::GLImage(const Common::String &Filename, bool &Result) : } // Das Bild dekomprimieren - if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ABGR32, _data, m_Width, m_Height, Pitch)) { + if (!ImageLoader::LoadImage(pFileData, FileSize, GraphicEngine::CF_ARGB32, _data, m_Width, m_Height, Pitch)) { BS_LOG_ERRORLN("Could not decode image."); return; } @@ -157,7 +157,7 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, un h = pPartRect->bottom - pPartRect->top; } - debug(0, "Blit(%d, %d, %d, [%d, %d, %d, %d], %d, %d, %d)", PosX, PosY, Flipping, x1, y1, w, h, Color, Width, Height); + debug(6, "Blit(%d, %d, %d, [%d, %d, %d, %d], %d, %d, %d)", PosX, PosY, Flipping, x1, y1, w, h, Color, Width, Height); // Skalierungen berechnen float ScaleX, ScaleY; @@ -214,26 +214,26 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, un out = outo; in = ino; for (int j = 0; j < w; j++) { - int b = *in++; - int g = *in++; int r = *in++; + int g = *in++; + int b = *in++; int a = *in++; switch (a) { case 0: // Full transparency out += 4; break; case 255: // Full opacity - *out++ = b; - *out++ = g; *out++ = r; + *out++ = g; + *out++ = b; *out++ = a; break; default: // alpha blending - *out += (byte)(((b - *out) * a) >> 8); + *out += (byte)(((r - *out) * a) >> 8); out++; *out += (byte)(((g - *out) * a) >> 8); out++; - *out += (byte)(((r - *out) * a) >> 8); + *out += (byte)(((b - *out) * a) >> 8); out++; *out = 255; out++; |