aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/debugger.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-06-05 09:13:42 +0000
committerTravis Howell2007-06-05 09:13:42 +0000
commitde826820714a8fbae70677fa51644eef9e4aa7bf (patch)
tree7f6db62165deb442c1312e8da8f40a24802e5d6c /engines/agos/debugger.cpp
parent06d9b8ea39e719bcc457739c3ecd224ba03f543e (diff)
downloadscummvm-rg350-de826820714a8fbae70677fa51644eef9e4aa7bf.tar.gz
scummvm-rg350-de826820714a8fbae70677fa51644eef9e4aa7bf.tar.bz2
scummvm-rg350-de826820714a8fbae70677fa51644eef9e4aa7bf.zip
Update sound ranges in debugger, for earlier games.
svn-id: r27101
Diffstat (limited to 'engines/agos/debugger.cpp')
-rw-r--r--engines/agos/debugger.cpp24
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");