diff options
author | Johannes Schickel | 2013-08-02 23:47:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:32 +0200 |
commit | 8f73027d8273b482386d8c114674876b11069957 (patch) | |
tree | b0467f5c4894eec0503fb3529aa8fb4411b4e5f5 /engines/made | |
parent | 786ad6cea0caa076b1af56eb2bb6d85075e6bfd0 (diff) | |
download | scummvm-rg350-8f73027d8273b482386d8c114674876b11069957.tar.gz scummvm-rg350-8f73027d8273b482386d8c114674876b11069957.tar.bz2 scummvm-rg350-8f73027d8273b482386d8c114674876b11069957.zip |
MADE: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/pmvplayer.cpp | 2 | ||||
-rw-r--r-- | engines/made/screen.cpp | 8 | ||||
-rw-r--r-- | engines/made/scriptfuncs.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index cf450f7e25..9e4354d6a3 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -248,7 +248,7 @@ void PmvPlayer::handleEvents() { } void PmvPlayer::updateScreen() { - _vm->_system->copyRectToScreen(_surface->pixels, _surface->pitch, + _vm->_system->copyRectToScreen(_surface->getBasePtr(0, 0), _surface->pitch, (320 - _surface->w) / 2, (200 - _surface->h) / 2, _surface->w, _surface->h); _vm->_system->updateScreen(); } diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index ea7d57f82d..737b009565 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -344,12 +344,12 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask void Screen::updateSprites() { // TODO: This needs some more work, dirty rectangles are currently not used - memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000); + memcpy(_workScreen->getBasePtr(0, 0), _backgroundScreen->getBasePtr(0, 0), 64000); drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0); drawSpriteChannels(_workScreenDrawCtx, 1, 2); - _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); + _vm->_system->copyRectToScreen(_workScreen->getBasePtr(0, 0), _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); _vm->_screen->updateScreenAndWait(10); } @@ -593,7 +593,7 @@ void Screen::show() { return; drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0); - memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000); + memcpy(_workScreen->getBasePtr(0, 0), _backgroundScreen->getBasePtr(0, 0), 64000); drawSpriteChannels(_workScreenDrawCtx, 1, 2); _fx->run(_visualEffectNum, _workScreen, _palette, _newPalette, _paletteColorCount); @@ -775,7 +775,7 @@ void Screen::unlockScreen() { } void Screen::showWorkScreen() { - _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); + _vm->_system->copyRectToScreen(_workScreen->getBasePtr(0, 0), _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); } void Screen::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index c57778fb71..9a43bc44d2 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -574,7 +574,7 @@ int16 ScriptFunctions::sfLoadMouseCursor(int16 argc, int16 *argv) { PictureResource *flex = _vm->_res->getPicture(argv[2]); if (flex) { Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor(surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); + CursorMan.replaceCursor(surf->getBasePtr(0, 0), surf->w, surf->h, argv[1], argv[0], 0); _vm->_res->freeResource(flex); } return 0; |