diff options
author | Johannes Schickel | 2011-04-18 15:48:46 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-04-18 15:48:46 +0200 |
commit | 53d982b24f9cec69e6ce35ccaab7ad1a62556c5b (patch) | |
tree | 55f2482c1f2b26bcbad0f315c19eba08567a4ff3 /engines | |
parent | 14d496400111a52ecd31b559131f5743ded10689 (diff) | |
download | scummvm-rg350-53d982b24f9cec69e6ce35ccaab7ad1a62556c5b.tar.gz scummvm-rg350-53d982b24f9cec69e6ce35ccaab7ad1a62556c5b.tar.bz2 scummvm-rg350-53d982b24f9cec69e6ce35ccaab7ad1a62556c5b.zip |
SCUMM: Setup proper pixel format for virtual screen surfaces.
Thanks to Max for notifying me that SCUMM seems always to use RGB555.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/gfx.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 0472e16928..b509bb9676 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -385,9 +385,10 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int vs->hasTwoBuffers = twobufs; vs->xstart = 0; vs->backBuf = NULL; - // TODO: This should really rather setup the correct format instead of - // only setting the bytes per pixel. - vs->format.bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1; + if (_game.features & GF_16BIT_COLOR) + vs->format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); + else + vs->format = Graphics::PixelFormat::createFormatCLUT8(); vs->pitch = width * vs->format.bytesPerPixel; if (_game.version >= 7) { |