diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/m4/animation.cpp | 10 | ||||
-rw-r--r-- | engines/m4/animation.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp index 192c096640..28853938ae 100644 --- a/engines/m4/animation.cpp +++ b/engines/m4/animation.cpp @@ -118,7 +118,11 @@ void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4S buffer[FILENAME_SIZE] = '\0'; _soundName = Common::String(buffer); - animStream->skip(26); + animStream->skip(13); + animStream->read(buffer, FILENAME_SIZE); + buffer[FILENAME_SIZE] = '\0'; + _dsrName = Common::String(buffer); + animStream->read(buffer, FILENAME_SIZE); buffer[FILENAME_SIZE] = '\0'; Common::String fontResource(buffer); @@ -220,6 +224,10 @@ void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4S warning("Attempted to set a font with an empty name"); } + // If a speech file is specified, then load it + if (!_dsrName.empty()) + _vm->_sound->loadDSRFile(_dsrName.c_str()); + // Load all the sprite sets for the animation for (int i = 0; i < spriteListCount; ++i) { if (_field12 && (i == _spriteListIndex)) diff --git a/engines/m4/animation.h b/engines/m4/animation.h index 135618d7e2..21fa411426 100644 --- a/engines/m4/animation.h +++ b/engines/m4/animation.h @@ -90,6 +90,7 @@ private: Common::String _lbmFilename; Common::String _spritesFilename; Common::String _soundName; + Common::String _dsrName; Common::Array<int> _spriteListIndexes; int _currentFrame, _oldFrameEntry; |