aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/graphics.cpp26
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--graphics/pixelformat.h10
3 files changed, 19 insertions, 19 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index a090db01b6..4e47db0827 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -213,30 +213,30 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction(void) {
const Graphics::PixelFormat RGBList[] = {
#ifdef ENABLE_32BIT
// RGBA8888, ARGB8888, RGB888
- Graphics::PixelFormat(4, 0, 0, 0, 0, 24, 16, 8, 0),
- Graphics::PixelFormat(4, 0, 0, 0, 0, 16, 8, 0, 24),
- Graphics::PixelFormat(3, 0, 0, 0, 8, 16, 8, 0, 0),
+ Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0),
+ Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24),
+ Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0),
#endif
// RGB565, XRGB1555, RGB555, RGBA4444, ARGB4444
- Graphics::PixelFormat(2, 3, 2, 3, 8, 11, 5, 0, 0),
- Graphics::PixelFormat(2, 3, 3, 3, 7, 10, 5, 0, 15),
- Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0),
+ Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0),
+ Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15),
+ Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0),
Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0),
Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)
};
const Graphics::PixelFormat BGRList[] = {
#ifdef ENABLE_32BIT
// ABGR8888, BGRA8888, BGR888
- Graphics::PixelFormat(4, 0, 0, 0, 0, 0, 8, 16, 24),
- Graphics::PixelFormat(4, 0, 0, 0, 0, 8, 16, 24, 0),
- Graphics::PixelFormat(3, 0, 0, 0, 8, 0, 8, 16, 0),
+ Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24),
+ Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0),
+ Graphics::PixelFormat(3, 8, 8, 8, 0, 0, 8, 16, 0),
#endif
// BGR565, XBGR1555, BGR555, ABGR4444, BGRA4444
- Graphics::PixelFormat(2, 3, 2, 3, 8, 0, 5, 11, 0),
- Graphics::PixelFormat(2, 3, 3, 3, 7, 0, 5, 10, 15),
- Graphics::PixelFormat(2, 3, 3, 3, 8, 0, 5, 10, 0),
+ Graphics::PixelFormat(2, 5, 6, 5, 0, 0, 5, 11, 0),
+ Graphics::PixelFormat(2, 5, 5, 5, 1, 0, 5, 10, 15),
+ Graphics::PixelFormat(2, 5, 5, 5, 0, 0, 5, 10, 0),
Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12),
- Graphics::PixelFormat(2, 3, 3, 3, 8, 4, 8, 12, 0)
+ Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0)
};
// TODO: prioritize matching alpha masks
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 8d078f12d4..a00ace1f49 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1085,7 +1085,7 @@ Common::Error ScummEngine::init() {
(_screenWidth * _textSurfaceMultiplier > 320));
} else if (_game.features & GF_16BIT_COLOR) {
#ifdef ENABLE_RGB_COLOR
- Graphics::PixelFormat format = Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0);
+ Graphics::PixelFormat format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format);
if (format != _system->getScreenFormat())
return Common::kUnsupportedColorMode;
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index 380df985d9..d16de51ea7 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -57,16 +57,16 @@ struct PixelFormat {
rShift = gShift = bShift = aShift = 0;
}
- inline PixelFormat(int BytesPerPixel,
- int RLoss, int GLoss, int BLoss, int ALoss,
- int RShift, int GShift, int BShift, int AShift) {
+ inline PixelFormat(byte BytesPerPixel,
+ byte RBits, byte GBits, byte BBits, byte ABits,
+ byte RShift, byte GShift, byte BShift, byte AShift) {
bytesPerPixel = BytesPerPixel;
- rLoss = RLoss, gLoss = GLoss, bLoss = BLoss, aLoss = ALoss;
+ rLoss = 8 - RBits, gLoss = 8 - GBits, bLoss = 8 - BBits, aLoss = 8 - ABits;
rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
}
static inline PixelFormat createFormatCLUT8() {
- return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
+ return PixelFormat(1, 0, 0, 0, 0, 0, 0, 0, 0);
}
inline bool operator==(const PixelFormat &fmt) const {