aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/disk_ns.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 00:17:40 +0200
committerJohannes Schickel2013-08-03 02:52:33 +0200
commitd82741a3c8b64fc0b167548f65b53181b67959fb (patch)
treedd7d33475f8e0d23a6664f423f5d31a58566117a /engines/parallaction/disk_ns.cpp
parent2117feaeec980b06b996ad6d154e12761fcc9d5b (diff)
downloadscummvm-rg350-d82741a3c8b64fc0b167548f65b53181b67959fb.tar.gz
scummvm-rg350-d82741a3c8b64fc0b167548f65b53181b67959fb.tar.bz2
scummvm-rg350-d82741a3c8b64fc0b167548f65b53181b67959fb.zip
PARALLACTION: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/parallaction/disk_ns.cpp')
-rw-r--r--engines/parallaction/disk_ns.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index 4c4893ec61..45f7100f80 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -482,7 +482,7 @@ void DosDisk_ns::loadBackground(BackgroundInfo& info, const char *filename) {
// read bitmap, mask and path data and extract them into the 3 buffers
info.bg.create(info.width, info.height, Graphics::PixelFormat::createFormatCLUT8());
createMaskAndPathBuffers(info);
- unpackBackground(stream, (byte *)info.bg.pixels, info._mask->data, info._path->data);
+ unpackBackground(stream, (byte *)info.bg.getBasePtr(0, 0), info._mask->data, info._path->data);
delete stream;
}
@@ -976,7 +976,7 @@ void AmigaDisk_ns::loadMask_internal(BackgroundInfo& info, const char *name) {
info._mask = new MaskBuffer;
// surface width was shrunk to 1/4th of the bitmap width due to the pixel packing
info._mask->create(decoder.getSurface()->w * 4, decoder.getSurface()->h);
- memcpy(info._mask->data, decoder.getSurface()->pixels, info._mask->size);
+ memcpy(info._mask->data, decoder.getSurface()->getBasePtr(0, 0), info._mask->size);
info._mask->bigEndian = true;
}
@@ -998,7 +998,7 @@ void AmigaDisk_ns::loadPath_internal(BackgroundInfo& info, const char *name) {
info._path = new PathBuffer;
// surface width was shrunk to 1/8th of the bitmap width due to the pixel packing
info._path->create(decoder.getSurface()->w * 8, decoder.getSurface()->h);
- memcpy(info._path->data, decoder.getSurface()->pixels, info._path->size);
+ memcpy(info._path->data, decoder.getSurface()->getBasePtr(0, 0), info._path->size);
info._path->bigEndian = true;
}