aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorTravis Howell2006-12-18 07:51:02 +0000
committerTravis Howell2006-12-18 07:51:02 +0000
commit534a2fd5d733c5ef5fba3b0610f217377f3751a9 (patch)
treed08a21ae740c166ffccfe2e759a911d8d4fb0024 /graphics
parent0d65cb426074581986526c44b74e0d5ed02b6216 (diff)
downloadscummvm-rg350-534a2fd5d733c5ef5fba3b0610f217377f3751a9.tar.gz
scummvm-rg350-534a2fd5d733c5ef5fba3b0610f217377f3751a9.tar.bz2
scummvm-rg350-534a2fd5d733c5ef5fba3b0610f217377f3751a9.zip
Change position of scale code, Scale code shouldn't have been FRAM specific
svn-id: r24871
Diffstat (limited to 'graphics')
-rw-r--r--graphics/dxa_player.cpp45
1 files changed, 19 insertions, 26 deletions
diff --git a/graphics/dxa_player.cpp b/graphics/dxa_player.cpp
index e55c54fe3c..3c38faf167 100644
--- a/graphics/dxa_player.cpp
+++ b/graphics/dxa_player.cpp
@@ -124,7 +124,7 @@ bool DXAPlayer::loadFile(const char *filename) {
_frameBuffer1 = (uint8 *)malloc(_frameSize);
_frameBuffer2 = (uint8 *)malloc(_frameSize);
if (!_frameBuffer1 || !_frameBuffer2)
- error("DXAPlayer: Error frame buffers (size %d)", _frameSize);
+ error("DXAPlayer: Error allocating frame buffers (size %d)", _frameSize);
if (_scaleMode != S_NONE) {
_scaledBuffer = (uint8 *)malloc(_frameSize);
@@ -513,33 +513,26 @@ void DXAPlayer::decodeNextFrame() {
}
}
}
-
- switch (_scaleMode) {
- case S_INTERLACED:
- for (int cy = 0; cy < _curHeight; cy++) {
- memcpy(&_scaledBuffer[2 * cy * _width], &_frameBuffer1[cy * _width], _width);
- memset(&_scaledBuffer[((2 * cy) + 1) * _width], 0, _width);
- }
- _drawBuffer = _scaledBuffer;
- break;
- case S_DOUBLE:
- for (int cy = 0; cy < _curHeight; cy++) {
- memcpy(&_scaledBuffer[2 * cy * _width], &_frameBuffer1[cy * _width], _width);
- memcpy(&_scaledBuffer[((2 * cy) + 1) * _width], &_frameBuffer1[cy * _width], _width);
- }
- _drawBuffer = _scaledBuffer;
- break;
- case S_NONE:
- _drawBuffer = _frameBuffer1;
- break;
- }
}
- if (tag == MKID_BE('NULL')) {
- if (_scaleMode == S_NONE)
- _drawBuffer = _frameBuffer1;
- else
- _drawBuffer = _scaledBuffer;
+ switch (_scaleMode) {
+ case S_INTERLACED:
+ for (int cy = 0; cy < _curHeight; cy++) {
+ memcpy(&_scaledBuffer[2 * cy * _width], &_frameBuffer1[cy * _width], _width);
+ memset(&_scaledBuffer[((2 * cy) + 1) * _width], 0, _width);
+ }
+ _drawBuffer = _scaledBuffer;
+ break;
+ case S_DOUBLE:
+ for (int cy = 0; cy < _curHeight; cy++) {
+ memcpy(&_scaledBuffer[2 * cy * _width], &_frameBuffer1[cy * _width], _width);
+ memcpy(&_scaledBuffer[((2 * cy) + 1) * _width], &_frameBuffer1[cy * _width], _width);
+ }
+ _drawBuffer = _scaledBuffer;
+ break;
+ case S_NONE:
+ _drawBuffer = _frameBuffer1;
+ break;
}
}