From 841356ac80a869b199b65e169ee3aa361d657d37 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 29 Jun 2010 11:09:33 +0000 Subject: Added loading of the correct DSR file at the start of each animation scene svn-id: r50490 --- engines/m4/animation.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/m4/animation.cpp') 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)) -- cgit v1.2.3