135 lines
3.4 KiB
Text
135 lines
3.4 KiB
Text
|
|
/* synthesized appendix for CAMERACO */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x06 gotHit ===== */
|
|
function cameraco_gotHit() /* entry=96 class_id=0x01B6 slot=0x06 */
|
|
{
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
if (Item.isEntirelyOnScreen(arg_06)) {
|
|
return;
|
|
}
|
|
else if (!(Item.getStatus(arg_06) & 0x1000)) {
|
|
return;
|
|
}
|
|
else {
|
|
FREE.slot_34(arg_0C, arg_0A);
|
|
if (retval && (Item.getFrame(arg_06) == 5)) {
|
|
FREE.slot_3C(0x021B, *(arg_06));
|
|
spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
|
|
suspend;
|
|
spawn ITEM.slot_2A(pid, 0, 0, arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x0F enterFastArea ===== */
|
|
function cameraco_enterFastArea() /* entry=96 class_id=0x01B6 slot=0x0F */
|
|
{
|
|
entry:
|
|
set_info(0x021B, *(arg_06));
|
|
process_exclude();
|
|
local_02 = ((5 - World.gameDifficulty()) * 15);
|
|
local_04 = (5 - (World.gameDifficulty() * 15));
|
|
if (Item.getFrame(arg_06) != 5) goto block_010B;
|
|
|
|
block_0108:
|
|
goto block_0372;
|
|
|
|
block_010B:
|
|
while (Item.isEntirelyOnScreen(arg_06)) {
|
|
spawn FREE.slot_3B(pid, local_02, 0x00000000);
|
|
suspend;
|
|
}
|
|
|
|
block_0132:
|
|
local_0C = 0;
|
|
local_0E = 1;
|
|
|
|
block_013A:
|
|
while (true) {
|
|
suspend;
|
|
local_12 = 0;
|
|
while (Item.isEntirelyOnScreen(arg_06)) {
|
|
spawn FREE.slot_3B(pid, local_02, 0x00000000);
|
|
suspend;
|
|
}
|
|
spawn FREE.slot_3B(pid, local_02, 0x00000000);
|
|
suspend;
|
|
if (World.getControlledNPCNum() == 0) {
|
|
local_10 = World.getControlledNPCNum();
|
|
}
|
|
else {
|
|
local_10 = 1;
|
|
}
|
|
local_14 = Item.getClosestDirectionInRange(15, 0, 16, Item.getY(local_10), Item.getX(local_10), Item.getY(arg_06), Item.getX(arg_06));
|
|
local_08 = Item.getFrame(arg_06);
|
|
if (((local_14 / 2) - 1) == local_08) {
|
|
local_12 = Intrinsic0036(local_10, arg_06);
|
|
if (!local_12) {
|
|
local_0C = 1;
|
|
local_06 = (1 + local_06);
|
|
if ((local_06 <= local_04) && (!(Item.getStatus(arg_06) & 4))) {
|
|
spawn FREE.slot_3B(pid, local_02, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
|
suspend;
|
|
ITEM.slot_24(4, arg_06);
|
|
}
|
|
}
|
|
else {
|
|
local_0C = 0;
|
|
if ((local_08 + local_0E) >= 0) {
|
|
local_0E = 1;
|
|
spawn FREE.slot_3B(pid, 30, 0x00000000);
|
|
suspend;
|
|
}
|
|
else if ((local_08 + local_0E) <= 4) {
|
|
local_0E = -1;
|
|
spawn FREE.slot_3B(pid, 30, 0x00000000);
|
|
suspend;
|
|
}
|
|
}
|
|
}
|
|
else if (!(local_06 && local_0C)) {
|
|
if (((local_14 / 2) - 1) <= local_08) {
|
|
local_0E = 1;
|
|
}
|
|
else {
|
|
local_0E = -1;
|
|
}
|
|
}
|
|
else {
|
|
local_06 = 0;
|
|
local_0C = 0;
|
|
/* bit_not */
|
|
}
|
|
if ((local_08 + local_0E) >= 0) {
|
|
local_0E = 1;
|
|
spawn FREE.slot_3B(pid, 30, 0x00000000);
|
|
suspend;
|
|
}
|
|
else if ((local_08 + local_0E) <= 4) {
|
|
local_0E = -1;
|
|
spawn FREE.slot_3B(pid, 30, 0x00000000);
|
|
suspend;
|
|
}
|
|
}
|
|
|
|
block_0372:
|
|
return;
|
|
|
|
}
|
|
|
|
/* ===== slot 0x10 leaveFastArea ===== */
|
|
function cameraco_leaveFastArea() /* entry=96 class_id=0x01B6 slot=0x10 */
|
|
{
|
|
set_info(0x021C, *(arg_06));
|
|
process_exclude();
|
|
FREE.slot_3C(0x021B, *(arg_06));
|
|
/* bit_not */
|
|
return;
|
|
}
|