mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 05:36:12 +00:00
Merged o_playMusic() into o1_playTune().
svn-id: r21748
This commit is contained in:
parent
9dcd19778f
commit
f444a68ffa
@ -1053,7 +1053,32 @@ void SimonEngine::o1_doClassIcons() {
|
||||
|
||||
void SimonEngine::o1_playTune() {
|
||||
// 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() {
|
||||
@ -1939,35 +1964,6 @@ void SimonEngine::o_unlockZone() {
|
||||
_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) {
|
||||
uint16 id = to16Wrapper(a);
|
||||
_lockWord |= 0x8000;
|
||||
|
@ -574,7 +574,6 @@ protected:
|
||||
void o_waitForSync(uint a);
|
||||
void skipSpeech();
|
||||
void o_sync(uint a);
|
||||
void o_playMusic();
|
||||
void o_saveGame();
|
||||
void o_loadGame();
|
||||
void o_confirmQuit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user