diff options
author | Torbjörn Andersson | 2004-04-24 12:29:35 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-04-24 12:29:35 +0000 |
commit | a575576890045caf4beda9dacb7923558e7f3003 (patch) | |
tree | 5cd53b8c2057241031067d372c470c34a5a13c2c /sword2/walker.cpp | |
parent | 94962f6655f543f924048c23a6559932b089666b (diff) | |
download | scummvm-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/walker.cpp')
-rw-r--r-- | sword2/walker.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sword2/walker.cpp b/sword2/walker.cpp index 49312844ae..4aab1b4173 100644 --- a/sword2/walker.cpp +++ b/sword2/walker.cpp @@ -243,11 +243,13 @@ int32 Logic::fnWalkToAnim(int32 *params) { // coords (which should be set beforehand in the script). if (pars[4] == 0 && pars[5] == 0) { + byte buf[NAME_LEN]; + pars[4] = _standbyX; pars[5] = _standbyY; pars[6] = _standbyDir; - debug(3, "WARNING: fnWalkToAnim(%s) used standby coords", _vm->fetchObjectName(params[4])); + debug(3, "WARNING: fnWalkToAnim(%s) used standby coords", _vm->fetchObjectName(params[4], buf)); } assert(pars[6] >= 0 && pars[6] <= 7); @@ -374,11 +376,13 @@ int32 Logic::fnStandAfterAnim(int32 *params) { // should be set beforehand in the script) if (pars[2] == 0 && pars[3] == 0) { + byte buf[NAME_LEN]; + pars[2] = _standbyX; pars[3] = _standbyY; pars[4] = _standbyDir; - debug(3, "WARNING: fnStandAfterAnim(%s) used standby coords", _vm->fetchObjectName(params[2])); + debug(3, "WARNING: fnStandAfterAnim(%s) used standby coords", _vm->fetchObjectName(params[2], buf)); } assert(pars[4] >= 0 && pars[4] <= 7); @@ -412,11 +416,13 @@ int32 Logic::fnStandAtAnim(int32 *params) { // be set beforehand in the script) if (pars[2] == 0 && pars[3] == 0) { + byte buf[NAME_LEN]; + pars[2] = _standbyX; pars[3] = _standbyY; pars[4] = _standbyDir; - debug(3, "WARNING: fnStandAtAnim(%s) used standby coords", _vm->fetchObjectName(params[2])); + debug(3, "WARNING: fnStandAtAnim(%s) used standby coords", _vm->fetchObjectName(params[2], buf)); } assert(pars[4] >= 0 && pars[4] <= 7); |