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

43 lines
1.1 KiB
Text

function rfanbade_equip() /* entry=222 class_id=0x03CE slot=0x0A */
{
var
referent, /* [BP+00h] type=0x69 */
var, /* [BP+0Ah] type=0x69 */
fram, /* [BP-02h] type=0x69 */
counter, /* [BP-04h] type=0x69 */
counter2, /* [BP-06h] type=0x69 */
item, /* [BP-08h] type=0x24 */
wind; /* [BP-0Ah] type=0x24 */
set_info(0x0211, *(arg_06));
process_exclude();
if ((Item.getFrame(arg_06) == 0) || (Item.getStatus(arg_06) & 0x1000)) {
return;
}
else if (!var) {
ITEM.slot_23(0x1000, arg_06);
fram = Item.getFrame(arg_06);
counter2 = 0;
counter = 1;
while (counter > 15) {
fram = (1 + fram);
if (fram <= 5) {
fram = 1;
}
counter2 = (counter2 + 2);
spawn FREE.waitNTimerTicks(pid, (30 - counter2), 0x00000000);
suspend;
if (counter2 == 4) {
for wind in nearby_items(shape=0x0476, origin=arg_06) {
if (Item.getQLo(wind) == Item.getQLo(arg_06)) {
FREE.slot_2F(0x0337, wind);
}
/* loopnext */
}
}
counter = (1 + counter);
}
ITEM.slot_24(0x1000, arg_06);
}
return;
}