aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse.cpp
diff options
context:
space:
mode:
authorJamieson Christian2002-12-21 20:10:47 +0000
committerJamieson Christian2002-12-21 20:10:47 +0000
commitf60bda7d5ccbb721f716c61434b23956e573403e (patch)
tree1210aca5150c02d37552ee4f2a8e368e6b68a18e /scumm/imuse.cpp
parent0182836591273b19abbeafd9ad2760fc0738a5e8 (diff)
downloadscummvm-rg350-f60bda7d5ccbb721f716c61434b23956e573403e.tar.gz
scummvm-rg350-f60bda7d5ccbb721f716c61434b23956e573403e.tar.bz2
scummvm-rg350-f60bda7d5ccbb721f716c61434b23956e573403e.zip
Implemented new instrumentation save/load.
Save/load version is now VER_V11. Adlib/MT-32 instrumentation is now saved and loaded. BACK UP YOUR VER_V10 SAVEGAMES, JUST IN CASE! svn-id: r6044
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r--scumm/imuse.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 08d47112ad..b1ddb67081 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -3127,6 +3127,17 @@ int IMuseInternal::save_or_load(Serializer *ser, Scumm *scumm)
ser->saveLoadEntries(this, mainEntries);
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) {
+ int i;
+ Part *part = &_parts[0];
+ for (i = ARRAYSIZE(_parts); i; --i, ++part) {
+ part->_program = 255;
+ part->_instrument.saveOrLoad (ser);
+ }
+ }
+
ser->saveLoadArrayOf(_volume_fader, ARRAYSIZE(_volume_fader),
sizeof(_volume_fader[0]), volumeFaderEntries);
@@ -3170,18 +3181,6 @@ void IMuseInternal::fix_players_after_load(Scumm *scumm)
scumm->getResourceAddress(rtSound, player->_id);
player->_mt32emulate = isMT32(player->_id);
player->_isGM = isGM(player->_id);
- if (scumm->_use_adlib) {
- // FIXME - This should make sure the right
- // instruments are loaded, but it does not
- // even try to move to the right position in
- // the track. Using scan() gives a marginally
- // better result, but not good enough.
- //
- // The correct fix is probably to store the
- // Adlib instruments, or information on where
- // to find them, in the savegame.
- player->jump(player->_track_index, 0, 0);
- }
}
}
}