aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-05-18 22:37:57 +0200
committerStrangerke2016-05-18 22:38:54 +0200
commit931846182baf040101886d8d1ea228f28345adf5 (patch)
tree0da34da615616757bc5fa558d506ac96ae7e0d06 /engines
parent0a8e552c6d761cb37a248c573c67d9fa468ca12f (diff)
downloadscummvm-rg350-931846182baf040101886d8d1ea228f28345adf5.tar.gz
scummvm-rg350-931846182baf040101886d8d1ea228f28345adf5.tar.bz2
scummvm-rg350-931846182baf040101886d8d1ea228f28345adf5.zip
GNAP: Change pixel format - Courtesy of _sev
Diffstat (limited to 'engines')
-rw-r--r--engines/gnap/gamesys.cpp22
-rw-r--r--engines/gnap/gnap.cpp4
2 files changed, 13 insertions, 13 deletions
diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp
index 61ea7c26ac..3bb96f33b4 100644
--- a/engines/gnap/gamesys.cpp
+++ b/engines/gnap/gamesys.cpp
@@ -235,7 +235,7 @@ void GameSys::drawSpriteToBackground(int x, int y, int resourceId) {
Graphics::Surface *GameSys::allocSurface(int width, int height) {
Graphics::Surface *surface = new Graphics::Surface();
surface->create(width, height, _backgroundSurface->format);
- surface->fillRect(Common::Rect(0, 0, surface->w, surface->h), 0xFFFF00FF);
+ surface->fillRect(Common::Rect(0, 0, surface->w, surface->h), 0xFFFFFF00);
return surface;
}
@@ -630,7 +630,7 @@ void GameSys::blitSurface32(Graphics::Surface *destSurface, int x, int y, Graphi
byte *rdst = dst;
for (int xc = 0; xc < width; ++xc) {
uint32 pixel = READ_LE_UINT32(rsrc);
- if (!transparent || pixel != 0xFFFF00FF)
+ if (!transparent || pixel != 0xFFFFFF00)
WRITE_LE_UINT32(rdst, pixel);
rsrc += 4;
rdst += 4;
@@ -654,9 +654,9 @@ void GameSys::blitSprite32(Graphics::Surface *destSurface, int x, int y, byte *s
byte srcPixel = src[xc];
if (!transparent || srcPixel) {
uint32 rgb = sourcePalette[srcPixel];
- rdst[0] = rgb & 0x000000FF;
- rdst[1] = (rgb & 0x0000FF00) >> 8;
- rdst[2] = (rgb & 0x00FF0000) >> 16;
+ rdst[1] = rgb & 0x000000FF;
+ rdst[2] = (rgb & 0x0000FF00) >> 8;
+ rdst[3] = (rgb & 0x00FF0000) >> 16;
}
rdst += 4;
}
@@ -691,9 +691,9 @@ void GameSys::blitSpriteScaled32(Graphics::Surface *destSurface, Common::Rect &f
byte srcPixel = *wsrc;
if (srcPixel) {
uint32 rgb = sourcePalette[srcPixel];
- wdst[0] = rgb & 0x000000FF;
- wdst[1] = (rgb & 0x0000FF00) >> 8;
- wdst[2] = (rgb & 0x00FF0000) >> 16;
+ wdst[1] = rgb & 0x000000FF;
+ wdst[2] = (rgb & 0x0000FF00) >> 8;
+ wdst[3] = (rgb & 0x00FF0000) >> 16;
}
wdst += 4;
xi += xs;
@@ -718,9 +718,9 @@ void GameSys::blitSpriteScaled32(Graphics::Surface *destSurface, Common::Rect &f
byte srcPixel = *wsrc;
if (srcPixel) {
uint32 rgb = sourcePalette[srcPixel];
- wdst[0] = rgb & 0x000000FF;
- wdst[1] = (rgb & 0x0000FF00) >> 8;
- wdst[2] = (rgb & 0x00FF0000) >> 16;
+ wdst[1] = rgb & 0x000000FF;
+ wdst[2] = (rgb & 0x0000FF00) >> 8;
+ wdst[3] = (rgb & 0x00FF0000) >> 16;
}
wdst += 4;
xi += xs;
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp
index 4de50ee38f..d0d8d0adcd 100644
--- a/engines/gnap/gnap.cpp
+++ b/engines/gnap/gnap.cpp
@@ -115,8 +115,8 @@ GnapEngine::~GnapEngine() {
}
Common::Error GnapEngine::run() {
- // Initialize the graphics mode to ARGB8888
- Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ // Initialize the graphics mode to RGBA8888
+ Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
initGraphics(800, 600, true, &format);
// We do not support color conversion yet