aboutsummaryrefslogtreecommitdiff
path: root/engines
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
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')
-rw-r--r--engines/agos/agos.cpp18
-rw-r--r--engines/agos/agos.h1
-rw-r--r--engines/agos/debugger.cpp24
3 files changed, 32 insertions, 11 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 8efb17a6c4..bbcd5e2dc7 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -124,6 +124,10 @@ AGOSEngine::AGOSEngine(OSystem *syst)
_tableIndexBase = 0;
_textIndexBase = 0;
+ _numMusic = 0;
+ _numSFX = 0;
+ _numSpeech = 0;
+
_numBitArray1 = 0;
_numBitArray2 = 0;
_numBitArray3 = 0;
@@ -749,6 +753,10 @@ void AGOSEngine_Simon2::setupGame() {
_numTextBoxes = 20;
_numVars = 255;
+ _numMusic = 93;
+ _numSFX = 222;
+ _numSpeech = 3632;
+
AGOSEngine::setupGame();
}
@@ -774,6 +782,10 @@ void AGOSEngine_Simon1::setupGame() {
_numTextBoxes = 20;
_numVars = 255;
+ _numMusic = 34;
+ _numSFX = 127;
+ _numSpeech = 1996;
+
AGOSEngine::setupGame();
}
@@ -795,6 +807,8 @@ void AGOSEngine_Waxworks::setupGame() {
_numTextBoxes = 10;
_numVars = 255;
+ _numMusic = 9;
+
AGOSEngine::setupGame();
}
@@ -815,6 +829,8 @@ void AGOSEngine_Elvira2::setupGame() {
_numItemStore = 50;
_numVars = 255;
+ _numMusic = 9;
+
AGOSEngine::setupGame();
}
@@ -832,6 +848,8 @@ void AGOSEngine_Elvira1::setupGame() {
_vgaBaseDelay = 1;
_numVars = 512;
+ _numMusic = 14;
+
AGOSEngine::setupGame();
}
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 1c19d726fd..d043656eca 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -195,6 +195,7 @@ protected:
uint32 *_gameOffsetsPtr;
+ uint _numMusic, _numSFX, _numSpeech;
uint _numBitArray1, _numBitArray2, _numBitArray3;
uint _numItemStore, _numVars;
uint _vgaBaseDelay;
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");