diff options
author | Johannes Schickel | 2013-08-02 23:25:29 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:32 +0200 |
commit | 2131d2d2f5a2142bd537cf853a6d9b9cd867357c (patch) | |
tree | 96cceb4b5b373552ef728f0494134421aef8e616 | |
parent | 2fdebe41b545a814b4eac83f24497ae194f255c6 (diff) | |
download | scummvm-rg350-2131d2d2f5a2142bd537cf853a6d9b9cd867357c.tar.gz scummvm-rg350-2131d2d2f5a2142bd537cf853a6d9b9cd867357c.tar.bz2 scummvm-rg350-2131d2d2f5a2142bd537cf853a6d9b9cd867357c.zip |
DRASCULA: Prefer getBasePtr over direct Surface::pixels access.
-rw-r--r-- | engines/drascula/graphics.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 3bdf724670..aa13192b25 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -132,7 +132,7 @@ void DrasculaEngine::showFrame(Common::SeekableReadStream *stream, bool firstFra byte *prevFrame = (byte *)malloc(64000); Graphics::Surface *screenSurf = _system->lockScreen(); - byte *screenBuffer = (byte *)screenSurf->pixels; + byte *screenBuffer = (byte *)screenSurf->getBasePtr(0, 0); uint16 screenPitch = screenSurf->pitch; for (int y = 0; y < 200; y++) { memcpy(prevFrame+y*320, screenBuffer+y*screenPitch, 320); @@ -449,7 +449,7 @@ void DrasculaEngine::screenSaver() { int x1_, y1_, off1, off2; Graphics::Surface *screenSurf = _system->lockScreen(); - byte *screenBuffer = (byte *)screenSurf->pixels; + byte *screenBuffer = (byte *)screenSurf->getBasePtr(0, 0); uint16 screenPitch = screenSurf->pitch; for (int i = 0; i < 200; i++) { for (int j = 0; j < 320; j++) { @@ -538,7 +538,7 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) { waitFrameSSN(); Graphics::Surface *screenSurf = _system->lockScreen(); - byte *screenBuffer = (byte *)screenSurf->pixels; + byte *screenBuffer = (byte *)screenSurf->getBasePtr(0, 0); uint16 screenPitch = screenSurf->pitch; if (FrameSSN) mixVideo(screenBuffer, screenSurface, screenPitch); @@ -557,7 +557,7 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) { free(BufferSSN); waitFrameSSN(); Graphics::Surface *screenSurf = _system->lockScreen(); - byte *screenBuffer = (byte *)screenSurf->pixels; + byte *screenBuffer = (byte *)screenSurf->getBasePtr(0, 0); uint16 screenPitch = screenSurf->pitch; if (FrameSSN) mixVideo(screenBuffer, screenSurface, screenPitch); |