[Scummvm-cvs-logs] scummvm master -> 6bf54e497980bee76f7c1e4e6328b9ced7d4e461
eriktorbjorn
eriktorbjorn at telia.com
Sun Sep 13 18:59:32 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6bf54e4979 SHERLOCK: Scale up the cursors for the 3DO version of Scalpel
Commit: 6bf54e497980bee76f7c1e4e6328b9ced7d4e461
https://github.com/scummvm/scummvm/commit/6bf54e497980bee76f7c1e4e6328b9ced7d4e461
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-09-13T18:57:36+02:00
Commit Message:
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.
Changed paths:
engines/sherlock/events.cpp
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 89d7de9..ed9d370 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();
}
More information about the Scummvm-git-logs
mailing list