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 /scumm/script_v72he.cpp | |
parent | 26da9cc393ef78d223105e17e555e1678ede12e4 (diff) | |
download | scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.tar.gz scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.tar.bz2 scummvm-rg350-8cc18e679763655f33fbd8cae7132635bf989e49.zip |
Minor cleanup
svn-id: r17025
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r-- | scumm/script_v72he.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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; } |