aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/tga.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 02:14:51 +0200
committerJohannes Schickel2013-08-03 04:02:49 +0200
commitdbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1 (patch)
tree8adba23b7b98b364ee400678f0b6290b1750f57b /graphics/decoders/tga.cpp
parent6fce92b0ea2fce78c375ade0bc6c2ac4231b96bd (diff)
downloadscummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.tar.gz
scummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.tar.bz2
scummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.zip
GRAPHICS: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'graphics/decoders/tga.cpp')
-rw-r--r--graphics/decoders/tga.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/decoders/tga.cpp b/graphics/decoders/tga.cpp
index c3b9d84055..3ee506f31b 100644
--- a/graphics/decoders/tga.cpp
+++ b/graphics/decoders/tga.cpp
@@ -272,7 +272,7 @@ bool TGADecoder::readData(Common::SeekableReadStream &tga, byte imageType, byte
} else if (imageType == TYPE_BW) {
_surface.create(_surface.w, _surface.h, _format);
- byte *data = (byte *)_surface.pixels;
+ byte *data = (byte *)_surface.getBasePtr(0, 0);
uint32 count = _surface.w * _surface.h;
while (count-- > 0) {
@@ -318,7 +318,7 @@ bool TGADecoder::readDataRLE(Common::SeekableReadStream &tga, byte imageType, by
if (imageType == TYPE_RLE_TRUECOLOR || imageType == TYPE_RLE_BW || imageType == TYPE_RLE_CMAP) {
_surface.create(_surface.w, _surface.h, _format);
uint32 count = _surface.w * _surface.h;
- byte *data = (byte *)_surface.pixels;
+ byte *data = (byte *)_surface.getBasePtr(0, 0);
while (count > 0) {
uint32 header = tga.readByte();