Skip to content

Commit

Permalink
TONY: Fix background dirty rect handling.
Browse files Browse the repository at this point in the history
Reset the scrolling state on load, so that when a new scene is
loaded, the background is redrawn. Also, revert the workaround
in d0d15af9, since this (hopefully) fixes the underlying problem.
  • Loading branch information
fuzzie committed Aug 25, 2012
1 parent 61b1103 commit 0163bd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
7 changes: 4 additions & 3 deletions engines/tony/loc.cpp
Expand Up @@ -1945,9 +1945,6 @@ RMLocation::RMLocation() {
_buf = NULL;
TEMPNumLoc = 0;
_cmode = CM_256;

_prevScroll.set(-1, -1);
_prevFixedScroll.set(-1, -1);
}


Expand Down Expand Up @@ -2020,6 +2017,10 @@ bool RMLocation::load(RMDataStream &ds) {
byte cm;
int i;

// Reset dirty rectangling
_prevScroll.set(-1, -1);
_prevFixedScroll.set(-1, -1);

// Check the ID
ds >> id[0] >> id[1] >> id[2];

Expand Down
7 changes: 1 addition & 6 deletions engines/tony/window.cpp
Expand Up @@ -140,16 +140,11 @@ void RMWindow::getNewFrame(RMGfxTargetBuffer &bigBuf, Common::Rect *rcBoundEllip
// Get a pointer to the bytes of the source buffer
byte *lpBuf = bigBuf;

// FIXME: The current dirty rect handling code has a minor issue with screen refresh in one
// scene in the introduction sequence as the scene changes. For now, we're working around the
// problem by explicitly having full screen refreshes on that scene
bool fullRefresh = g_vm->getEngine()->getCurrentLocation() == 98;

if (rcBoundEllipse != NULL) {
// Circular wipe effect
getNewFrameWipe(lpBuf, *rcBoundEllipse);
_wiping = true;
} else if (_wiping || fullRefresh) {
} else if (_wiping) {
// Just finished a wiping effect, so copy the full screen
copyRectToScreen(lpBuf, RM_SX * 2, 0, 0, RM_SX, RM_SY);
_wiping = false;
Expand Down

0 comments on commit 0163bd3

Please sign in to comment.