diff options
author | Peter Kohaut | 2019-08-31 23:06:30 +0200 |
---|---|---|
committer | Peter Kohaut | 2019-08-31 23:09:19 +0200 |
commit | a7399c5111cc7ebeea284498a1ee5ac7542bb96d (patch) | |
tree | f89653b084b58ce909d4487a8251338acaf236d0 /engines/bladerunner/slice_animations.cpp | |
parent | 6fc73734c12248947ff2214ffd517a32816031c4 (diff) | |
download | scummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.tar.gz scummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.tar.bz2 scummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.zip |
BLADERUNNER: Use best pixel format on every platform
Updated all drawing routines to be pixel format agnostic.
Might decrease performance.
Diffstat (limited to 'engines/bladerunner/slice_animations.cpp')
-rw-r--r-- | engines/bladerunner/slice_animations.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp index 55a3d13e34..d9f44b990f 100644 --- a/engines/bladerunner/slice_animations.cpp +++ b/engines/bladerunner/slice_animations.cpp @@ -46,6 +46,8 @@ bool SliceAnimations::open(const Common::String &name) { _palettes.resize(_paletteCount); + Graphics::PixelFormat screenFormat = screenPixelFormat(); + for (uint32 i = 0; i != _paletteCount; ++i) { for (uint32 j = 0; j != 256; ++j) { uint8 color_r = file.readByte(); @@ -57,8 +59,7 @@ bool SliceAnimations::open(const Common::String &name) { _palettes[i].color[j].b = color_b; const int bladeToScummVmConstant = 256 / 32; // 5 bits to 8 bits - uint16 rgb555 = screenPixelFormat().RGBToColor(color_r * bladeToScummVmConstant, color_g * bladeToScummVmConstant, color_b * bladeToScummVmConstant); - _palettes[i].color555[j] = rgb555; + _palettes[i].value[j] = screenFormat.RGBToColor(color_r * bladeToScummVmConstant, color_g * bladeToScummVmConstant, color_b * bladeToScummVmConstant);; } } |