aboutsummaryrefslogtreecommitdiff
path: root/graphics/video/coktel_decoder.cpp
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 01:07:17 +0000
committerSven Hesse2010-08-08 01:07:17 +0000
commitdc3a41769976c5d25206f8a8b649ef36a4a1b51f (patch)
tree175f8da94de457644cd2d159f3ac449f92d8ecad /graphics/video/coktel_decoder.cpp
parentf7c23d28e73af5a5fe290512d933e2f233e7debb (diff)
downloadscummvm-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/coktel_decoder.cpp')
-rw-r--r--graphics/video/coktel_decoder.cpp12
1 files changed, 7 insertions, 5 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),