From 5d32a2c034a1e9036c9dcc721b6bfe27c46eb904 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Sun, 5 Dec 2004 02:55:06 +0000 Subject: added support for an international BS1 cutscene pack (which we didn't release yet) svn-id: r15983 --- graphics/animation.cpp | 8 ++++++-- graphics/animation.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'graphics') diff --git a/graphics/animation.cpp b/graphics/animation.cpp index ff0968e18a..1e472e0608 100644 --- a/graphics/animation.cpp +++ b/graphics/animation.cpp @@ -46,7 +46,7 @@ BaseAnimationState::~BaseAnimationState() { } -bool BaseAnimationState::init(const char *name) { +bool BaseAnimationState::init(const char *name, void *audioArg) { #ifdef USE_MPEG2 char tempFile[512]; @@ -130,7 +130,7 @@ bool BaseAnimationState::init(const char *name) { ticks = _sys->getMillis(); // Play audio - bgSoundStream = AudioStream::openStreamFile(name); + bgSoundStream = createAudioStream(name, audioArg); if (bgSoundStream != NULL) { _snd->playInputStream(&bgSound, bgSoundStream, false, -1, 255, 0, false); @@ -144,6 +144,10 @@ bool BaseAnimationState::init(const char *name) { #endif } +AudioStream *BaseAnimationState::createAudioStream(const char *name, void *arg) { + return AudioStream::openStreamFile(name); +} + bool BaseAnimationState::decodeFrame() { #ifdef USE_MPEG2 mpeg2_state_t state; diff --git a/graphics/animation.h b/graphics/animation.h index 727c8bd298..5227827cf9 100644 --- a/graphics/animation.h +++ b/graphics/animation.h @@ -117,7 +117,7 @@ public: BaseAnimationState(SoundMixer *snd, OSystem *sys, int width, int height); virtual ~BaseAnimationState(); - bool init(const char *name); + bool init(const char *name, void *audioArg = NULL); bool decodeFrame(); #ifndef BACKEND_8BIT void invalidateLookup(bool rebuild); @@ -126,6 +126,7 @@ public: protected: bool checkPaletteSwitch(); virtual void drawYUV(int width, int height, byte *const *dat) = 0; + virtual AudioStream *createAudioStream(const char *name, void *arg); #ifdef BACKEND_8BIT void buildLookup(int p, int lines); -- cgit v1.2.3