aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-23 08:40:21 +0000
committerEugene Sandulenko2010-10-12 23:16:23 +0000
commit18e2534b63c4dc6e77f36a5091bd2ff9d3b48900 (patch)
treefe1b76ac42138170d3b52a0ee03bb11b9578fb6d /engines/sword25
parent73ae6739a586294f8b25ee82b01caaee1bb4563c (diff)
downloadscummvm-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')
-rw-r--r--engines/sword25/gfx/opengl/glimage.cpp16
-rw-r--r--engines/sword25/sword25.cpp2
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;