diff options
author | Torbjörn Andersson | 2006-08-26 12:29:00 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-08-26 12:29:00 +0000 |
commit | cc3b4cdf9937f3d89bb058f9af652c1b371f7222 (patch) | |
tree | 7886990150583d75f427e6e44c16024ec16152c2 /engines/sword1 | |
parent | 96ec0d08ac6498f8d05996e048ae587b4bcb0c50 (diff) | |
download | scummvm-rg350-cc3b4cdf9937f3d89bb058f9af652c1b371f7222.tar.gz scummvm-rg350-cc3b4cdf9937f3d89bb058f9af652c1b371f7222.tar.bz2 scummvm-rg350-cc3b4cdf9937f3d89bb058f9af652c1b371f7222.zip |
Now that the cutscene handling in both BS1 and BS2 has been extended to play
DXA movies (the MPEG movies still work, of course), there is no longer any need
for the MPEG decoder to handle sound and frame syncing. That is now the
responsibility of the player, not the decoder.
The obvious next step, then, would be to put that in a new player class, and
have both BS1 and BS2 use that. Maybe FF as well.
svn-id: r23757
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/animation.cpp | 15 | ||||
-rw-r--r-- | engines/sword1/animation.h | 3 |
2 files changed, 6 insertions, 12 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 9c02c431c3..f33277f21e 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -186,6 +186,7 @@ void MoviePlayer::play(void) { _scr->clearScreen(); _framesSkipped = 0; _ticks = _sys->getMillis(); + _bgSoundStream = Audio::AudioStream::openStreamFile(sequenceList[_id]); if (_bgSoundStream) { _snd->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSoundHandle, _bgSoundStream); } @@ -318,9 +319,6 @@ bool MoviePlayerDXA::load(uint32 id) { _frameHeight = getHeight(); _frameX = (640 - _frameWidth) / 2; _frameY = (480 - _frameHeight) / 2; - if (!_bgSoundStream) { - _bgSoundStream = Audio::AudioStream::openStreamFile(sequenceList[id]); - } return true; } return false; @@ -395,8 +393,8 @@ void MoviePlayerMPEG::insertOverlay(OverlayColor *buf, uint8 *ovl, OverlayColor bool MoviePlayerMPEG::load(uint32 id) { if (MoviePlayer::load(id)) { - _anim = new AnimationState(this, _scr, _snd, _sys); - return _anim->init(sequenceList[id], _bgSoundStream); + _anim = new AnimationState(this, _scr, _sys); + return _anim->init(sequenceList[id]); } return false; } @@ -450,11 +448,8 @@ void MoviePlayerMPEG::processFrame(void) { #endif } -void MoviePlayerMPEG::syncFrame(void) { -} - -AnimationState::AnimationState(MoviePlayer *player, Screen *scr, Audio::Mixer *snd, OSystem *sys) - : BaseAnimationState(snd, sys, 640, 400), _player(player), _scr(scr) { +AnimationState::AnimationState(MoviePlayer *player, Screen *scr, OSystem *sys) + : BaseAnimationState(sys, 640, 400), _player(player), _scr(scr) { } AnimationState::~AnimationState(void) { diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h index 1b484e9583..07aa5241f0 100644 --- a/engines/sword1/animation.h +++ b/engines/sword1/animation.h @@ -120,7 +120,7 @@ private: Screen *_scr; public: - AnimationState(MoviePlayer *player, Screen *scr, Audio::Mixer *snd, OSystem *sys); + AnimationState(MoviePlayer *player, Screen *scr, OSystem *sys); ~AnimationState(void); OverlayColor *giveRgbBuffer(void); @@ -149,7 +149,6 @@ protected: bool initOverlays(uint32 id); bool decodeFrame(void); void processFrame(void); - void syncFrame(void); void updateScreen(void); void handleScreenChanged(void); }; |