aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toltecs')
-rw-r--r--engines/toltecs/music.cpp4
-rw-r--r--engines/toltecs/music.h7
-rw-r--r--engines/toltecs/script.cpp4
3 files changed, 5 insertions, 10 deletions
diff --git a/engines/toltecs/music.cpp b/engines/toltecs/music.cpp
index 84cb2f7148..ef44421de9 100644
--- a/engines/toltecs/music.cpp
+++ b/engines/toltecs/music.cpp
@@ -50,7 +50,7 @@ void MusicPlayer::send(uint32 b) {
Audio::MidiPlayer::send(b);
}
-void MusicPlayer::playMIDI(const byte *data, uint32 size, MusicFlags flags) {
+void MusicPlayer::playMIDI(const byte *data, uint32 size, bool loop) {
Common::StackLock lock(_mutex);
stopAndClear();
@@ -76,7 +76,7 @@ void MusicPlayer::playMIDI(const byte *data, uint32 size, MusicFlags flags) {
setVolume(127);
- _isLooping = flags & MUSIC_LOOP;
+ _isLooping = loop;
_isPlaying = true;
} else {
delete parser;
diff --git a/engines/toltecs/music.h b/engines/toltecs/music.h
index 45238213d8..c7189e89d6 100644
--- a/engines/toltecs/music.h
+++ b/engines/toltecs/music.h
@@ -29,16 +29,11 @@
namespace Toltecs {
-enum MusicFlags {
- MUSIC_NORMAL = 0,
- MUSIC_LOOP = 1
-};
-
class MusicPlayer : public Audio::MidiPlayer {
public:
MusicPlayer(bool isGM = true);
- void playMIDI(const byte *data, uint32 size, MusicFlags flags = MUSIC_NORMAL);
+ void playMIDI(const byte *data, uint32 size, bool loop = false);
void pause();
void resume();
void stopAndClear();
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 91a3f36e83..d95ac0ec06 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -1050,8 +1050,8 @@ void ScriptInterpreter::sfStartSequence() {
_vm->_arc->closeResource();
if (!memcmp(data, "FORM", 4)) {
- // TODO: Looping flag
- _vm->_musicPlayer->playMIDI(data, resourceSize);
+ // TODO: It seems that music is always looping?
+ _vm->_musicPlayer->playMIDI(data, resourceSize, true);
} else {
// TODO: Where does this occur? Are these SMF MIDI files?
warning("sfStartSequence: resource %d isn't XMIDI", sequenceResIndex);