aboutsummaryrefslogtreecommitdiff
path: root/engines
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
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')
-rw-r--r--engines/m4/animation.cpp10
-rw-r--r--engines/m4/animation.h1
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;