Skip to content

Commit

Permalink
SCI32: Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
csnover committed Aug 19, 2016
1 parent 0317772 commit c8a2b9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions engines/sci/graphics/cursor32.cpp
Expand Up @@ -183,10 +183,11 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
_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.
// in early SCI32 games were designed for low-resolution display mode
// 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.
// in these early 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
Expand Down Expand Up @@ -342,20 +343,21 @@ void GfxCursor32::move() {
return;
}

// If it was off the screen, just show it and return
// Cursor moved onto the screen after being offscreen
_cursor.rect.moveTo(_position.x - _hotSpot.x, _position.y - _hotSpot.y);
if (_cursorBack.rect.isEmpty()) {
revealCursor();
return;
}

// If we just moved entirely off screen, remove background & return
// Cursor moved offscreen
if (!_cursor.rect.intersects(_vmapRegion.rect)) {
drawToHardware(_cursorBack);
return;
}

if (!_cursor.rect.intersects(_cursorBack.rect)) {
// Cursor moved to a completely different part of the screen
_drawBuff1.rect = _cursor.rect;
_drawBuff1.rect.clip(_vmapRegion.rect);
readVideo(_drawBuff1);
Expand All @@ -366,13 +368,13 @@ void GfxCursor32::move() {
paint(_drawBuff1, _cursor);
drawToHardware(_drawBuff1);

// erase
drawToHardware(_cursorBack);

_cursorBack.rect = _cursor.rect;
_cursorBack.rect.clip(_vmapRegion.rect);
copy(_cursorBack, _drawBuff2);
} else {
// Cursor moved, but still overlaps the previous cursor location
Common::Rect mergedRect(_cursorBack.rect);
mergedRect.extend(_cursor.rect);
mergedRect.clip(_vmapRegion.rect);
Expand Down
2 changes: 1 addition & 1 deletion engines/sci/graphics/frameout.cpp
Expand Up @@ -72,7 +72,7 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd
_overdrawThreshold(0),
_palMorphIsOn(false) {

// QFG4 is the only SCI32 game that doesn't have a high-resolution toggle
// QFG4 is the only SCI32 game that doesn't have a high-resolution version
if (g_sci->getGameId() == GID_QFG4) {
_isHiRes = false;
}
Expand Down

0 comments on commit c8a2b9a

Please sign in to comment.