[Scummvm-cvs-logs] SF.net SVN: scummvm: [29351] scummvm/trunk
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Thu Nov 1 07:00:17 CET 2007
Revision: 29351
http://scummvm.svn.sourceforge.net/scummvm/?rev=29351&view=rev
Author: Kirben
Date: 2007-10-31 23:00:16 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
Revert patch #1709219 - DXA Player: double size scaling option.
Modified Paths:
--------------
scummvm/trunk/engines/agos/animation.cpp
scummvm/trunk/engines/agos/animation.h
scummvm/trunk/engines/sword1/animation.cpp
scummvm/trunk/engines/sword2/animation.cpp
scummvm/trunk/graphics/dxa_player.cpp
scummvm/trunk/graphics/dxa_player.h
Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/engines/agos/animation.cpp 2007-11-01 06:00:16 UTC (rev 29351)
@@ -44,7 +44,6 @@
MoviePlayer::MoviePlayer(AGOSEngine *vm, Audio::Mixer *mixer)
: DXAPlayer(), _vm(vm), _mixer(mixer) {
_omniTV = false;
- _omniTVLoad = false;
_omniTVFile = 0;
@@ -68,15 +67,7 @@
// Change file extension to dxa
sprintf(videoName, "%s.dxa", baseName);
- uint16 dstWidth = _vm->_screenWidth;
- uint16 dstHeight = _vm->_screenHeight;
- if (_omniTVLoad) {
- dstWidth = 56;
- dstHeight = 104;
- _omniTVLoad = false;
- }
-
- if (!loadFile(videoName, dstWidth, dstHeight)) {
+ if (!loadFile(videoName)) {
// Check short filename to work around
// bug in a German Windows 2CD version.
if (baseLen >= 8) {
@@ -129,7 +120,6 @@
_omniTV = true;
} else {
_vm->_variableArray[254] = 6747;
- _omniTVLoad = true;
}
}
}
@@ -258,7 +248,6 @@
_omniTVFile = 0;
closeFile();
_vm->_variableArray[254] = 6747;
- _omniTVLoad = true;
}
}
Modified: scummvm/trunk/engines/agos/animation.h
===================================================================
--- scummvm/trunk/engines/agos/animation.h 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/engines/agos/animation.h 2007-11-01 06:00:16 UTC (rev 29351)
@@ -47,7 +47,7 @@
Audio::SoundHandle _omniTVSound;
Common::SeekableReadStream *_omniTVFile;
- bool _omniTV, _omniTVLoad;
+ bool _omniTV;
bool _leftButtonDown;
bool _rightButtonDown;
uint32 _ticks;
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/engines/sword1/animation.cpp 2007-11-01 06:00:16 UTC (rev 29351)
@@ -408,7 +408,7 @@
char filename[20];
snprintf(filename, sizeof(filename), "%s.dxa", sequenceList[id]);
- if (loadFile(filename, 640, 480)) {
+ if (loadFile(filename)) {
// The Broken Sword games always use external audio tracks.
if (_fd->readUint32BE() != MKID_BE('NULL'))
return false;
Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/engines/sword2/animation.cpp 2007-11-01 06:00:16 UTC (rev 29351)
@@ -516,9 +516,7 @@
snprintf(filename, sizeof(filename), "%s.dxa", _name);
- if (loadFile(filename,
- _vm->_screen->getScreenWide(),
- _vm->_screen->getScreenDeep())) {
+ if (loadFile(filename)) {
// The Broken Sword games always use external audio tracks.
if (_fd->readUint32BE() != MKID_BE('NULL'))
return false;
Modified: scummvm/trunk/graphics/dxa_player.cpp
===================================================================
--- scummvm/trunk/graphics/dxa_player.cpp 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/graphics/dxa_player.cpp 2007-11-01 06:00:16 UTC (rev 29351)
@@ -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 @@
_frameBuffer2 = 0;
_scaledBuffer = 0;
_drawBuffer = 0;
- _scaledBuffer2 = 0;
_inBuffer = 0;
_inBufferSize = 0;
@@ -76,8 +58,6 @@
_frameTicks = 0;
_scaleMode = S_NONE;
-
- _scaling = 1;
}
DXAPlayer::~DXAPlayer() {
@@ -86,13 +66,13 @@
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 @@
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 @@
free(_frameBuffer1);
free(_frameBuffer2);
free(_scaledBuffer);
- free(_scaledBuffer2);
free(_inBuffer);
free(_decompBuffer);
@@ -628,12 +588,6 @@
_drawBuffer = _frameBuffer1;
break;
}
-
- if (_scaling == 2) {
- /* Scale up here */
- scaleUpBy2(_scaledBuffer2, _drawBuffer, _width, _height);
- _drawBuffer = _scaledBuffer2;
- }
}
} // End of namespace Graphics
Modified: scummvm/trunk/graphics/dxa_player.h
===================================================================
--- scummvm/trunk/graphics/dxa_player.h 2007-11-01 02:10:55 UTC (rev 29350)
+++ scummvm/trunk/graphics/dxa_player.h 2007-11-01 06:00:16 UTC (rev 29351)
@@ -47,7 +47,6 @@
byte *_frameBuffer2;
byte *_scaledBuffer;
byte *_drawBuffer;
- byte *_scaledBuffer2;
byte *_inBuffer;
uint32 _inBufferSize;
byte *_decompBuffer;
@@ -61,7 +60,6 @@
uint16 _frameSkipped;
uint32 _frameTicks;
ScaleMode _scaleMode;
- uint32 _scaling;
public:
DXAPlayer();
@@ -100,14 +98,6 @@
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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list