aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse/imuse.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-12-14 11:57:49 -0800
committerJohannes Schickel2012-12-14 11:57:49 -0800
commit97d7bf9b9aaa1aac4939d2a690f65fde7e844b63 (patch)
tree2b315520ba205d324761861b831558c68e567963 /engines/scumm/imuse/imuse.cpp
parentebaa3fb6715fbbc3227edec2c1457e3a41c9212d (diff)
parentd3cf4d10f27a6349f08bee66713e9032d81cb8f8 (diff)
downloadscummvm-rg350-97d7bf9b9aaa1aac4939d2a690f65fde7e844b63.tar.gz
scummvm-rg350-97d7bf9b9aaa1aac4939d2a690f65fde7e844b63.tar.bz2
scummvm-rg350-97d7bf9b9aaa1aac4939d2a690f65fde7e844b63.zip
Merge pull request #291 from eriktorbjorn/mac-mi-music-final
SCUMM: Add support for Macintosh music in Monkey Island 1 and Loom
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();