[Scummvm-cvs-logs] SF.net SVN: scummvm:[53285] scummvm/trunk/engines/sword25
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:16:23 CEST 2010
Revision: 53285
http://scummvm.svn.sourceforge.net/scummvm/?rev=53285&view=rev
Author: sev
Date: 2010-10-12 23:16:23 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix color format
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
scummvm/trunk/engines/sword25/sword25.cpp
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:16:00 UTC (rev 53284)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:16:23 UTC (rev 53285)
@@ -79,7 +79,7 @@
}
// 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 @@
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 @@
out = outo;
in = ino;
for (int j = 0; j < w; j++) {
+ int r = *in++;
+ int g = *in++;
int b = *in++;
- int g = *in++;
- int r = *in++;
int a = *in++;
switch (a) {
case 0: // Full transparency
out += 4;
break;
case 255: // Full opacity
+ *out++ = r;
+ *out++ = g;
*out++ = b;
- *out++ = g;
- *out++ = r;
*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++;
Modified: scummvm/trunk/engines/sword25/sword25.cpp
===================================================================
--- scummvm/trunk/engines/sword25/sword25.cpp 2010-10-12 23:16:00 UTC (rev 53284)
+++ scummvm/trunk/engines/sword25/sword25.cpp 2010-10-12 23:16:23 UTC (rev 53285)
@@ -86,7 +86,7 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list