Skip to content

Commit

Permalink
TUCKER: Prefer getBasePtr over direct Surface::pixels access.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Aug 3, 2013
1 parent ae7bc4d commit d26817a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/tucker/sequences.cpp
Expand Up @@ -763,7 +763,7 @@ bool AnimationSequencePlayer::decodeNextAnimationFrame(int index, bool copyDirty

if (!copyDirtyRects) {
for (uint16 y = 0; (y < surface->h) && (y < kScreenHeight); y++)
memcpy(_offscreenBuffer + y * kScreenWidth, (byte *)surface->pixels + y * surface->pitch, surface->w);
memcpy(_offscreenBuffer + y * kScreenWidth, (const byte *)surface->getBasePtr(0, y), surface->w);
} else {
_flicPlayer[index].copyDirtyRectsToBuffer(_offscreenBuffer, kScreenWidth);
}
Expand Down Expand Up @@ -811,7 +811,7 @@ void AnimationSequencePlayer::playIntroSeq19_20() {
if (surface)
for (int i = 0; i < kScreenWidth * kScreenHeight; ++i)
if (_offscreenBuffer[i] == 0)
_offscreenBuffer[i] = *((byte *)surface->pixels + i);
_offscreenBuffer[i] = *((const byte *)surface->getBasePtr(0, 0) + i);

if (!framesLeft)
_changeToNextSequence = true;
Expand Down

0 comments on commit d26817a

Please sign in to comment.