[Scummvm-cvs-logs] scummvm master -> c87657f066ca9cbb0e07963c31cf57c96b1c5068
bluegr
md5 at scummvm.org
Fri Feb 17 20:56:16 CET 2012
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:
c87657f066 SCI: Added some sanity checks by digitall
Commit: c87657f066ca9cbb0e07963c31cf57c96b1c5068
https://github.com/scummvm/scummvm/commit/c87657f066ca9cbb0e07963c31cf57c96b1c5068
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-02-17T11:54:50-08:00
Commit Message:
SCI: Added some sanity checks by digitall
- Limit the LB1 cursor workaround to LB1 only (so that fanmade games
aren't affected)
- Error our when bad cursor hotspots are found
Changed paths:
engines/sci/graphics/cursor.cpp
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index b269e8b..daab532 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -145,7 +145,7 @@ void GfxCursor::kernelSetShape(GuiResourceId resourceId) {
// Special case for the magnifier cursor in LB1 (bug #3487092).
// No other SCI0 game has a cursor resource of 1, so this is handled
// specifically for LB1.
- if (resourceId == 1)
+ if (g_sci->getGameId() == GID_LAURABOW && resourceId == 1)
colorMapping[3] = _screen->getColorWhite();
// Seek to actual data
@@ -175,6 +175,11 @@ void GfxCursor::kernelSetShape(GuiResourceId resourceId) {
rawBitmap = upscaledBitmap;
}
+ if (hotspot.x >= heightWidth || hotspot.y >= heightWidth) {
+ error("cursor %d's hotspot (%d, %d) is out of range of the cursor's dimensions (%dx%d)",
+ resourceId, hotspot.x, hotspot.y, heightWidth, heightWidth);
+ }
+
CursorMan.replaceCursor(rawBitmap, heightWidth, heightWidth, hotspot.x, hotspot.y, SCI_CURSOR_SCI0_TRANSPARENCYCOLOR);
kernelShow();
More information about the Scummvm-git-logs
mailing list