aboutsummaryrefslogtreecommitdiff
path: root/sword2/anims.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-03-17 09:03:15 +0000
committerTorbjörn Andersson2004-03-17 09:03:15 +0000
commit4c3a68027f7f84a58664f77c847d24ab5b9757e4 (patch)
treebf20e888b9ea1cc2045df84aad12ef1cd54ec7de /sword2/anims.cpp
parent03200025dfb030d887ff9b07d180a8f9e2f225bc (diff)
downloadscummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.gz
scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.bz2
scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.zip
Use the same syntax for accessing script variables as BS1 does, i.e. now
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it makes it much easier to tell the difference between variables and constants when looking at the code. Of course, this sort of sweeping changes is jolly good for introducing truly weird regressions, which is why I waited until after 0.6.0. svn-id: r13331
Diffstat (limited to 'sword2/anims.cpp')
-rw-r--r--sword2/anims.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/sword2/anims.cpp b/sword2/anims.cpp
index 6614ce6e82..17e90bf036 100644
--- a/sword2/anims.cpp
+++ b/sword2/anims.cpp
@@ -107,7 +107,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
// 'testing_routines' object in George's Player Character
// section of linc
- if (SYSTEM_TESTING_ANIMS) {
+ if (_scriptVars[SYSTEM_TESTING_ANIMS]) {
// if the resource number is within range & it's not
// a null resource
@@ -141,7 +141,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
#ifdef _SWORD2_DEBUG
// check that we haven't been passed a zero resource number
if (res == 0)
- error("animate: %s (id %d) passed zero anim resource", _vm->fetchObjectName(ID), ID);
+ error("animate: %s (id %d) passed zero anim resource", _vm->fetchObjectName(_scriptVars[ID]), _scriptVars[ID]);
#endif
// open anim file
@@ -173,7 +173,7 @@ int32 Logic::animate(int32 *params, bool reverse) {
ob_graphic->anim_pc = 0;
} else if (getSync()) {
// We've received a sync - return to script immediately
- debug(5, "**sync stopped %d**", ID);
+ debug(5, "**sync stopped %d**", _scriptVars[ID]);
// If sync received, anim finishes right now (remaining on
// last frame). Quit animation, but continue script.
@@ -263,7 +263,7 @@ int32 Logic::fnSetFrame(int32 *params) {
#ifdef _SWORD2_DEBUG
// check that we haven't been passed a zero resource number
if (res == 0)
- error("fnSetFrame: %s (id %d) passed zero anim resource", _vm->fetchObjectName(ID), ID);
+ error("fnSetFrame: %s (id %d) passed zero anim resource", _vm->fetchObjectName(_scriptsVars[ID]), _scriptsVars[ID]);
#endif
// open the resource (& check it's valid)
@@ -679,7 +679,7 @@ int32 Logic::fnPlaySequence(int32 *params) {
MoviePlayer player(_vm);
- if (_sequenceTextLines && !DEMO)
+ if (_sequenceTextLines && !_scriptVars[DEMO])
rv = player.play(filename, sequenceSpeechArray, leadOut);
else
rv = player.play(filename, NULL, leadOut);