Whitespace changes.

svn-id: r25567
This commit is contained in:
Torbjörn Andersson 2007-02-13 21:41:43 +00:00
parent 846a3498b8
commit c2972f09c2
4 changed files with 18 additions and 18 deletions

View File

@ -531,7 +531,7 @@ int AGOSEngine::init() {
midi.setDriver(driver);
int ret = midi.open();
if (ret)
warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
warning("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
midi.setVolume(ConfMan.getInt("music_volume"));
if (ConfMan.hasKey("music_mute") && ConfMan.getBool("music_mute") == 1)

View File

@ -83,9 +83,9 @@ bool Debugger::Cmd_PlayMusic(int argc, const char **argv) {
uint music = atoi(argv[1]);
uint range = (_vm->getGameType() == GType_SIMON2) ? 93 : 34;
if (music <= range) {
_vm->loadMusic (music);
_vm->loadMusic(music);
if (_vm->getGameType() == GType_SIMON2)
_vm->midi.startTrack (0);
_vm->midi.startTrack(0);
} else
DebugPrintf("Music out of range (0 - %d)\n", range);
} else

View File

@ -169,17 +169,17 @@ void AGOSEngine::loadMusic(uint music) {
_gameFile->read(buf, 4);
if (!memcmp(buf, "FORM", 4)) {
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music - 1], SEEK_SET);
midi.loadXMIDI (_gameFile);
midi.loadXMIDI(_gameFile);
} else {
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music - 1], SEEK_SET);
midi.loadMultipleSMF (_gameFile);
midi.loadMultipleSMF(_gameFile);
}
_lastMusicPlayed = music;
_nextMusicToPlay = -1;
} else if (getGameType() == GType_SIMON1) {
midi.stop();
midi.setLoop (true); // Must do this BEFORE loading music. (GMF may have its own override.)
midi.setLoop(true); // Must do this BEFORE loading music. (GMF may have its own override.)
if (getFeatures() & GF_TALKIE) {
// FIXME: The very last music resource, a cymbal crash for when the
@ -188,16 +188,16 @@ void AGOSEngine::loadMusic(uint music) {
// a loop override that acomplishes this, but there seems to be nothing
// for this in the SMF resources.
if (music == 35)
midi.setLoop (false);
midi.setLoop(false);
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music], SEEK_SET);
_gameFile->read(buf, 4);
if (!memcmp(buf, "GMF\x1", 4)) {
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music], SEEK_SET);
midi.loadSMF (_gameFile, music);
midi.loadSMF(_gameFile, music);
} else {
_gameFile->seek(_gameOffsetsPtr[_musicIndexBase + music], SEEK_SET);
midi.loadMultipleSMF (_gameFile);
midi.loadMultipleSMF(_gameFile);
}
} else {
@ -209,15 +209,15 @@ void AGOSEngine::loadMusic(uint music) {
error("loadMusic: Can't load music from '%s'", filename);
if (getFeatures() & GF_DEMO)
midi.loadS1D (&f);
midi.loadS1D(&f);
else
midi.loadSMF (&f, music);
midi.loadSMF(&f, music);
}
midi.startTrack (0);
midi.startTrack(0);
} else {
midi.stop();
midi.setLoop (true); // Must do this BEFORE loading music.
midi.setLoop(true); // Must do this BEFORE loading music.
char filename[15];
File f;
@ -226,8 +226,8 @@ void AGOSEngine::loadMusic(uint music) {
if (f.isOpen() == false)
error("loadMusic: Can't load music from '%s'", filename);
midi.loadS1D (&f);
midi.startTrack (0);
midi.loadS1D(&f);
midi.startTrack(0);
}
}

View File

@ -170,7 +170,7 @@ void AGOSEngine::vc71_ifSeqWaiting() {
// This command skips the next instruction
// unless (1) there is a track playing, AND
// (2) there is a track queued to play after it.
if (!midi.isPlaying (true))
if (!midi.isPlaying(true))
vcSkipNextInstruction();
}
@ -194,8 +194,8 @@ void AGOSEngine::vc72_segue() {
if (track == -1 || track == 999) {
midi.stop();
} else {
midi.setLoop (loop != 0);
midi.startTrack (track);
midi.setLoop(loop != 0);
midi.startTrack(track);
}
}