diff options
| -rw-r--r-- | engines/gob/videoplayer.cpp | 8 | ||||
| -rw-r--r-- | graphics/video/coktel_decoder.cpp | 12 | ||||
| -rw-r--r-- | graphics/video/coktel_decoder.h | 8 | 
3 files changed, 15 insertions, 13 deletions
| diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index b96e67550c..0d72751c87 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -714,13 +714,13 @@ Graphics::CoktelDecoder *VideoPlayer::openVideo(const Common::String &file, Prop  	Graphics::CoktelDecoder *video = 0;  	if (properties.type == kVideoTypeIMD) -		video = new Graphics::IMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType); +		video = new Graphics::IMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);  	else if (properties.type == kVideoTypePreIMD) -		video = new Graphics::PreIMDDecoder(properties.width, properties.height, *_vm->_mixer, Audio::Mixer::kSFXSoundType); +		video = new Graphics::PreIMDDecoder(properties.width, properties.height, _vm->_mixer, Audio::Mixer::kSFXSoundType);  	else if (properties.type == kVideoTypeVMD) -		video = new Graphics::VMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType); +		video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);  	else if (properties.type == kVideoTypeRMD) -		video = new Graphics::VMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType); +		video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);  	else  		warning("Couldn't open video \"%s\": Invalid video Type", fileName.c_str()); 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); | 
