diff options
author | Johannes Schickel | 2013-08-03 02:36:55 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:02:50 +0200 |
commit | 01daff0f1d5f222e7b892f3068e7ef6880b40346 (patch) | |
tree | eaa8d1fe75705861058dcd27ddf9931773879003 | |
parent | 0a1cbac76ac66876d187d2951c671a86a4812a59 (diff) | |
download | scummvm-rg350-01daff0f1d5f222e7b892f3068e7ef6880b40346.tar.gz scummvm-rg350-01daff0f1d5f222e7b892f3068e7ef6880b40346.tar.bz2 scummvm-rg350-01daff0f1d5f222e7b892f3068e7ef6880b40346.zip |
AGOS: Take advantage of Surface::getPixels.
-rw-r--r-- | engines/agos/animation.cpp | 8 | ||||
-rw-r--r-- | engines/agos/charset-fontdata.cpp | 8 | ||||
-rw-r--r-- | engines/agos/draw.cpp | 28 | ||||
-rw-r--r-- | engines/agos/gfx.cpp | 40 | ||||
-rw-r--r-- | engines/agos/icons.cpp | 10 | ||||
-rw-r--r-- | engines/agos/vga.cpp | 6 | ||||
-rw-r--r-- | engines/agos/vga_e2.cpp | 4 | ||||
-rw-r--r-- | engines/agos/vga_pn.cpp | 2 | ||||
-rw-r--r-- | engines/agos/vga_ww.cpp | 2 | ||||
-rw-r--r-- | engines/agos/window.cpp | 2 |
10 files changed, 55 insertions, 55 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 214a383680..40c9d1d049 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -272,7 +272,7 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { if (!surface) return; - const byte *src = (const byte *)surface->getBasePtr(0, 0); + const byte *src = (const byte *)surface->getPixels(); dst += y * pitch + x; do { @@ -344,7 +344,7 @@ void MoviePlayerDXA::handleNextFrame() { bool MoviePlayerDXA::processFrame() { Graphics::Surface *screen = _vm->_system->lockScreen(); - copyFrameToBuffer((byte *)screen->getBasePtr(0, 0), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); + copyFrameToBuffer((byte *)screen->getPixels(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); _vm->_system->unlockScreen(); uint32 soundTime = _mixer->getSoundElapsedTime(_bgSound); @@ -443,7 +443,7 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { if (!surface) return; - const byte *src = (const byte *)surface->getBasePtr(0, 0); + const byte *src = (const byte *)surface->getPixels(); dst += y * pitch + x; do { @@ -495,7 +495,7 @@ void MoviePlayerSMK::nextFrame() { bool MoviePlayerSMK::processFrame() { Graphics::Surface *screen = _vm->_system->lockScreen(); - copyFrameToBuffer((byte *)screen->getBasePtr(0, 0), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); + copyFrameToBuffer((byte *)screen->getPixels(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); _vm->_system->unlockScreen(); uint32 waitTime = getTimeToNextFrame(); diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index b67b307606..b6b90eefcc 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -2924,7 +2924,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { Graphics::Surface *screen = _system->lockScreen(); if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dstPitch = screen->pitch; h = 8; w = 6; @@ -2961,7 +2961,7 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { error("windowDrawChar: Unknown language %d", _language); } } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dstPitch = screen->pitch; h = 8; w = 6; @@ -2986,14 +2986,14 @@ void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { error("windowDrawChar: Unknown language %d", _language); } } else if (getGameType() == GType_ELVIRA1) { - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dstPitch = screen->pitch; h = 8; w = 6; src = english_elvira1Font + (chr - 32) * 8; } else { - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dstPitch = screen->pitch; h = 8; w = 8; diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp index 63bd22f65b..d27aed29db 100644 --- a/engines/agos/draw.cpp +++ b/engines/agos/draw.cpp @@ -32,15 +32,15 @@ namespace AGOS { byte *AGOSEngine::getBackBuf() { - return (byte *)_backBuf->getBasePtr(0, 0); + return (byte *)_backBuf->getPixels(); } byte *AGOSEngine::getBackGround() { - return (byte *)_backGroundBuf->getBasePtr(0, 0); + return (byte *)_backGroundBuf->getPixels(); } byte *AGOSEngine::getScaleBuf() { - return (byte *)_scaleBuf->getBasePtr(0, 0); + return (byte *)_scaleBuf->getPixels(); } #ifdef ENABLE_AGOS2 @@ -226,7 +226,7 @@ void AGOSEngine::animateSprites() { debug(0, "Using special wall"); uint8 color, h, len; - byte *dst = (byte *)_window4BackScn->getBasePtr(0, 0); + byte *dst = (byte *)_window4BackScn->getPixels(); color = (_variableArray[293] & 1) ? 13 : 15; _wallOn = 2; @@ -256,7 +256,7 @@ void AGOSEngine::animateSprites() { } else if (getGameType() == GType_ELVIRA2 && _variableArray[71] & 2) { // Used by the Unholy Barrier spell uint8 color, h, len; - byte *dst = (byte *)_window4BackScn->getBasePtr(0, 0); + byte *dst = (byte *)_window4BackScn->getPixels(); color = 1; _wallOn = 2; @@ -491,7 +491,7 @@ void AGOSEngine::saveBackGround(VgaSprite *vsp) { int16 y = vsp->y - _scrollY; if (_window3Flag == 1) { - animTable->srcPtr = (const byte *)_window4BackScn->getBasePtr(0, 0); + animTable->srcPtr = (const byte *)_window4BackScn->getPixels(); } else { int xoffs = (_videoWindows[vsp->windowNum * 4 + 0] * 2 + x) * 8; int yoffs = (_videoWindows[vsp->windowNum * 4 + 1] + y); @@ -565,7 +565,7 @@ void AGOSEngine::displayBoxStars() { if (x_ >= 311) continue; - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += (((screen->pitch / 4) * y_) * 4) + x_; @@ -673,7 +673,7 @@ void AGOSEngine::scrollScreen() { if (getGameType() == GType_SIMON2) { src = getBackGround(); - dst = (byte *)_window4BackScn->getBasePtr(0, 0); + dst = (byte *)_window4BackScn->getPixels(); for (int i = 0; i < _scrollHeight; i++) { memcpy(dst, src, _screenWidth); src += _backGroundBuf->pitch; @@ -725,7 +725,7 @@ void AGOSEngine::fillBackFromBackGround(uint16 height, uint16 width) { void AGOSEngine::fillBackFromFront() { Graphics::Surface *screen = _system->lockScreen(); - byte *src = (byte *)screen->getBasePtr(0, 0); + byte *src = (byte *)screen->getPixels(); byte *dst = getBackBuf(); for (int i = 0; i < _screenHeight; i++) { @@ -748,7 +748,7 @@ void AGOSEngine::fillBackGroundFromBack() { void AGOSEngine::fillBackGroundFromFront() { Graphics::Surface *screen = _system->lockScreen(); - byte *src = (byte *)screen->getBasePtr(0, 0); + byte *src = (byte *)screen->getPixels(); byte *dst = getBackGround(); for (int i = 0; i < _screenHeight; i++) { @@ -785,7 +785,7 @@ void AGOSEngine::displayScreen() { Graphics::Surface *screen = _system->lockScreen(); if (getGameType() == GType_PP || getGameType() == GType_FF) { byte *src = getBackBuf(); - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); for (int i = 0; i < _screenHeight; i++) { memcpy(dst, src, _screenWidth); src += _backBuf->pitch; @@ -798,9 +798,9 @@ void AGOSEngine::displayScreen() { _window4Flag = 0; uint16 srcWidth, width, height; - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); - const byte *src = (const byte *)_window4BackScn->getBasePtr(0, 0); + const byte *src = (const byte *)_window4BackScn->getPixels(); if (_window3Flag == 1) { src = getBackGround(); } @@ -831,7 +831,7 @@ void AGOSEngine::displayScreen() { if (_window6Flag == 2) { _window6Flag = 0; - byte *src = (byte *)_window6BackScn->getBasePtr(0, 0); + byte *src = (byte *)_window6BackScn->getPixels(); byte *dst = (byte *)screen->getBasePtr(0, 51); for (int i = 0; i < 80; i++) { memcpy(dst, src, _window6BackScn->w); diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index 2808543f8e..266fcc9796 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -649,7 +649,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { state->surf2_addr = getBackGround(); state->surf2_pitch = _backGroundBuf->pitch; - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _window4BackScn->pitch; xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; @@ -666,7 +666,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { state->surf2_addr = getBackGround(); state->surf2_pitch = _backGroundBuf->pitch; - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _videoWindows[18] * 16; xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; @@ -678,7 +678,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { _window4Flag = 1; } else { - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; @@ -696,7 +696,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { state->surf2_addr = getBackGround(); state->surf2_pitch = _backGroundBuf->pitch; - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _window4BackScn->pitch; } @@ -712,7 +712,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { state->surf2_addr = getBackGround(); state->surf2_pitch = _backGroundBuf->pitch; - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; @@ -861,7 +861,7 @@ void AGOSEngine::drawImage(VC10_state *state) { uint16 xoffs = 0, yoffs = 0; if (getGameType() == GType_WW) { if (_windowNum == 4 || (_windowNum >= 10 && _windowNum <= 27)) { - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _videoWindows[18] * 16; xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; @@ -873,7 +873,7 @@ void AGOSEngine::drawImage(VC10_state *state) { _window4Flag = 1; } else { - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; @@ -881,7 +881,7 @@ void AGOSEngine::drawImage(VC10_state *state) { } } else if (getGameType() == GType_ELVIRA2) { if (_windowNum == 4 || _windowNum >= 10) { - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _videoWindows[18] * 16; xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; @@ -893,7 +893,7 @@ void AGOSEngine::drawImage(VC10_state *state) { _window4Flag = 1; } else { - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; @@ -901,19 +901,19 @@ void AGOSEngine::drawImage(VC10_state *state) { } } else if (getGameType() == GType_ELVIRA1) { if (_windowNum == 6) { - state->surf_addr = (byte *)_window6BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window6BackScn->getPixels(); state->surf_pitch = _window6BackScn->pitch; xoffs = state->x * 8; yoffs = state->y; } else if (_windowNum == 2 || _windowNum == 3) { - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; yoffs = vlut[1] + state->y; } else { - state->surf_addr = (byte *)_window4BackScn->getBasePtr(0, 0); + state->surf_addr = (byte *)_window4BackScn->getPixels(); state->surf_pitch = _videoWindows[18] * 16; xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; @@ -926,7 +926,7 @@ void AGOSEngine::drawImage(VC10_state *state) { _window4Flag = 1; } } else { - state->surf_addr = (byte *)screen->getBasePtr(0, 0); + state->surf_addr = (byte *)screen->getPixels(); state->surf_pitch = screen->pitch; xoffs = (vlut[0] * 2 + state->x) * 8; @@ -973,7 +973,7 @@ void AGOSEngine::horizontalScroll(VC10_state *state) { vcWriteVar(251, _scrollX); if (getGameType() == GType_SIMON2) { - dst = (byte *)_window4BackScn->getBasePtr(0, 0); + dst = (byte *)_window4BackScn->getPixels(); dstPitch = _window4BackScn->pitch; } else { dst = getBackBuf(); @@ -1375,7 +1375,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas } else if (getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) { // The DOS Floppy demo was based off Waxworks engine if (updateWindow == 4 || updateWindow >= 10) { - src = (byte *)_window4BackScn->getBasePtr(0, 0); + src = (byte *)_window4BackScn->getPixels(); srcWidth = _videoWindows[18] * 16; } else if (updateWindow == 3 || updateWindow == 9) { src = (byte *)screen->getBasePtr(xoffs, yoffs); @@ -1387,7 +1387,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas } } else if (getGameType() == GType_SIMON1) { if (updateWindow == 4) { - src = (byte *)_window4BackScn->getBasePtr(0, 0); + src = (byte *)_window4BackScn->getPixels(); srcWidth = _videoWindows[18] * 16; } else if (updateWindow >= 10) { src = (byte *)_window4BackScn->getBasePtr(xoffs, yoffs); @@ -1402,7 +1402,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas } } else if (getGameType() == GType_WW) { if (updateWindow == 4 || updateWindow >= 10) { - src = (byte *)_window4BackScn->getBasePtr(0, 0); + src = (byte *)_window4BackScn->getPixels(); srcWidth = _videoWindows[18] * 16; } else if (updateWindow == 3 || updateWindow == 9) { src = (byte *)screen->getBasePtr(xoffs, yoffs); @@ -1414,7 +1414,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas } } else if (getGameType() == GType_ELVIRA2) { if (updateWindow == 4 || updateWindow >= 10) { - src = (byte *)_window4BackScn->getBasePtr(0, 0); + src = (byte *)_window4BackScn->getPixels(); srcWidth = _videoWindows[18] * 16; } else if (updateWindow == 3) { src = (byte *)screen->getBasePtr(xoffs, yoffs); @@ -1427,13 +1427,13 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas } else if (getGameType() == GType_ELVIRA1) { if (updateWindow == 6) { _window6Flag = 1; - src = (byte *)_window6BackScn->getBasePtr(0, 0); + src = (byte *)_window6BackScn->getPixels(); srcWidth = 48; } else if (updateWindow == 2 || updateWindow == 3) { src = (byte *)screen->getBasePtr(xoffs, yoffs); srcWidth = screen->pitch; } else { - src = (byte *)_window4BackScn->getBasePtr(0, 0); + src = (byte *)_window4BackScn->getPixels(); srcWidth = _videoWindows[18] * 16; } } else { diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index 558e7f9adb..6d4192da2a 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -202,7 +202,7 @@ void AGOSEngine_Simon2::drawIcon(WindowBlock *window, uint icon, uint x, uint y) _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += 110; dst += x; @@ -228,7 +228,7 @@ void AGOSEngine_Simon1::drawIcon(WindowBlock *window, uint icon, uint x, uint y) _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += (x + window->x) * 8; dst += (y * 25 + window->y) * screen->pitch; @@ -256,7 +256,7 @@ void AGOSEngine_Waxworks::drawIcon(WindowBlock *window, uint icon, uint x, uint _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += (x + window->x) * 8; dst += (y * 20 + window->y) * screen->pitch; @@ -284,7 +284,7 @@ void AGOSEngine_Elvira2::drawIcon(WindowBlock *window, uint icon, uint x, uint y _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += (x + window->x) * 8; dst += (y * 8 + window->y) * screen->pitch; @@ -312,7 +312,7 @@ void AGOSEngine_Elvira1::drawIcon(WindowBlock *window, uint icon, uint x, uint y _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); dst += (x + window->x) * 8; dst += (y * 8 + window->y) * screen->pitch; diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index 5456174f5d..cc5ede5f2c 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -1179,7 +1179,7 @@ void AGOSEngine::vc32_saveScreen() { if (getGameType() == GType_PN) { Graphics::Surface *screen = _system->lockScreen(); byte *dst = getBackGround(); - byte *src = (byte *)screen->getBasePtr(0, 0); + byte *src = (byte *)screen->getPixels(); for (int i = 0; i < _screenHeight; i++) { memcpy(dst, src, _screenWidth); dst += _backGroundBuf->pitch; @@ -1193,7 +1193,7 @@ void AGOSEngine::vc32_saveScreen() { uint16 height = _videoWindows[4 * 4 + 3]; byte *dst = (byte *)_backGroundBuf->getBasePtr(xoffs, yoffs); - byte *src = (byte *)_window4BackScn->getBasePtr(0, 0); + byte *src = (byte *)_window4BackScn->getPixels(); uint16 srcWidth = _videoWindows[4 * 4 + 2] * 16; for (; height > 0; height--) { memcpy(dst, src, width); @@ -1247,7 +1247,7 @@ void AGOSEngine::clearVideoWindow(uint16 num, uint16 color) { if (getGameType() == GType_ELVIRA1 && num == 3) { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); for (int i = 0; i < _screenHeight; i++) { memset(dst, color, _screenWidth); dst += screen->pitch; diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index b335c6b18a..4eb337c687 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -76,7 +76,7 @@ void AGOSEngine::vc45_setWindowPalette() { uint8 height = vlut[3]; if (num == 4) { - byte *dst = (byte *)_window4BackScn->getBasePtr(0, 0); + byte *dst = (byte *)_window4BackScn->getPixels(); for (uint8 h = 0; h < height; h++) { for (uint8 w = 0; w < width; w++) { @@ -378,7 +378,7 @@ void AGOSEngine::fullFade() { void AGOSEngine::vc56_fullScreen() { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); byte *src = _curVgaFile2 + 800; for (int i = 0; i < _screenHeight; i++) { diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp index dc364cd99b..b7f80ebf91 100644 --- a/engines/agos/vga_pn.cpp +++ b/engines/agos/vga_pn.cpp @@ -155,7 +155,7 @@ void AGOSEngine::vc48_specialEffect() { if (getPlatform() == Common::kPlatformDOS) { if (num == 1) { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); for (uint h = 0; h < _screenHeight; h++) { for (uint w = 0; w < _screenWidth; w++) { diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp index f0e081182e..ca93fa9fec 100644 --- a/engines/agos/vga_ww.cpp +++ b/engines/agos/vga_ww.cpp @@ -143,7 +143,7 @@ void AGOSEngine::vc61() { uint h, tmp; Graphics::Surface *screen = _system->lockScreen(); - dstPtr = (byte *)screen->getBasePtr(0, 0); + dstPtr = (byte *)screen->getPixels(); if (a == 6) { src = _curVgaFile2 + 800; diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index 95dbabf0fd..892df92554 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -232,7 +232,7 @@ void AGOSEngine::restoreBlock(uint16 x, uint16 y, uint16 w, uint16 h) { uint i; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->getBasePtr(0, 0); + dst = (byte *)screen->getPixels(); src = getBackGround(); dst += y * screen->pitch; |