aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2016-07-31 18:39:12 -0500
committerColin Snover2016-08-19 13:57:40 -0500
commit03177721b864439afb9b245d0f9be6528b458b12 (patch)
tree15875de493a9f4914e57c420602f8ca415349623 /engines/sci
parent80d9182554bcc6b24b493510cf599baf7577dacc (diff)
downloadscummvm-rg350-03177721b864439afb9b245d0f9be6528b458b12.tar.gz
scummvm-rg350-03177721b864439afb9b245d0f9be6528b458b12.tar.bz2
scummvm-rg350-03177721b864439afb9b245d0f9be6528b458b12.zip
SCI32: Allow pixel doubling of some cursors to improve usability
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/cursor32.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index a5491eec2a..5b63859972 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -182,13 +182,39 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
_width = view._width;
_height = view._height;
+ // SSCI never increased the size of cursors, but some of the cursors
+ // in early SSCI games were designed for low-resolution screens and so
+ // are kind of hard to pick out when running in high-resolution mode.
+ // To address this, we make some slight adjustments to cursor display
+ // in a couple of games.
+ // GK1: All the cursors are increased in size since they all appear to
+ // be designed for low-res display.
+ // PQ4: We only make the cursors bigger if they are above a set
+ // threshold size because inventory items usually have a
+ // high-resolution cursor representation.
+ bool pixelDouble = false;
+ if (g_sci->_gfxFrameout->_isHiRes &&
+ (g_sci->getGameId() == GID_GK1 ||
+ (g_sci->getGameId() == GID_PQ4 && _width <= 22 && _height <= 22))) {
+
+ _width *= 2;
+ _height *= 2;
+ _hotSpot.x *= 2;
+ _hotSpot.y *= 2;
+ pixelDouble = true;
+ }
+
_cursor.data = (byte *)realloc(_cursor.data, _width * _height);
_cursor.rect = Common::Rect(_width, _height);
memset(_cursor.data, 255, _width * _height);
_cursor.skipColor = 255;
Buffer target(_width, _height, _cursor.data);
- view.draw(target, _cursor.rect, Common::Point(0, 0), false);
+ if (pixelDouble) {
+ view.draw(target, _cursor.rect, Common::Point(0, 0), false, 2, 2);
+ } else {
+ view.draw(target, _cursor.rect, Common::Point(0, 0), false);
+ }
} else {
_hotSpot = Common::Point(0, 0);
_width = _height = 1;