diff options
author | Johannes Schickel | 2013-08-03 02:43:54 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:02:53 +0200 |
commit | 863ead081d9367a3ac0575ebc195d0022d28ecf8 (patch) | |
tree | 5852bc3d639f82d2c3cafa2caa9d3551a0338a2d /engines | |
parent | 2977ff8ba09d1b1885abb92ccbfe97f89e634ae5 (diff) | |
download | scummvm-rg350-863ead081d9367a3ac0575ebc195d0022d28ecf8.tar.gz scummvm-rg350-863ead081d9367a3ac0575ebc195d0022d28ecf8.tar.bz2 scummvm-rg350-863ead081d9367a3ac0575ebc195d0022d28ecf8.zip |
TOLTECS: Take advantage of Surface::getPixels.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toltecs/menu.cpp | 4 | ||||
-rw-r--r-- | engines/toltecs/screen.cpp | 2 | ||||
-rw-r--r-- | engines/toltecs/segmap.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp index d2b3d5a163..0850630c43 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -69,7 +69,7 @@ int MenuSystem::run(MenuID menuId) { _vm->_screen->blastSprite(0x140 + _vm->_cameraX, 0x175 + _vm->_cameraY, 0, 1, 0x4000); shadeRect(60, 39, 520, 247, 225, 229); - memcpy(_background->getBasePtr(0, 0), _vm->_screen->_frontScreen, 640 * 400); + memcpy(_background->getPixels(), _vm->_screen->_frontScreen, 640 * 400); while (_running) { update(); @@ -229,7 +229,7 @@ void MenuSystem::initMenu(MenuID menuID) { _items.clear(); - memcpy(_vm->_screen->_frontScreen, _background->getBasePtr(0, 0), 640 * 400); + memcpy(_vm->_screen->_frontScreen, _background->getPixels(), 640 * 400); switch (menuID) { case kMenuIdMain: diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index 5e12773e1b..1eb2f41fd2 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -651,7 +651,7 @@ void Screen::drawSurface(int16 x, int16 y, Graphics::Surface *surface) { int16 skipX = 0; int16 width = surface->w; int16 height = surface->h; - byte *surfacePixels = (byte *)surface->getBasePtr(0, 0); + byte *surfacePixels = (byte *)surface->getPixels(); byte *frontScreen; // Not on screen, skip diff --git a/engines/toltecs/segmap.cpp b/engines/toltecs/segmap.cpp index b06c0af675..fea40f3277 100644 --- a/engines/toltecs/segmap.cpp +++ b/engines/toltecs/segmap.cpp @@ -373,7 +373,7 @@ void SegmentMap::loadSegmapMaskRectSurface(byte *maskData, SegmapMaskRect &maskR maskRect.surface->create(maskRect.width, maskRect.height, Graphics::PixelFormat::createFormatCLUT8()); byte *backScreen = _vm->_screen->_backScreen + maskRect.x + (maskRect.y * _vm->_sceneWidth); - byte *dest = (byte *)maskRect.surface->getBasePtr(0, 0); + byte *dest = (byte *)maskRect.surface->getPixels(); for (int16 h = 0; h < maskRect.height; h++) { int16 w = maskRect.width; |