diff options
author | Sven Hesse | 2010-08-08 01:07:17 +0000 |
---|---|---|
committer | Sven Hesse | 2010-08-08 01:07:17 +0000 |
commit | dc3a41769976c5d25206f8a8b649ef36a4a1b51f (patch) | |
tree | 175f8da94de457644cd2d159f3ac449f92d8ecad /graphics/video | |
parent | f7c23d28e73af5a5fe290512d933e2f233e7debb (diff) | |
download | scummvm-rg350-dc3a41769976c5d25206f8a8b649ef36a4a1b51f.tar.gz scummvm-rg350-dc3a41769976c5d25206f8a8b649ef36a4a1b51f.tar.bz2 scummvm-rg350-dc3a41769976c5d25206f8a8b649ef36a4a1b51f.zip |
VIDEO: Change the mixer parameter from a reference to a pointer
To match the other VideoDecoder classes with sound support.
svn-id: r51919
Diffstat (limited to 'graphics/video')
-rw-r--r-- | graphics/video/coktel_decoder.cpp | 12 | ||||
-rw-r--r-- | graphics/video/coktel_decoder.h | 8 |
2 files changed, 11 insertions, 9 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index f9a5ad4b62..daa1047879 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -40,12 +40,14 @@ CoktelDecoder::State::State() : flags(0), speechId(0) { } -CoktelDecoder::CoktelDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : - _mixer(&mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0), +CoktelDecoder::CoktelDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : + _mixer(mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0), _defaultX(0), _defaultY(0), _features(0), _frameCount(0), _paletteDirty(false), _ownSurface(true), _frameRate(12), _hasSound(false), _soundEnabled(false), _soundStage(kSoundNone), _audioStream(0) { + assert(_mixer); + memset(_palette, 0, 768); } @@ -593,7 +595,7 @@ inline void CoktelDecoder::unsignedToSigned(byte *buffer, int length) { PreIMDDecoder::PreIMDDecoder(uint16 width, uint16 height, - Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), + Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), _stream(0), _videoBuffer(0), _videoBufferSize(0) { _width = width; @@ -781,7 +783,7 @@ PixelFormat PreIMDDecoder::getPixelFormat() const { } -IMDDecoder::IMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), +IMDDecoder::IMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), _stream(0), _version(0), _stdX(-1), _stdY(-1), _stdWidth(-1), _stdHeight(-1), _flags(0), _firstFramePos(0), _framePos(0), _frameCoords(0), _frameData(0), _frameDataSize(0), _frameDataLen(0), @@ -1470,7 +1472,7 @@ const int32 VMDDecoder::_tableADPCMStep[] = { -1, -1, -1, -1, 2, 4, 6, 8 }; -VMDDecoder::VMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), +VMDDecoder::VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), _stream(0), _version(0), _flags(0), _frameInfoOffset(0), _partsPerFrame(0), _frames(0), _soundFlags(0), _soundFreq(0), _soundSliceSize(0), _soundSlicesCount(0), _soundBytesPerSample(0), _soundStereo(0), _soundHeaderSize(0), _soundDataSize(0), diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index 415e59c636..97be9df44b 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -60,7 +60,7 @@ public: State(); }; - CoktelDecoder(Audio::Mixer &mixer, + CoktelDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~CoktelDecoder(); @@ -213,7 +213,7 @@ protected: class PreIMDDecoder : public CoktelDecoder { public: - PreIMDDecoder(uint16 width, uint16 height, Audio::Mixer &mixer, + PreIMDDecoder(uint16 width, uint16 height, Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~PreIMDDecoder(); @@ -245,7 +245,7 @@ private: class IMDDecoder : public CoktelDecoder { public: - IMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); + IMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~IMDDecoder(); bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); @@ -341,7 +341,7 @@ private: class VMDDecoder : public CoktelDecoder { public: - VMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); + VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~VMDDecoder(); bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); |