aboutsummaryrefslogtreecommitdiff
path: root/engines/queen
diff options
context:
space:
mode:
authorGregory Montoir2007-03-16 22:34:59 +0000
committerGregory Montoir2007-03-16 22:34:59 +0000
commit00bb66d60dc05f2525296c72acb898f54a1ed5b5 (patch)
treecffa4ebb3848b0bb6f393baf4ee891aed5c06ed4 /engines/queen
parent00e85d9f5705745cd9ce0fd70bc8a1ff11bb7fa1 (diff)
downloadscummvm-rg350-00bb66d60dc05f2525296c72acb898f54a1ed5b5.tar.gz
scummvm-rg350-00bb66d60dc05f2525296c72acb898f54a1ed5b5.tar.bz2
scummvm-rg350-00bb66d60dc05f2525296c72acb898f54a1ed5b5.zip
minor simplification
svn-id: r26150
Diffstat (limited to 'engines/queen')
-rw-r--r--engines/queen/music.cpp13
-rw-r--r--engines/queen/music.h3
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index d00694dc4a..63ed42e810 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -43,6 +43,8 @@ MidiMusic::MidiMusic(MidiDriver *driver, QueenEngine *vm)
_musicData = vm->resource()->loadFile(filename, 0, &_musicDataSize);
_numSongs = READ_LE_UINT16(_musicData);
this->open();
+
+ _tune = vm->resource()->isDemo() ? Sound::_tuneDemo : Sound::_tune;
}
MidiMusic::~MidiMusic() {
@@ -194,7 +196,7 @@ void MidiMusic::queueTuneList(int16 tuneList) {
return;
}
- int mode = (_numSongs == 40) ? Sound::_tuneDemo[tuneList].mode : Sound::_tune[tuneList].mode;
+ int mode = _tune[tuneList].mode;
switch (mode) {
case 0: // random loop
_randomLoop = true;
@@ -210,13 +212,8 @@ void MidiMusic::queueTuneList(int16 tuneList) {
}
int i = 0;
- if (_numSongs == 40) {
- while (Sound::_tuneDemo[tuneList].tuneNum[i])
- queueSong(Sound::_tuneDemo[tuneList].tuneNum[i++] - 1);
- } else {
- while (Sound::_tune[tuneList].tuneNum[i])
- queueSong(Sound::_tune[tuneList].tuneNum[i++] - 1);
- }
+ while (_tune[tuneList].tuneNum[i])
+ queueSong(_tune[tuneList].tuneNum[i++] - 1);
if (_randomLoop)
_queuePos = randomQueuePos();
diff --git a/engines/queen/music.h b/engines/queen/music.h
index 0d0a845306..117bb5a662 100644
--- a/engines/queen/music.h
+++ b/engines/queen/music.h
@@ -30,6 +30,8 @@ class MidiParser;
namespace Queen {
+struct tuneData;
+
class QueenEngine;
class MidiMusic : public MidiDriver {
@@ -100,6 +102,7 @@ protected:
uint32 _musicDataSize;
bool _vToggle;
byte *_musicData;
+ const tuneData *_tune;
};
} // End of namespace Queen