aboutsummaryrefslogtreecommitdiff
path: root/sword2/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-10-26 15:42:49 +0000
committerTorbjörn Andersson2003-10-26 15:42:49 +0000
commit7c4cc25cec714073d947e6451b4bf76cd53624ef (patch)
tree79a4c235fb9b62e0f49e069d87645f99022b2859 /sword2/sound.cpp
parent2a139049d621479da4898fcb22c742c52d17eac3 (diff)
downloadscummvm-rg350-7c4cc25cec714073d947e6451b4bf76cd53624ef.tar.gz
scummvm-rg350-7c4cc25cec714073d947e6451b4bf76cd53624ef.tar.bz2
scummvm-rg350-7c4cc25cec714073d947e6451b4bf76cd53624ef.zip
Enable the debug console. Actually, what I've done is to adapt the debug
console from the SCUMM engine. I decided that would be easier than to clean up the original console code. Unfortunately there's a bunch of code that I just copied - a pretty lousy form of code-reusal. It'd be nice if the console could be made part of the Engine class, or something like that. Most of the debug commands seem to be working. Some aren't relevant for ScummVM, and some are a bit obscure so I'm not quite sure what they're supposed to be doing. svn-id: r10978
Diffstat (limited to 'sword2/sound.cpp')
-rw-r--r--sword2/sound.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/sword2/sound.cpp b/sword2/sound.cpp
index 18c8d8adcb..b807e5d895 100644
--- a/sword2/sound.cpp
+++ b/sword2/sound.cpp
@@ -158,9 +158,11 @@ int32 Logic::fnPlayFx(int32 *params) {
#ifdef _SWORD2_DEBUG
_standardHeader *header;
- char type[10];
+#endif
if (wantSfxDebug) {
+ char type[10];
+
switch (params[1]) { // 'type'
case FX_SPOT:
strcpy(type, "SPOT");
@@ -175,9 +177,8 @@ int32 Logic::fnPlayFx(int32 *params) {
strcpy(type, "INVALID");
}
- debug(5, "SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", FetchObjectName(params[0]), params[3], params[4], params[2], type);
+ debug(0, "SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", FetchObjectName(params[0]), params[3], params[4], params[2], type);
}
-#endif
while (j < FXQ_LENGTH && fxq[j].resource != 0)
j++;
@@ -208,7 +209,7 @@ int32 Logic::fnPlayFx(int32 *params) {
#ifdef _SWORD2_DEBUG
header = (_standardHeader*) data;
if (header->fileType != WAV_FILE)
- Con_fatal_error("fnPlayFx given invalid resource");
+ error("fnPlayFx given invalid resource");
#endif
// but then releases it to "age" out if the space is needed
@@ -224,7 +225,7 @@ int32 Logic::fnPlayFx(int32 *params) {
#ifdef _SWORD2_DEBUG
header = (_standardHeader*)data;
if (header->fileType != WAV_FILE)
- Con_fatal_error("fnPlayFx given invalid resource");
+ error("fnPlayFx given invalid resource");
#endif
data += sizeof(_standardHeader);