diff options
Diffstat (limited to 'video/dxa_decoder.cpp')
-rw-r--r-- | video/dxa_decoder.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp index 561719a27d..7d1112a59c 100644 --- a/video/dxa_decoder.cpp +++ b/video/dxa_decoder.cpp @@ -115,9 +115,9 @@ bool DXADecoder::loadStream(Common::SeekableReadStream *stream) { _scaledBuffer = 0; if (_scaleMode != S_NONE) { _scaledBuffer = (uint8 *)malloc(_frameSize); - memset(_scaledBuffer, 0, _frameSize); if (!_scaledBuffer) error("Error allocating scale buffer (size %u)", _frameSize); + memset(_scaledBuffer, 0, _frameSize); } #ifdef DXA_EXPERIMENT_MAXD @@ -318,7 +318,7 @@ void DXADecoder::decode13(int size) { for (uint32 by = 0; by < _curHeight; by += BLOCKH) { for (uint32 bx = 0; bx < _width; bx += BLOCKW) { uint8 type = *codeBuf++; - uint8 *b2 = (uint8*)_frameBuffer1 + bx + by * _width; + uint8 *b2 = (uint8 *)_frameBuffer1 + bx + by * _width; switch (type) { case 0: @@ -369,7 +369,7 @@ void DXADecoder::decode13(int size) { if (mbyte & 0x08) my = -my; - uint8 *b1 = (uint8*)_frameBuffer2 + (bx+mx) + (by+my) * _width; + uint8 *b1 = (uint8 *)_frameBuffer2 + (bx+mx) + (by+my) * _width; for (int yc = 0; yc < BLOCKH; yc++) { memcpy(b2, b1, BLOCKW); b1 += _width; @@ -385,7 +385,7 @@ void DXADecoder::decode13(int size) { for (int subBlock = 0; subBlock < 4; subBlock++) { int sx = bx + subX[subBlock], sy = by + subY[subBlock]; - b2 = (uint8*)_frameBuffer1 + sx + sy * _width; + b2 = (uint8 *)_frameBuffer1 + sx + sy * _width; switch (subMask & 0xC0) { // 00: skip case 0x00: @@ -413,7 +413,7 @@ void DXADecoder::decode13(int size) { if (mbyte & 0x08) my = -my; - uint8 *b1 = (uint8*)_frameBuffer2 + (sx+mx) + (sy+my) * _width; + uint8 *b1 = (uint8 *)_frameBuffer2 + (sx+mx) + (sy+my) * _width; for (int yc = 0; yc < BLOCKH / 2; yc++) { memcpy(b2, b1, BLOCKW / 2); b1 += _width; @@ -489,9 +489,9 @@ const Graphics::Surface *DXADecoder::decodeNextFrame() { if ((_inBuffer == NULL) || (_inBufferSize < size)) { free(_inBuffer); _inBuffer = (byte *)malloc(size); - memset(_inBuffer, 0, size); if (_inBuffer == NULL) error("Error allocating input buffer (size %u)", size); + memset(_inBuffer, 0, size); _inBufferSize = size; } |