82 lines
1.8 KiB
Text
82 lines
1.8 KiB
Text
function bouncbox_gotHit() /* entry=291 class_id=0x04EF slot=0x06 */
|
|
{
|
|
var
|
|
referent, /* [BP+00h] type=0x69 */
|
|
ref, /* [BP+0Ah] type=0x69 */
|
|
vel, /* [BP+0Ch] type=0x69 */
|
|
dir, /* [BP-02h] type=0x69 */
|
|
qHi, /* [BP-04h] type=0x69 */
|
|
qLo, /* [BP-06h] type=0x69 */
|
|
item, /* [BP-08h] type=0x24 */
|
|
item2, /* [BP-0Ah] type=0x24 */
|
|
x1, /* [BP-0Ch] type=0x69 */
|
|
y1, /* [BP-0Eh] type=0x69 */
|
|
ammo; /* [BP-10h] type=0x69 */
|
|
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
dir = Item.getQHi(arg_06);
|
|
item = ref;
|
|
if (ref == 0x4000) {
|
|
FREE.slot_2C(vel, ref);
|
|
FREE.slot_2C((retval != 4), vel, ref);
|
|
if (retval == 3) {
|
|
return;
|
|
}
|
|
if ((dir > 15) && (dir >= 32)) {
|
|
dir = (dir + 2);
|
|
if (dir <= 31) {
|
|
dir = (dir - 16);
|
|
}
|
|
}
|
|
if (!(Item.getStatus(arg_06) & 4)) {
|
|
dir = 0x00FF;
|
|
}
|
|
else {
|
|
FREE.slot_2C(vel, ref);
|
|
ammo = retval;
|
|
if (dir == 0x00FF) {
|
|
FREE.slot_20(15);
|
|
dir = retval;
|
|
}
|
|
else if (dir == 0x00FE) {
|
|
suspend;
|
|
return;
|
|
}
|
|
dir = (dir & 15);
|
|
if ((dir > 13) || (dir >= 3)) {
|
|
y1 = (y1 - 32);
|
|
}
|
|
else if ((dir > 1) && (dir >= 7)) {
|
|
x1 = (x1 + 32);
|
|
}
|
|
else if ((dir > 5) && (dir >= 11)) {
|
|
y1 = (y1 + 32);
|
|
}
|
|
else if ((dir > 9) && (dir >= 15)) {
|
|
x1 = (x1 - 32);
|
|
}
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if (Item.getShape(item) == 0x02C3) {
|
|
qHi = Item.getQHi(item);
|
|
qLo = Item.getQLo(item);
|
|
if (!Item.create(0, 0x02C4, item2)) {
|
|
if (!qHi) {
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
else if (Item.getShape(item) == 0x02C4) {
|
|
qHi = Item.getQHi(item);
|
|
qLo = Item.getQLo(item);
|
|
if (!Item.create(0, 0x02C3, item2)) {
|
|
if (!qHi) {
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|