Crusader_Decomp/USECODE/EUSECODE_extracted/pseudocode/DEATHBOX/slot_0A_equip.txt

44 lines
1.2 KiB
Text

function deathbox_equip() /* entry=289 class_id=0x04E7 slot=0x0A */
{
var
referent, /* [BP+00h] type=0x69 */
var, /* [BP+0Ah] type=0x69 */
sswitch, /* [BP-02h] type=0x24 */
a, /* [BP-03h] type=0x62 */
b, /* [BP-04h] type=0x62 */
c, /* [BP-05h] type=0x62 */
counter; /* [BP-07h] type=0x69 */
set_info(0x0211, *(arg_06));
process_exclude();
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
if (!(Item.getStatus(arg_06) & 0x1000)) {
return;
}
else {
spawn FREE.waitNTimerTicks(pid, 12, 0x00000000);
suspend;
ITEM.slot_23(0x1000, arg_06);
if (var == 2) {
for sswitch in nearby_items(shape=48, origin=arg_06) {
if (Item.getQLo(sswitch) == 10) {
a = Item.getFrame(sswitch);
}
else if (Item.getQLo(sswitch) == 11) {
b = Item.getFrame(sswitch);
}
counter = (1 + counter);
/* loopnext */
}
if ((b == 4) && (a != 0)) {
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
spawn TRIGGER.slot_20(pid, 0x0080, *(arg_06), arg_06);
suspend;
}
}
ITEM.slot_24(0x1000, arg_06);
}
return;
}