SAGA: Get rid of the MUSIC_DEFAULT flag

This commit is contained in:
Filippos Karapetis 2014-07-20 16:04:43 +03:00
parent 96dfeab1e5
commit b14a2599bc
3 changed files with 5 additions and 14 deletions

View file

@ -258,13 +258,8 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
int realTrackNumber;
if (_vm->getGameId() == GID_ITE) {
if (flags == MUSIC_DEFAULT) {
if (resourceId == 13 || resourceId == 19) {
flags = MUSIC_NORMAL;
} else {
if (flags == MUSIC_NORMAL && (resourceId == 13 || resourceId == 19))
flags = MUSIC_LOOP;
}
}
realTrackNumber = resourceId - 8;
} else {
realTrackNumber = resourceId + 1;
@ -359,9 +354,6 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
return;
}
if (flags == MUSIC_DEFAULT)
flags = MUSIC_NORMAL;
// Load MIDI/XMI resource data
if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
// Load the external music file for Mac IHNM

View file

@ -37,8 +37,7 @@ namespace Saga {
enum MusicFlags {
MUSIC_NORMAL = 0,
MUSIC_LOOP = 0x0001,
MUSIC_DEFAULT = 0xffff
MUSIC_LOOP = 0x0001
};
class MusicDriver : public Audio::MidiPlayer {
@ -72,7 +71,7 @@ public:
bool isPlaying();
bool hasDigitalMusic() { return _digitalMusic; }
void play(uint32 resourceId, MusicFlags flags = MUSIC_DEFAULT);
void play(uint32 resourceId, MusicFlags flags = MUSIC_NORMAL);
void pause();
void resume();
void stop();

View file

@ -792,7 +792,7 @@ void Scene::loadScene(LoadSceneParams &loadSceneParams) {
event.type = kEvTOneshot;
event.code = kMusicEvent;
event.param = _sceneDescription.musicResourceId;
event.param2 = MUSIC_DEFAULT;
event.param2 = MUSIC_NORMAL;
event.op = kEventPlay;
event.time = 0;
_vm->_events->queue(event);