diff options
author | Johannes Schickel | 2008-11-03 20:15:45 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-11-03 20:15:45 +0000 |
commit | 4905d827b70c9c0e626be27a1f7d15201a60d747 (patch) | |
tree | 14d0c6a1c0fe994ab556faf4b45224f2f0d48432 /graphics | |
parent | 112feada4e68ecae1bdbd380f9b8d4fac15bd396 (diff) | |
download | scummvm-rg350-4905d827b70c9c0e626be27a1f7d15201a60d747.tar.gz scummvm-rg350-4905d827b70c9c0e626be27a1f7d15201a60d747.tar.bz2 scummvm-rg350-4905d827b70c9c0e626be27a1f7d15201a60d747.zip |
Removed dependency on OSystem::RGBToColor, by using Graphics::RGBToColor + Graphics::PixelFormat instead.
svn-id: r34888
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/imagedec.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp index e84ca8ca0e..93a895ae03 100644 --- a/graphics/imagedec.cpp +++ b/graphics/imagedec.cpp @@ -120,13 +120,14 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream) { newSurf->create(info.width, info.height, sizeof(OverlayColor)); assert(newSurf->pixels); OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w; + PixelFormat overlayFormat = g_system->getOverlayFormat(); int pitchAdd = info.width % 4; for (int i = 0; i < newSurf->h; ++i) { for (int i2 = 0; i2 < newSurf->w; ++i2) { b = stream.readByte(); g = stream.readByte(); r = stream.readByte(); - *curPixel = g_system->RGBToColor(r, g, b); + *curPixel = RGBToColor(r, g, b, overlayFormat); ++curPixel; } stream.seek(pitchAdd, SEEK_CUR); |