diff options
| author | Travis Howell | 2007-11-01 06:00:16 +0000 |
|---|---|---|
| committer | Travis Howell | 2007-11-01 06:00:16 +0000 |
| commit | 9aa0a47846774fe24b413e3156fdb7df22f07bdf (patch) | |
| tree | 5ff046e13849ba0e8a694d86e23ad9ed1dd3d32c /graphics | |
| parent | 5b134184c541b21acf7de56446a01325ab361447 (diff) | |
| download | scummvm-rg350-9aa0a47846774fe24b413e3156fdb7df22f07bdf.tar.gz scummvm-rg350-9aa0a47846774fe24b413e3156fdb7df22f07bdf.tar.bz2 scummvm-rg350-9aa0a47846774fe24b413e3156fdb7df22f07bdf.zip | |
Revert patch #1709219 - DXA Player: double size scaling option.
svn-id: r29351
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/dxa_player.cpp | 50 | ||||
| -rw-r--r-- | graphics/dxa_player.h | 10 |
2 files changed, 2 insertions, 58 deletions
diff --git a/graphics/dxa_player.cpp b/graphics/dxa_player.cpp index d723512a1d..28a1bc4dbd 100644 --- a/graphics/dxa_player.cpp +++ b/graphics/dxa_player.cpp @@ -31,23 +31,6 @@ #include <zlib.h> #endif -static void scaleUpBy2(byte *dst, byte *src, uint16 width, uint16 h) { - uint16 x; - - while (h > 0) { - for (x = width; x > 0; x--) { - register byte v; - - v = *src++; - *dst++ = v; - *dst++ = v; - } - memcpy(dst, dst - width * 2, width * 2); - dst += width * 2; - h--; - } -} - namespace Graphics { DXAPlayer::DXAPlayer() { @@ -57,7 +40,6 @@ DXAPlayer::DXAPlayer() { _frameBuffer2 = 0; _scaledBuffer = 0; _drawBuffer = 0; - _scaledBuffer2 = 0; _inBuffer = 0; _inBufferSize = 0; @@ -76,8 +58,6 @@ DXAPlayer::DXAPlayer() { _frameTicks = 0; _scaleMode = S_NONE; - - _scaling = 1; } DXAPlayer::~DXAPlayer() { @@ -86,13 +66,13 @@ DXAPlayer::~DXAPlayer() { int DXAPlayer::getWidth() { if (!_fd) return 0; - return _width * _scaling; + return _width; } int DXAPlayer::getHeight() { if (!_fd) return 0; - return _height * _scaling; + return _height; } int DXAPlayer::getCurFrame() { @@ -107,25 +87,6 @@ int DXAPlayer::getFrameCount() { return _framesCount; } -bool DXAPlayer::loadFile(const char *filename, uint16 maxWidth, uint16 maxHeight) { - bool result = loadFile(filename); - - if (result) { - _scaling = MIN(maxWidth / _width, maxHeight / _height); - if (_scaling < 1) - _scaling = 1; - if (_scaling > 2) - _scaling = 2; - if (_scaling >= 2) { - _scaledBuffer2 = (uint8 *)malloc(_width * _height * _scaling * _scaling); - if (!_scaledBuffer2) { - _scaling = 1; - } - } - } - return result; -} - bool DXAPlayer::loadFile(const char *filename) { uint32 tag; int32 frameRate; @@ -228,7 +189,6 @@ void DXAPlayer::closeFile() { free(_frameBuffer1); free(_frameBuffer2); free(_scaledBuffer); - free(_scaledBuffer2); free(_inBuffer); free(_decompBuffer); @@ -628,12 +588,6 @@ void DXAPlayer::decodeNextFrame() { _drawBuffer = _frameBuffer1; break; } - - if (_scaling == 2) { - /* Scale up here */ - scaleUpBy2(_scaledBuffer2, _drawBuffer, _width, _height); - _drawBuffer = _scaledBuffer2; - } } } // End of namespace Graphics diff --git a/graphics/dxa_player.h b/graphics/dxa_player.h index d1d6d78c97..5415e440d2 100644 --- a/graphics/dxa_player.h +++ b/graphics/dxa_player.h @@ -47,7 +47,6 @@ protected: byte *_frameBuffer2; byte *_scaledBuffer; byte *_drawBuffer; - byte *_scaledBuffer2; byte *_inBuffer; uint32 _inBufferSize; byte *_decompBuffer; @@ -61,7 +60,6 @@ protected: uint16 _frameSkipped; uint32 _frameTicks; ScaleMode _scaleMode; - uint32 _scaling; public: DXAPlayer(); @@ -100,14 +98,6 @@ public: bool loadFile(const char *filename); /** - * Load a DXA encoded video file and setup scaling if required - * @param filename the filename to load - * @param maxWidth the maximum width available to the film - * @param maxHeight the maximum height available to the film - */ - bool loadFile(const char *filename, uint16 maxWidth, uint16 maxHeight); - - /** * Close a DXA encoded video file */ void closeFile(); |
