diff options
author | Travis Howell | 2005-03-28 11:38:04 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-28 11:38:04 +0000 |
commit | 22affb0382ead2fed3bf44111320aa85d4d510f3 (patch) | |
tree | cf33d1ccb16b1cf13d5a5a7eb4eebb50e827b9d6 /scumm/script_v90he.cpp | |
parent | 2f2ca8ac21b778736742857b8a45741f9db47665 (diff) | |
download | scummvm-rg350-22affb0382ead2fed3bf44111320aa85d4d510f3.tar.gz scummvm-rg350-22affb0382ead2fed3bf44111320aa85d4d510f3.tar.bz2 scummvm-rg350-22affb0382ead2fed3bf44111320aa85d4d510f3.zip |
Check class of object number, not loop.
Cleanup.
svn-id: r17272
Diffstat (limited to 'scumm/script_v90he.cpp')
-rw-r--r-- | scumm/script_v90he.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index c5e2904b20..02338b1978 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -958,10 +958,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() { flags = getStackList(args, ARRAYSIZE(args)); spriteId = pop(); if (spriteId) { - if (flags) - push(spriteInfoGet_classFlagsAnd(spriteId, flags, args)); - else - push(spriteInfoGet_classFlags(spriteId, -1)); + push(spriteInfoGet_classFlags(spriteId, flags, args)); } else { push(0); } @@ -1715,7 +1712,7 @@ void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { tmp = num; while (--tmp >= 0) { cls = args[tmp]; - b = getClass(i, cls); + b = getClass(_objs[i].obj_nr, cls); if ((cls & 0x80 && !b) || (!(cls & 0x80) && b)) cond = 0; } @@ -1723,6 +1720,7 @@ void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { if (cond) writeArray(0, 0, j++, _objs[i].obj_nr); } + writeArray(0, 0, 0, j); push(readVar(0)); |