aboutsummaryrefslogtreecommitdiff
path: root/simon/midi.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-05-24 03:10:14 +0000
committerJamieson Christian2003-05-24 03:10:14 +0000
commit1b4b6030fedf0fde1431e2e53d03a97caade4005 (patch)
tree8f6d32873ade45a8ad982740ddc32fa284d4711a /simon/midi.cpp
parentbcdf2286f8d877efbb2f7d5434b5e228e150d808 (diff)
downloadscummvm-rg350-1b4b6030fedf0fde1431e2e53d03a97caade4005.tar.gz
scummvm-rg350-1b4b6030fedf0fde1431e2e53d03a97caade4005.tar.bz2
scummvm-rg350-1b4b6030fedf0fde1431e2e53d03a97caade4005.zip
Added support for GMF loop specifier
svn-id: r7874
Diffstat (limited to 'simon/midi.cpp')
-rw-r--r--simon/midi.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 9159f6f993..bb19e43b9f 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -298,10 +298,15 @@ void MidiPlayer::loadSMF (File *in, int song, bool sfx) {
p->data = (byte *) calloc (size + 4, 1);
in->read (p->data, size);
- // For GMF files, we're going to have to use
- // hardcoded size tables.
- if (!memcmp (p->data, "GMF\x1", 4) && size == 64000)
- size = simon1_gmf_size [song];
+ if (!memcmp (p->data, "GMF\x1", 4)) {
+ if (!sfx)
+ setLoop (p->data[6] != 0);
+
+ // For GMF files, we're going to have to use
+ // hardcoded size tables.
+ if (size == 64000)
+ size = simon1_gmf_size [song];
+ }
MidiParser *parser = MidiParser::createParser_SMF();
parser->property (MidiParser::mpMalformedPitchBends, 1);