From 84fb3e816d3c66105a0291834c8ab8bed352b4af Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 17 Jun 2014 09:34:15 +0200 Subject: TONY: Switch to 565 screen format. The old (555) screen format is not supported by some backends. This leaves the savegame thumbnails as 555 (for compatibility). --- engines/tony/window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/tony/window.cpp') diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp index 5c50a50a57..c62f483a35 100644 --- a/engines/tony/window.cpp +++ b/engines/tony/window.cpp @@ -53,7 +53,7 @@ RMWindow::~RMWindow() { * Initializes the graphics window */ void RMWindow::init() { - Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); + Graphics::PixelFormat pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); initGraphics(RM_SX, RM_SY, true, &pixelFormat); reset(); @@ -83,7 +83,7 @@ void RMWindow::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, for (int i = 0; i < h; i++) { uint16 *dst = (uint16 *)screen->getBasePtr(x, y + i); for (int j = 0; j < w; j++) { - dst[j] = RMGfxTargetBuffer::_precalcTable[src[j] & 0x7FFF]; + dst[j] = RMGfxTargetBuffer::_precalcTable[src[j]]; } src += (pitch / 2); } @@ -291,8 +291,8 @@ void RMSnapshot::grabScreenshot(byte *lpBuf, int dezoom, uint16 *lpDestBuf) { cursrc = &src[RM_SKIPX + x]; *curOut++ = ((*cursrc) & 0x1F) << 3; - *curOut++ = (((*cursrc) >> 5) & 0x1F) << 3; - *curOut++ = (((*cursrc) >> 10) & 0x1F) << 3; + *curOut++ = (((*cursrc) >> 5) & 0x3F) << 3; + *curOut++ = (((*cursrc) >> 11) & 0x1F) << 3; if (lpDestBuf) *lpDestBuf++ = *cursrc; @@ -319,8 +319,8 @@ void RMSnapshot::grabScreenshot(byte *lpBuf, int dezoom, uint16 *lpDestBuf) { curv = v; sommab += cursrc[curv * RM_BBX + u] & 0x1F; - sommag += (cursrc[curv * RM_BBX + u] >> 5) & 0x1F; - sommar += (cursrc[curv * RM_BBX + u] >> 10) & 0x1F; + sommag += (cursrc[curv * RM_BBX + u] >> 6) & 0x1F; + sommar += (cursrc[curv * RM_BBX + u] >> 11) & 0x1F; } } _rgb[k + 0] = (byte)(sommab * 8 / (dezoom * dezoom)); -- cgit v1.2.3