From 53d982b24f9cec69e6ce35ccaab7ad1a62556c5b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 18 Apr 2011 15:48:46 +0200 Subject: SCUMM: Setup proper pixel format for virtual screen surfaces. Thanks to Max for notifying me that SCUMM seems always to use RGB555. --- engines/scumm/gfx.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/scumm') 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) { -- cgit v1.2.3