diff options
author | Johannes Schickel | 2013-08-02 22:23:00 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:31 +0200 |
commit | c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038 (patch) | |
tree | 1a2b4f8a216de2f2f742a9c9ef68b46c51603883 /engines/scumm/akos.cpp | |
parent | 4790a4abd5c157254cab069bc34aa8ef8347f668 (diff) | |
download | scummvm-rg350-c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038.tar.gz scummvm-rg350-c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038.tar.bz2 scummvm-rg350-c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038.zip |
SCUMM: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/scumm/akos.cpp')
-rw-r--r-- | engines/scumm/akos.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index b6acf01050..481c4af432 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -994,7 +994,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { if (_draw_bottom < rect.bottom) _draw_bottom = rect.bottom; - v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x * _vm->_bytesPerPixel; + v1.destptr = (byte *)_out.getBasePtr(v1.x, v1.y); codec1_genericDecode(v1); @@ -1288,7 +1288,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { int32 numskip_before = skip_x + (skip_y * _width); int32 numskip_after = _width - cur_x; - byte *dst = (byte *)_out.pixels + height_unk * _out.pitch + width_unk * _vm->_bytesPerPixel; + byte *dst = (byte *)_out.getBasePtr(width_unk, height_unk); akos16Decompress(dst, _out.pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, clip.left, clip.top, _zbuf); return 0; @@ -1358,7 +1358,7 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { palPtr = _vm->_hePalettes + _vm->_hePaletteSlot + 768; } - byte *dstPtr = (byte *)_out.pixels + dst.top * _out.pitch + dst.left * _vm->_bytesPerPixel; + byte *dstPtr = (byte *)_out.getBasePtr(dst.left, dst.top); if (_shadow_mode == 3) { Wiz::decompressWizImage<kWizXMap>(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, xmap, _vm->_bytesPerPixel); } else { |