TOLTECS: Take advantage of Surface::getPixels.

This commit is contained in:
Johannes Schickel 2013-08-03 02:43:54 +02:00
parent 2977ff8ba0
commit 863ead081d
3 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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

View File

@ -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;