diff options
author | Johannes Schickel | 2013-08-07 12:24:59 -0700 |
---|---|---|
committer | Johannes Schickel | 2013-08-07 12:24:59 -0700 |
commit | 7f8308e0eb50c4e13ec0684619b5474983a93a66 (patch) | |
tree | 0a057f01385a11d99add1e294f70891a8e8bf6c9 /engines/sci/video | |
parent | 6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c (diff) | |
parent | e5f0c42a65f38611272542a144228753e0496493 (diff) | |
download | scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.gz scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.bz2 scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.zip |
Merge pull request #365 from lordhoto/protected-pixels
Make Graphics::Surface::pixels protected.
Diffstat (limited to 'engines/sci/video')
-rw-r--r-- | engines/sci/video/robot_decoder.cpp | 2 | ||||
-rw-r--r-- | engines/sci/video/seq_decoder.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 0337a8d306..a567ece2ea 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -210,7 +210,7 @@ void RobotDecoder::readNextPacket() { // Copy over the decompressed frame byte *inFrame = decompressedFrame; - byte *outFrame = (byte *)surface->pixels; + byte *outFrame = (byte *)surface->getPixels(); // Black out the surface memset(outFrame, 0, surface->w * surface->h); diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp index a7b6346eca..54603ec1f1 100644 --- a/engines/sci/video/seq_decoder.cpp +++ b/engines/sci/video/seq_decoder.cpp @@ -119,7 +119,7 @@ const Graphics::Surface *SEQDecoder::SEQVideoTrack::decodeNextFrame() { _fileStream->seek(offset); if (frameType == kSeqFrameFull) { - byte *dst = (byte *)_surface->pixels + frameTop * SEQ_SCREEN_WIDTH + frameLeft; + byte *dst = (byte *)_surface->getBasePtr(frameLeft, frameTop); byte *linebuf = new byte[frameWidth]; @@ -133,7 +133,7 @@ const Graphics::Surface *SEQDecoder::SEQVideoTrack::decodeNextFrame() { } else { byte *buf = new byte[frameSize]; _fileStream->read(buf, frameSize); - decodeFrame(buf, rleSize, buf + rleSize, frameSize - rleSize, (byte *)_surface->pixels + SEQ_SCREEN_WIDTH * frameTop, frameLeft, frameWidth, frameHeight, colorKey); + decodeFrame(buf, rleSize, buf + rleSize, frameSize - rleSize, (byte *)_surface->getBasePtr(0, frameTop), frameLeft, frameWidth, frameHeight, colorKey); delete[] buf; } |