diff options
author | Matthew Hoops | 2012-07-23 21:04:51 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-07-23 21:04:51 -0400 |
commit | a652f6669e2e9225aee17431784b433397b41ae3 (patch) | |
tree | 9b3c000e20ab019f5927132025868ca898877b2f /engines/agos | |
parent | 3a780a63db79c2a1b2527e6510182a74f6fcfe12 (diff) | |
download | scummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.tar.gz scummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.tar.bz2 scummvm-rg350-a652f6669e2e9225aee17431784b433397b41ae3.zip |
VIDEO: Rewrite SmackerDecoder to use the new API
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/animation.cpp | 12 | ||||
-rw-r--r-- | engines/agos/animation.h | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 10c01741ae..3e8488d7d5 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -415,7 +415,7 @@ void MoviePlayerDXA::updateBalance() { MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name) - : MoviePlayer(vm), SmackerDecoder(vm->_mixer) { + : MoviePlayer(vm), SmackerDecoder() { debug(0, "Creating SMK cutscene player"); memset(baseName, 0, sizeof(baseName)); @@ -431,12 +431,12 @@ bool MoviePlayerSMK::load() { if (!loadStream(videoStream)) error("Failed to load video stream from file %s", videoName.c_str()); + start(); + debug(0, "Playing video %s", videoName.c_str()); CursorMan.showMouse(false); - _firstFrameOffset = _fileStream->pos(); - return true; } @@ -477,10 +477,8 @@ void MoviePlayerSMK::handleNextFrame() { } void MoviePlayerSMK::nextFrame() { - if (_vm->_interactiveVideo == TYPE_LOOPING && endOfVideo()) { - _fileStream->seek(_firstFrameOffset); - _curFrame = -1; - } + if (_vm->_interactiveVideo == TYPE_LOOPING && endOfVideo()) + rewind(); if (!endOfVideo()) { decodeNextFrame(); diff --git a/engines/agos/animation.h b/engines/agos/animation.h index d1ff074b03..37a666b201 100644 --- a/engines/agos/animation.h +++ b/engines/agos/animation.h @@ -67,9 +67,6 @@ protected: virtual void handleNextFrame(); virtual bool processFrame() = 0; virtual void startSound() {} - -protected: - uint32 _firstFrameOffset; }; class MoviePlayerDXA : public MoviePlayer, Video::DXADecoder { @@ -93,6 +90,7 @@ private: bool processFrame(); void startSound(); void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch); + uint32 _firstFrameOffset; }; class MoviePlayerSMK : public MoviePlayer, Video::SmackerDecoder { |