aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/window.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2014-06-17 09:34:15 +0200
committerAlyssa Milburn2014-06-17 09:34:15 +0200
commit84fb3e816d3c66105a0291834c8ab8bed352b4af (patch)
tree845dc1caeb01d1e371c1f80fbc3313171a76c3f0 /engines/tony/window.cpp
parentae12264c5f8e4aa5eb7422f1b4719846f758e14b (diff)
downloadscummvm-rg350-84fb3e816d3c66105a0291834c8ab8bed352b4af.tar.gz
scummvm-rg350-84fb3e816d3c66105a0291834c8ab8bed352b4af.tar.bz2
scummvm-rg350-84fb3e816d3c66105a0291834c8ab8bed352b4af.zip
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).
Diffstat (limited to 'engines/tony/window.cpp')
-rw-r--r--engines/tony/window.cpp12
1 files changed, 6 insertions, 6 deletions
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));