diff options
Diffstat (limited to 'engines/toon')
-rw-r--r-- | engines/toon/anim.cpp | 8 | ||||
-rw-r--r-- | engines/toon/audio.cpp | 2 | ||||
-rw-r--r-- | engines/toon/character.cpp | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 78d3954325..76b4154d61 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -41,7 +41,7 @@ bool Animation::loadAnimation(const Common::String &file) { if (strncmp((char *)fileData, "KevinAguilar", 12)) return false; - strcpy(_name, file.c_str()); + strncpy(_name, file.c_str(), 32); uint32 headerSize = READ_LE_UINT32(fileData + 16); uint32 uncompressedBytes = READ_LE_UINT32(fileData + 20); @@ -52,6 +52,7 @@ bool Animation::loadAnimation(const Common::String &file) { _x2 = READ_LE_UINT32(fileData + 40); _y2 = READ_LE_UINT32(fileData + 44); _paletteEntries = READ_LE_UINT32(fileData + 56); + // CHECKME: Useless variable _fps _fps = READ_LE_UINT32(fileData + 60); uint32 paletteSize = READ_LE_UINT32(fileData + 64); @@ -119,6 +120,10 @@ Animation::Animation(ToonEngine *vm) : _vm(vm) { _palette = NULL; _numFrames = 0; _frames = NULL; + + _x1 = _y1 = _x2 = _y2 = 0; + _fps = 0; + _paletteEntries = 0; } Animation::~Animation() { @@ -448,6 +453,7 @@ AnimationInstance::AnimationInstance(ToonEngine *vm, AnimationInstanceType type) _y = 0; _z = 0; _layerZ = 0; + _visible = false; } void AnimationInstance::render() { diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp index bc0e051057..50b559ee00 100644 --- a/engines/toon/audio.cpp +++ b/engines/toon/audio.cpp @@ -255,6 +255,8 @@ AudioStreamInstance::AudioStreamInstance(AudioManager *man, Audio::Mixer *mixer, } else { stopNow(); } + + _soundType = Audio::Mixer::kPlainSoundType; } AudioStreamInstance::~AudioStreamInstance() { diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 83c9e3ec70..baab8888cf 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -65,6 +65,7 @@ Character::Character(ToonEngine *vm) : _vm(vm) { _numPixelToWalk = 0; _nextIdleTime = _vm->_system->getMillis() + (_vm->randRange(0, 600) + 300) * _vm->getTickLength(); _lineToSayId = 0; + _time = 0; } Character::~Character(void) { |