diff options
Diffstat (limited to 'engines/agos/debugger.cpp')
-rw-r--r-- | engines/agos/debugger.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/engines/agos/debugger.cpp b/engines/agos/debugger.cpp index 7a455fa0f9..ce50460621 100644 --- a/engines/agos/debugger.cpp +++ b/engines/agos/debugger.cpp @@ -83,13 +83,17 @@ bool Debugger::Cmd_DebugLevel(int argc, const char **argv) { bool Debugger::Cmd_PlayMusic(int argc, const char **argv) { if (argc > 1) { uint music = atoi(argv[1]); - uint range = (_vm->getGameType() == GType_SIMON2) ? 93 : 34; - if (music <= range) { - _vm->loadMusic(music); - if (_vm->getGameType() == GType_SIMON2) + if (music <= _vm->_numMusic) { + if (_vm->getGameType() == GType_PP) { + // TODO + } else if (_vm->getGameType() == GType_SIMON2) { + _vm->loadMusic(music); _vm->_midi.startTrack(0); + } else { + _vm->playMusic(music, 0); + } } else - DebugPrintf("Music out of range (0 - %d)\n", range); + DebugPrintf("Music out of range (0 - %d)\n", _vm->_numMusic); } else DebugPrintf("Syntax: music <musicnum>\n"); @@ -99,11 +103,10 @@ bool Debugger::Cmd_PlayMusic(int argc, const char **argv) { bool Debugger::Cmd_PlaySound(int argc, const char **argv) { if (argc > 1) { uint sound = atoi(argv[1]); - uint range = (_vm->getGameType() == GType_SIMON2) ? 222 : 127; - if (sound <= range) + if (sound <= _vm->_numSFX) _vm->_sound->playEffects(sound); else - DebugPrintf("Sound out of range (0 - %d)\n", range); + DebugPrintf("Sound out of range (0 - %d)\n", _vm->_numSFX); } else DebugPrintf("Syntax: sound <soundnum>\n"); @@ -113,11 +116,10 @@ bool Debugger::Cmd_PlaySound(int argc, const char **argv) { bool Debugger::Cmd_PlayVoice(int argc, const char **argv) { if (argc > 1) { uint voice = atoi(argv[1]); - uint range = (_vm->getGameType() == GType_SIMON2) ? 3632 : 1996; - if (voice <= range) + if (voice <= _vm->_numSpeech) _vm->_sound->playVoice(voice); else - DebugPrintf("Voice out of range (0 - %d)\n", range); + DebugPrintf("Voice out of range (0 - %d)\n", _vm->_numSpeech); } else DebugPrintf("Syntax: voice <voicenum>\n"); |