diff options
author | Travis Howell | 2008-12-14 23:41:48 +0000 |
---|---|---|
committer | Travis Howell | 2008-12-14 23:41:48 +0000 |
commit | 9c20a533bb121d97088e19ce620b1172b16fa8a1 (patch) | |
tree | f8a5832a9cf36e1f55690712da16284f50c8028a /engines/scumm/he | |
parent | 41499091b051ae1327b5d35e9593525fd6e749dd (diff) | |
download | scummvm-rg350-9c20a533bb121d97088e19ce620b1172b16fa8a1.tar.gz scummvm-rg350-9c20a533bb121d97088e19ce620b1172b16fa8a1.tar.bz2 scummvm-rg350-9c20a533bb121d97088e19ce620b1172b16fa8a1.zip |
Enable Smacker support, and switch later HE games to Smacker support (since they aren't supported yet).
svn-id: r35368
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/animation_he.cpp | 41 | ||||
-rw-r--r-- | engines/scumm/he/animation_he.h | 4 |
2 files changed, 13 insertions, 32 deletions
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 24badd2685..3691f7cae1 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -33,59 +33,41 @@ namespace Scumm { MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) - : DXAPlayer(), _vm(vm), _mixer(mixer) { + : SMKPlayer(), _vm(vm), _mixer(mixer) { _flags = 0; _wizResNum = 0; } int MoviePlayer::getImageNum() { - if (!_fd) + if (!_fileStream) return 0; return _wizResNum; } int MoviePlayer::load(const char *filename, int flags, int image) { - char videoName[100]; - - if (_fd) { + if (_fileStream) { closeFile(); } - int baseLen = strlen(filename) - 4; - memset(baseName, 0, sizeof(baseName)); - memcpy(baseName, filename, baseLen); - - // Change file extension to dxa - sprintf(videoName, "%s.dxa", baseName); - - if (!loadFile(videoName)) { - warning("Failed to load video file %s", videoName); + if (!loadFile(filename)) { + warning("Failed to load video file %s", filename); return -1; } - debug(1, "Playing video %s", videoName); - - // Skip sound tag - _fd->readUint32BE(); + debug(1, "Playing video %s", filename); if (flags & 2) { - _vm->_wiz->createWizEmptyImage(image, 0, 0, _width, _height); + _vm->_wiz->createWizEmptyImage(image, 0, 0, getWidth(), getHeight()); } _flags = flags; _wizResNum = image; - _bgSoundStream = Audio::AudioStream::openStreamFile(baseName); - if (_bgSoundStream != NULL) { - _mixer->stopHandle(_bgSound); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream); - } - return 0; } void MoviePlayer::handleNextFrame() { - if (_fd == false) { + if (_fileStream == false) { return; } @@ -102,16 +84,15 @@ void MoviePlayer::handleNextFrame() { } else if (_flags & 1) { copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, _vm->_screenWidth); - Common::Rect imageRect(_width, _height); + Common::Rect imageRect(getWidth(), getHeight()); _vm->restoreBackgroundHE(imageRect); } else { copyFrameToBuffer(pvs->getPixels(0, 0), 0, 0, _vm->_screenWidth); - _vm->markRectAsDirty(kMainVirtScreen, 0, 0, _width, _height); + _vm->markRectAsDirty(kMainVirtScreen, 0, 0, getWidth(), getHeight()); } - _frameNum++; - if (_frameNum == _framesCount) { + if (getCurFrame() == _framesCount) { closeFile(); } } diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h index 1d04c3e5df..7516ce79a4 100644 --- a/engines/scumm/he/animation_he.h +++ b/engines/scumm/he/animation_he.h @@ -28,7 +28,7 @@ #include "common/file.h" -#include "graphics/dxa_player.h" +#include "graphics/smk_player.h" #include "sound/mixer.h" @@ -36,7 +36,7 @@ namespace Scumm { class ScummEngine_v90he; -class MoviePlayer : public Graphics::DXAPlayer { +class MoviePlayer : public Graphics::SMKPlayer { ScummEngine_v90he *_vm; Audio::Mixer *_mixer; |