diff options
author | Torbjörn Andersson | 2006-07-10 09:29:12 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-07-10 09:29:12 +0000 |
commit | d8e974ba72a5ed9faf43e1a8fcd5611f4606e9db (patch) | |
tree | 3020f34e8fb35cdedfbb1debbbef3df2e8014d1e /engines | |
parent | f4b81b55ec548d31d8e766634d03d892f80f602d (diff) | |
download | scummvm-rg350-d8e974ba72a5ed9faf43e1a8fcd5611f4606e9db.tar.gz scummvm-rg350-d8e974ba72a5ed9faf43e1a8fcd5611f4606e9db.tar.bz2 scummvm-rg350-d8e974ba72a5ed9faf43e1a8fcd5611f4606e9db.zip |
Fixed bug #1519817, "ALL: Build failure if libmpeg2 is disabled".
svn-id: r23470
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword2/animation.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index cd0baaa980..fd6a2b0b5e 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -481,6 +481,8 @@ bool MoviePlayerDXA::load(const char *name, MovieTextObject *text[]) { #endif +#ifdef USE_MPEG2 + /////////////////////////////////////////////////////////////////////////////// // Movie player for the old MPEG movies /////////////////////////////////////////////////////////////////////////////// @@ -538,7 +540,23 @@ bool MoviePlayerMPEG::decodeFrame() { return result; } -#ifndef BACKEND_8BIT +AnimationState::AnimationState(Sword2Engine *vm, MoviePlayer *player) + : BaseAnimationState(vm->_mixer, vm->_system, 640, 480) { + _vm = vm; + _player = player; +} + +AnimationState::~AnimationState() { +} + +#ifdef BACKEND_8BIT + +void AnimationState::setPalette(byte *pal) { + _player->updatePalette(pal, false); +} + +#else + void MoviePlayerMPEG::handleScreenChanged() { _anim->handleScreenChanged(); } @@ -559,22 +577,6 @@ void MoviePlayerMPEG::drawTextObject(MovieTextObject *t) { _anim->drawTextObject(t->textSprite, _textSurface); } } -#endif - -AnimationState::AnimationState(Sword2Engine *vm, MoviePlayer *player) - : BaseAnimationState(vm->_mixer, vm->_system, 640, 480) { - _vm = vm; - _player = player; -} - -AnimationState::~AnimationState() { -} - -#ifdef BACKEND_8BIT -void AnimationState::setPalette(byte *pal) { - _player->updatePalette(pal, false); -} -#else void AnimationState::drawTextObject(SpriteInfo *s, byte *src) { int moviePitch = _movieScale * _movieWidth; @@ -625,7 +627,6 @@ void AnimationState::drawTextObject(SpriteInfo *s, byte *src) { src += s->w; } } - #endif void AnimationState::clearScreen() { @@ -670,6 +671,8 @@ void AnimationState::drawYUV(int width, int height, byte *const *dat) { #endif } +#endif + /////////////////////////////////////////////////////////////////////////////// // Dummy player for subtitled speech only /////////////////////////////////////////////////////////////////////////////// |