diff options
author | Johannes Schickel | 2013-08-02 23:12:09 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:31 +0200 |
commit | 28b74b14ec5444d9f2558c05cea67f3567322b51 (patch) | |
tree | a84ddab85ba5ad54787e11b95f465b3937bbd208 /engines/agos/icons.cpp | |
parent | c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038 (diff) | |
download | scummvm-rg350-28b74b14ec5444d9f2558c05cea67f3567322b51.tar.gz scummvm-rg350-28b74b14ec5444d9f2558c05cea67f3567322b51.tar.bz2 scummvm-rg350-28b74b14ec5444d9f2558c05cea67f3567322b51.zip |
AGOS: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/agos/icons.cpp')
-rw-r--r-- | engines/agos/icons.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index 0ee1d62fde..558e7f9adb 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->pixels; + dst = (byte *)screen->getBasePtr(0, 0); 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->pixels; + dst = (byte *)screen->getBasePtr(0, 0); 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->pixels; + dst = (byte *)screen->getBasePtr(0, 0); 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->pixels; + dst = (byte *)screen->getBasePtr(0, 0); 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->pixels; + dst = (byte *)screen->getBasePtr(0, 0); dst += (x + window->x) * 8; dst += (y * 8 + window->y) * screen->pitch; @@ -339,7 +339,7 @@ void AGOSEngine::drawIcon(WindowBlock *window, uint icon, uint x, uint y) { _videoLockOut |= 0x8000; Graphics::Surface *screen = _system->lockScreen(); - dst = (byte *)screen->pixels + y * screen->pitch + x * 8; + dst = (byte *)screen->getBasePtr(x * 8, y); src = _iconFilePtr + icon * 146; if (icon == 0xFF) { @@ -951,7 +951,7 @@ void AGOSEngine::drawArrow(uint16 x, uint16 y, int8 dir) { } Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->pixels + y * screen->pitch + x * 8; + byte *dst = (byte *)screen->getBasePtr(x * 8, y); for (h = 0; h < 19; h++) { for (w = 0; w < 16; w++) { @@ -1042,7 +1042,7 @@ static const byte hitBarData[12 * 7] = { // Personal Nightmare specific void AGOSEngine_PN::drawIconHitBar() { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->pixels + 3 * screen->pitch + 6 * 8; + byte *dst = (byte *)screen->getBasePtr(6 * 8, 3); const byte *src = hitBarData; uint8 color = (getPlatform() == Common::kPlatformDOS) ? 7 : 15; |