diff options
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.cpp | 16 | ||||
-rw-r--r-- | engines/sword25/sword25.cpp | 2 |
2 files changed, 9 insertions, 9 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++; diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp index 0c9279abf3..946865cf10 100644 --- a/engines/sword25/sword25.cpp +++ b/engines/sword25/sword25.cpp @@ -86,7 +86,7 @@ Common::Error Sword25Engine::AppStart(const Common::StringArray &CommandParamete BS_Log::RegisterLogListener(LogToStdout); // Initialise the graphics mode to ARGB8888 - Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24); + Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24); initGraphics(800, 600, true, &format); if (format != g_system->getScreenFormat()) return Common::kUnsupportedColorMode; |