diff options
author | Travis Howell | 2004-10-03 05:29:31 +0000 |
---|---|---|
committer | Travis Howell | 2004-10-03 05:29:31 +0000 |
commit | ac58d5c307e753b948d9bd89bf3066f70d5f10f7 (patch) | |
tree | 9bc2d8dfca85cfa21d6a7d74beba441d709317eb /scumm | |
parent | b1bf9f94d8028e856abdcb6372af7f6d6505b07b (diff) | |
download | scummvm-rg350-ac58d5c307e753b948d9bd89bf3066f70d5f10f7.tar.gz scummvm-rg350-ac58d5c307e753b948d9bd89bf3066f70d5f10f7.tar.bz2 scummvm-rg350-ac58d5c307e753b948d9bd89bf3066f70d5f10f7.zip |
Add missing code for opcode.
svn-id: r15386
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 28 |
2 files changed, 21 insertions, 9 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index cedb918bb1..741980fcf6 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -879,7 +879,7 @@ protected: void o90_mod(); void o90_unknown31(); void o90_unknown32(); - void o90_unknown34(); + void o90_findAllObjectsWithClassOf(); void o90_unknown35(); void o90_unknown36(); void o90_unknown37(); diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 51055bc9bd..b9b0a539c3 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -109,7 +109,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o90_unknown32), OPCODE(o6_invalid), /* 34 */ - OPCODE(o90_unknown34), + OPCODE(o90_findAllObjectsWithClassOf), OPCODE(o90_unknown35), OPCODE(o90_unknown36), OPCODE(o90_unknown37), @@ -1065,24 +1065,36 @@ void ScummEngine_v90he::o90_mod() { push(pop() % a); } -void ScummEngine_v90he::o90_unknown34() { - // Incomplete +void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { int args[16]; + int num, cls, tmp; + bool b; + int cond = 1; - getStackList(args, ARRAYSIZE(args)); + num = getStackList(args, ARRAYSIZE(args)); int room = pop(); int i = 1; if (room != _currentRoom) - warning("o72_findAllObjects: current room is not %d", room); + warning("o90_findAllObjectsWithClassOf: current room is not %d", room); writeVar(0, 0); defineArray(0, kDwordArray, 0, 0, 0, _numLocalObjects + 1); - writeArray(0, 0, 0, _numLocalObjects); - + while (i < _numLocalObjects) { - writeArray(0, 0, i, _objs[i].obj_nr); + cond = 1; + tmp = num; + while (--tmp >= 0) { + cls = args[tmp]; + b = getClass(i, cls); + if ((cls & 0x80 && !b) || (!(cls & 0x80) && b)) + cond = 0; + } + + if (cond) + writeArray(0, 0, i, _objs[i].obj_nr); i++; } + writeArray(0, 0, 0, i); push(readVar(0)); } |