diff options
Diffstat (limited to 'scumm/script_v90he.cpp')
-rw-r--r-- | scumm/script_v90he.cpp | 132 |
1 files changed, 107 insertions, 25 deletions
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 1c5293563e..144faf79c4 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -1361,71 +1361,153 @@ void ScummEngine_v90he::o90_getSpriteGroupInfo() { } void ScummEngine_v90he::o90_setSpriteGroupInfo() { + int type, value1, value2, value3, value4; + byte subOp = fetchScriptByte(); subOp -= 37; - debug(1,"o90_setSpriteGroupInfo stub (%d)", subOp); + debug(1,"o90_setSpriteGroupInfo (%d)", subOp); switch (subOp) { case 0: - switch (pop()) { + type = pop() - 1; + switch (type) { + case 0: + value2 = pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_0(_curSpriteGroupId, value1, value2); + break; case 1: - pop(); - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_1(_curSpriteGroupId, value1); break; case 2: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_2(_curSpriteGroupId, value1); break; case 3: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_3(_curSpriteGroupId, value1); break; case 4: - pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_4(_curSpriteGroupId); break; case 5: + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_5(_curSpriteGroupId, value1); break; case 6: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_6(_curSpriteGroupId, value1); break; case 7: - pop(); - break; - case 8: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case0_7(_curSpriteGroupId, value1); break; default: error("o90_setSpriteGroupInfo subOp 0: Unknown case %d", subOp); } break; case 5: - pop(); - pop(); + type = pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + switch (type) { + case 0: + spriteGroupSet_case5_0(_curSpriteGroupId, value1); + break; + case 1: + spriteGroupSet_case5_1(_curSpriteGroupId, value1); + break; + case 2: + spriteGroupSet_case5_2(_curSpriteGroupId, value1); + break; + case 3: + spriteGroupSet_case5_3(_curSpriteGroupId, value1); + break; + default: + error("o90_setSpriteGroupInfo subOp 5: Unknown case %d", subOp); + } break; case 6: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_field_10(_curSpriteGroupId, value1); break; case 7: - pop(); - pop(); + value2 = pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_tx_ty(_curSpriteGroupId, value1, value2); break; case 20: - pop(); + _curSpriteGroupId = pop(); break; case 26: - pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case26(_curSpriteGroupId, value1); break; case 28: - pop(); - pop(); + value2 = pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case28(_curSpriteGroupId, value1, value2); break; case 30: - pop(); - pop(); - pop(); - pop(); + value4 = pop(); + value3 = pop(); + value2 = pop(); + value1 = pop(); + if (!_curSpriteGroupId) + break; + + spriteGroupSet_fields_0_4_8_C(_curSpriteGroupId, value1, value2, value3, value4); break; case 56: + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case56(_curSpriteGroupId); break; case 180: + if (!_curSpriteGroupId) + break; + + spriteGroupSet_case180(_curSpriteGroupId); break; default: error("o90_setSpriteGroupInfo: Unknown case %d", subOp); |