aboutsummaryrefslogtreecommitdiff
path: root/sword2/sound.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-04-24 12:29:35 +0000
committerTorbjörn Andersson2004-04-24 12:29:35 +0000
commita575576890045caf4beda9dacb7923558e7f3003 (patch)
tree5cd53b8c2057241031067d372c470c34a5a13c2c /sword2/sound.cpp
parent94962f6655f543f924048c23a6559932b089666b (diff)
downloadscummvm-rg350-a575576890045caf4beda9dacb7923558e7f3003.tar.gz
scummvm-rg350-a575576890045caf4beda9dacb7923558e7f3003.tar.bz2
scummvm-rg350-a575576890045caf4beda9dacb7923558e7f3003.zip
fetchObjectName() no longer assumes that the resource will still be in the
cache after it's been closed. (Currently it always is, but ideally I'd like for BS to work even if resource caching is disabled.) svn-id: r13610
Diffstat (limited to 'sword2/sound.cpp')
-rw-r--r--sword2/sound.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sword2/sound.cpp b/sword2/sound.cpp
index b197625c90..fe97d44437 100644
--- a/sword2/sound.cpp
+++ b/sword2/sound.cpp
@@ -186,7 +186,9 @@ int32 Logic::fnPlayFx(int32 *params) {
break;
}
- debug(0, "SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", _vm->fetchObjectName(params[0]), params[3], params[4], params[2], type);
+ byte buf[NAME_LEN];
+
+ debug(0, "SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", _vm->fetchObjectName(params[0], buf), params[3], params[4], params[2], type);
}
while (j < FXQ_LENGTH && _vm->_fxQueue[j].resource != 0)