aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/tga.cpp
diff options
context:
space:
mode:
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();