aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/animation.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2010-06-29 11:09:33 +0000
committerPaul Gilbert2010-06-29 11:09:33 +0000
commit841356ac80a869b199b65e169ee3aa361d657d37 (patch)
treedd63c5104e38688983856e940f7147f33d05b8b6 /engines/m4/animation.cpp
parenteb4a48bfd99e97540d553ffd51eb5b24d9c05486 (diff)
downloadscummvm-rg350-841356ac80a869b199b65e169ee3aa361d657d37.tar.gz
scummvm-rg350-841356ac80a869b199b65e169ee3aa361d657d37.tar.bz2
scummvm-rg350-841356ac80a869b199b65e169ee3aa361d657d37.zip
Added loading of the correct DSR file at the start of each animation scene
svn-id: r50490
Diffstat (limited to 'engines/m4/animation.cpp')
-rw-r--r--engines/m4/animation.cpp10
1 files changed, 9 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))