Merged o_playMusic() into o1_playTune().
svn-id: r21748
This commit is contained in:
parent
9dcd19778f
commit
f444a68ffa
2 changed files with 26 additions and 31 deletions
|
@ -1053,7 +1053,32 @@ void SimonEngine::o1_doClassIcons() {
|
||||||
|
|
||||||
void SimonEngine::o1_playTune() {
|
void SimonEngine::o1_playTune() {
|
||||||
// 127: deals with music
|
// 127: deals with music
|
||||||
o_playMusic();
|
int music = getVarOrWord();
|
||||||
|
int track = getVarOrWord();
|
||||||
|
|
||||||
|
// Jamieson630:
|
||||||
|
// This appears to be a "load or play music" command.
|
||||||
|
// The music resource is specified, and optionally
|
||||||
|
// a track as well. Normally we see two calls being
|
||||||
|
// made, one to load the resource and another to
|
||||||
|
// actually start a track (so the resource is
|
||||||
|
// effectively preloaded so there's no latency when
|
||||||
|
// starting playback).
|
||||||
|
if (getGameType() == GType_SIMON2) {
|
||||||
|
int loop = getVarOrByte();
|
||||||
|
|
||||||
|
midi.setLoop(loop != 0);
|
||||||
|
if (_lastMusicPlayed != music)
|
||||||
|
_nextMusicToPlay = music;
|
||||||
|
else
|
||||||
|
midi.startTrack(track);
|
||||||
|
} else {
|
||||||
|
if (music != _lastMusicPlayed) {
|
||||||
|
_lastMusicPlayed = music;
|
||||||
|
loadMusic(music);
|
||||||
|
midi.startTrack(track);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::o1_waitEndTune() {
|
void SimonEngine::o1_waitEndTune() {
|
||||||
|
@ -1939,35 +1964,6 @@ void SimonEngine::o_unlockZone() {
|
||||||
_vgaBufStart = _vgaFileBufOrg;
|
_vgaBufStart = _vgaFileBufOrg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::o_playMusic() {
|
|
||||||
int music = getVarOrWord();
|
|
||||||
int track = getVarOrWord();
|
|
||||||
|
|
||||||
// Jamieson630:
|
|
||||||
// This appears to be a "load or play music" command.
|
|
||||||
// The music resource is specified, and optionally
|
|
||||||
// a track as well. Normally we see two calls being
|
|
||||||
// made, one to load the resource and another to
|
|
||||||
// actually start a track (so the resource is
|
|
||||||
// effectively preloaded so there's no latency when
|
|
||||||
// starting playback).
|
|
||||||
if (getGameType() == GType_SIMON2) {
|
|
||||||
int loop = getVarOrByte();
|
|
||||||
|
|
||||||
midi.setLoop (loop != 0);
|
|
||||||
if (_lastMusicPlayed != music)
|
|
||||||
_nextMusicToPlay = music;
|
|
||||||
else
|
|
||||||
midi.startTrack (track);
|
|
||||||
} else {
|
|
||||||
if (music != _lastMusicPlayed) {
|
|
||||||
_lastMusicPlayed = music;
|
|
||||||
loadMusic (music);
|
|
||||||
midi.startTrack (track);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimonEngine::o_sync(uint a) {
|
void SimonEngine::o_sync(uint a) {
|
||||||
uint16 id = to16Wrapper(a);
|
uint16 id = to16Wrapper(a);
|
||||||
_lockWord |= 0x8000;
|
_lockWord |= 0x8000;
|
||||||
|
|
|
@ -574,7 +574,6 @@ protected:
|
||||||
void o_waitForSync(uint a);
|
void o_waitForSync(uint a);
|
||||||
void skipSpeech();
|
void skipSpeech();
|
||||||
void o_sync(uint a);
|
void o_sync(uint a);
|
||||||
void o_playMusic();
|
|
||||||
void o_saveGame();
|
void o_saveGame();
|
||||||
void o_loadGame();
|
void o_loadGame();
|
||||||
void o_confirmQuit();
|
void o_confirmQuit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue