aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sprite_he.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp
index 8dbf90f5f8..584b43862b 100644
--- a/scumm/sprite_he.cpp
+++ b/scumm/sprite_he.cpp
@@ -55,10 +55,20 @@ int ScummEngine_v90he::spriteInfoGet_classFlags(int spriteId, int classId) {
}
int ScummEngine_v90he::spriteInfoGet_classFlags2(int spriteId, int num, int *args) {
+ int cls;
+ bool b, cond = true;
+
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
- // TODO
- return 0;
+ while (--num >= 0) {
+ cls = args[num];
+ checkRange(32, 1, cls, "class %d out of range in statement");
+ b = ((_spriteTable[spriteId].class_flags & cls) != 0) ? 1 : 0;
+ if ((cls & 0x80 && !b) || (!(cls & 0x80) && b))
+ cond = 0;
+ }
+
+ return cond;
}
int ScummEngine_v90he::spriteInfoGet_flags_1(int spriteId) {