diff options
author | Travis Howell | 2005-03-07 06:37:56 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-07 06:37:56 +0000 |
commit | 8cc18e679763655f33fbd8cae7132635bf989e49 (patch) | |
tree | 8aaccd6414de9860fb093516346d4946b992960c | |
parent | 26da9cc393ef78d223105e17e555e1678ede12e4 (diff) | |
download | scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.tar.gz scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.tar.bz2 scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.zip |
Minor cleanup
svn-id: r17025
-rw-r--r-- | scumm/script_v100he.cpp | 5 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 16 |
3 files changed, 13 insertions, 10 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index eaec995282..a8f09e345e 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -802,7 +802,7 @@ void ScummEngine_v100he::o100_dimArray() { void ScummEngine_v100he::o100_drawObject() { byte subOp = fetchScriptByte(); - int state = 0, y = -1, x = -1; + int state, y, x; switch (subOp) { case 6: @@ -819,6 +819,7 @@ void ScummEngine_v100he::o100_drawObject() { state = pop(); if (state == 0) state = 1; + y = x = -100; break; default: error("o100_drawObject: default case %d", subOp); @@ -829,7 +830,7 @@ void ScummEngine_v100he::o100_drawObject() { if (objnum == -1) return; - if (y != -1 && x != -1) { + if (y != -100 && x != -100) { _objs[objnum].x_pos = x * 8; _objs[objnum].y_pos = y * 8; } diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 71f0cd9b0d..77e9ee3909 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2263,8 +2263,8 @@ void ScummEngine_v6::o6_isAnyOf() { return; } } + push(0); - return; } void ScummEngine_v6::o6_quitPauseRestart() { diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 4f963bbb8d..1adeedae51 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -640,16 +640,17 @@ void ScummEngine_v72he::o72_addMessageToStack() { } void ScummEngine_v72he::o72_isAnyOf() { - int args[128], i = 0; - int num = getStackList(args, ARRAYSIZE(args)); - int value = pop(); + int args[128]; + int num, value; - while (i < num) { + num = getStackList(args, ARRAYSIZE(args)); + value = pop(); + + for (int i = 0; i < num; i++) { if (args[i] == value) { push(1); return; } - i++; } push(0); @@ -765,7 +766,7 @@ void ScummEngine_v72he::o72_startObject() { void ScummEngine_v72he::o72_drawObject() { byte subOp = fetchScriptByte(); - int state = 0, y = -1, x = -1; + int state, y, x; switch (subOp) { case 62: @@ -777,6 +778,7 @@ void ScummEngine_v72he::o72_drawObject() { state = pop(); if (state == 0) state = 1; + y = x = -100; break; case 65: state = 1; @@ -792,7 +794,7 @@ void ScummEngine_v72he::o72_drawObject() { if (objnum == -1) return; - if (y != -1 && x != -1) { + if (y != -100 && x != -100) { _objs[objnum].x_pos = x * 8; _objs[objnum].y_pos = y * 8; } |