aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse/imuse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/imuse/imuse.cpp')
-rw-r--r--engines/scumm/imuse/imuse.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 016ba89e7b..b69ce552bc 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -363,7 +363,7 @@ void IMuseInternal::pause(bool paused) {
_paused = paused;
}
-int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
+int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm, bool fixAfterLoad) {
Common::StackLock lock(_mutex, "IMuseInternal::save_or_load()");
const SaveLoadEntry mainEntries[] = {
MKLINE(IMuseInternal, _queue_end, sleUint8, VER(8)),
@@ -440,7 +440,16 @@ int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
for (i = 0; i < 8; ++i)
ser->saveLoadEntries(0, volumeFaderEntries);
- if (ser->isLoading()) {
+ // Normally, we have to fix up the data structures after loading a
+ // saved game. But there are cases where we don't. For instance, The
+ // Macintosh version of Monkey Island 1 used to convert the Mac0 music
+ // resources to General MIDI and play it through iMUSE as a rough
+ // approximation. Now it has its own player, but old savegame still
+ // have the iMUSE data in them. We have to skip that data, using a
+ // dummy iMUSE object, but since the resource is no longer recognizable
+ // to iMUSE, the fixup fails hard. So yes, this is a bit of a hack.
+
+ if (ser->isLoading() && fixAfterLoad) {
// Load all sounds that we need
fix_players_after_load(scumm);
fix_parts_after_load();