aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 02:38:46 +0200
committerJohannes Schickel2013-08-03 04:02:50 +0200
commitacfdfd46d16f840842b1e632d3af216d0d2c156f (patch)
tree7e9f07f77d6f0d64d5b3db7e9f52d045c28b1e66
parentf8ffe816d600a83cacc0063f0ef69d18325f1cdf (diff)
downloadscummvm-rg350-acfdfd46d16f840842b1e632d3af216d0d2c156f.tar.gz
scummvm-rg350-acfdfd46d16f840842b1e632d3af216d0d2c156f.tar.bz2
scummvm-rg350-acfdfd46d16f840842b1e632d3af216d0d2c156f.zip
DRASCULA: Take advantage of Surface::getPixels.
-rw-r--r--engines/drascula/graphics.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index aa13192b25..31d03a94a7 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->getBasePtr(0, 0);
+ byte *screenBuffer = (byte *)screenSurf->getPixels();
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->getBasePtr(0, 0);
+ byte *screenBuffer = (byte *)screenSurf->getPixels();
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->getBasePtr(0, 0);
+ byte *screenBuffer = (byte *)screenSurf->getPixels();
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->getBasePtr(0, 0);
+ byte *screenBuffer = (byte *)screenSurf->getPixels();
uint16 screenPitch = screenSurf->pitch;
if (FrameSSN)
mixVideo(screenBuffer, screenSurface, screenPitch);