aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-09-13 18:57:01 +0200
committerTorbjörn Andersson2015-09-13 18:57:36 +0200
commit6bf54e497980bee76f7c1e4e6328b9ced7d4e461 (patch)
tree4e0230cb96378aa7c6aa000810704355eeb0492b
parentbb01b27777bea9531cae117659d14d3d33f44c8a (diff)
downloadscummvm-rg350-6bf54e497980bee76f7c1e4e6328b9ced7d4e461.tar.gz
scummvm-rg350-6bf54e497980bee76f7c1e4e6328b9ced7d4e461.tar.bz2
scummvm-rg350-6bf54e497980bee76f7c1e4e6328b9ced7d4e461.zip
SHERLOCK: Scale up the cursors for the 3DO version of Scalpel
This fixes a regression from the in-progress hi-res mode, that made the cursors tiny.
-rw-r--r--engines/sherlock/events.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 89d7de98f5..ed9d3702e0 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -98,8 +98,24 @@ void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY)
// PC 8-bit palettized
CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
} else {
+ Graphics::Surface tempSurface;
+ tempSurface.create(2 * src.w, 2 * src.h, src.format);
+
+ for (int y = 0; y < src.h; y++) {
+ const uint16 *srcP = (const uint16 *)src.getBasePtr(0, y);
+ uint16 *destP = (uint16 *)tempSurface.getBasePtr(0, 2 * y);
+ for (int x = 0; x < src.w; ++x, ++srcP, destP += 2) {
+ *destP = *srcP;
+ *(destP + 1) = *srcP;
+ *(destP + 2 * src.w) = *srcP;
+ *(destP + 2 * src.w + 1) = *srcP;
+ }
+ }
+
// 3DO RGB565
- CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0x0000, false, &src.format);
+ CursorMan.replaceCursor(tempSurface.getPixels(), tempSurface.w, tempSurface.h, 2 * hotspotX, 2 * hotspotY, 0x0000, false, &src.format);
+
+ tempSurface.free();
}
showCursor();
}