aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse.cpp
diff options
context:
space:
mode:
authorJamieson Christian2002-12-21 23:19:42 +0000
committerJamieson Christian2002-12-21 23:19:42 +0000
commit01ffb7bec239994872642ee8ca7f1979e677e54b (patch)
tree984a1efdf6ec138b7eabff7e63463fe713da47f1 /scumm/imuse.cpp
parente4b1a7e709be3baac54b47dc805deec7faee847b (diff)
downloadscummvm-rg350-01ffb7bec239994872642ee8ca7f1979e677e54b.tar.gz
scummvm-rg350-01ffb7bec239994872642ee8ca7f1979e677e54b.tar.bz2
scummvm-rg350-01ffb7bec239994872642ee8ca7f1979e677e54b.zip
Fix to instrument load/save
svn-id: r6051
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r--scumm/imuse.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index ceca85fbeb..951c9bea55 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -3094,13 +3094,17 @@ int IMuseInternal::save_or_load(Serializer *ser, Scumm *scumm)
ser->saveLoadArrayOf(_players, ARRAYSIZE(_players), sizeof(_players[0]), playerEntries);
ser->saveLoadArrayOf(_parts, ARRAYSIZE(_parts), sizeof(_parts[0]), partEntries);
- // Load/save the instrument definitions, which were revamped with V11.
- if (ser->getVersion() >= VER_V11) {
+ { // Load/save the instrument definitions, which were revamped with V11.
int i;
Part *part = &_parts[0];
- for (i = ARRAYSIZE(_parts); i; --i, ++part) {
- part->_program = 255;
- part->_instrument.saveOrLoad (ser);
+ if (ser->getVersion() >= VER_V11) {
+ for (i = ARRAYSIZE(_parts); i; --i, ++part) {
+ part->_program = 255;
+ part->_instrument.saveOrLoad (ser);
+ }
+ } else {
+ for (i = ARRAYSIZE(_parts); i; --i, ++part)
+ part->_instrument.clear();
}
}