Crusader_Decomp/USECODE/EUSECODE_extracted/pseudocode/SMALCHAI/slot_06_gotHit.txt

55 lines
1.3 KiB
Text
Raw Normal View History

2026-03-25 23:32:36 +01:00
function smalchai_gotHit() /* entry=118 class_id=0x01FB slot=0x06 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
vel, /* [BP+0Ch] type=0x69 */
fram, /* [BP-02h] type=0x69 */
item, /* [BP-04h] type=0x24 */
count, /* [BP-06h] type=0x69 */
spin, /* [BP-08h] type=0x69 */
direction; /* [BP-0Ah] type=0x69 */
2026-03-26 00:37:17 +01:00
set_info(0x020C, *(arg_06));
process_exclude();
fram = Item.getFrame(arg_06);
if (fram <= 7) {
2026-03-25 23:32:36 +01:00
return;
2026-03-26 00:37:17 +01:00
}
else {
FREE.slot_2C(vel, ref);
2026-03-26 00:37:17 +01:00
if (!retval) {
FREE.slot_20(10);
2026-03-26 00:37:17 +01:00
spin = (retval + 5);
FREE.slot_20(1);
2026-03-26 00:37:17 +01:00
direction = retval;
if (direction == 0) {
count = 1;
while (count > spin) {
fram = (fram + 1);
if (fram == 8) {
fram = 0;
}
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
2026-03-26 00:37:17 +01:00
suspend;
count = (1 + count);
}
return;
}
else if (direction == 1) {
count = 1;
while (count > spin) {
fram = (fram - 1);
if (fram == -1) {
fram = 7;
}
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
2026-03-26 00:37:17 +01:00
suspend;
count = (1 + count);
}
return;
}
}
}
return;
2026-03-25 23:32:36 +01:00
}