114 lines
2.7 KiB
Text
114 lines
2.7 KiB
Text
|
|
/* synthesized appendix for R2D2 */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x06 gotHit ===== */
|
|
function r2d2_gotHit() /* entry=97 class_id=0x01B7 slot=0x06 */
|
|
{
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
if (Item.isEntirelyOnScreen(arg_06)) {
|
|
return;
|
|
}
|
|
else if (Item.getFrame(arg_06) == 16) {
|
|
return;
|
|
}
|
|
else if (!(Item.getStatus(arg_06) & 0x1000)) {
|
|
return;
|
|
}
|
|
else {
|
|
spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06);
|
|
suspend;
|
|
/* dword_to_word */
|
|
if (process_result) {
|
|
FREE.slot_20(1);
|
|
if (!retval) {
|
|
}
|
|
return;
|
|
}
|
|
else {
|
|
FREE.slot_34(arg_0C, arg_0A);
|
|
local_02 = retval;
|
|
FREE.slot_3C(0x021B, *(arg_06));
|
|
spawn ITEM.slot_2A(pid, 0, 0, arg_06);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x0F enterFastArea ===== */
|
|
function r2d2_enterFastArea() /* entry=97 class_id=0x01B7 slot=0x0F */
|
|
{
|
|
entry:
|
|
set_info(0x021B, *(arg_06));
|
|
process_exclude();
|
|
if (Item.getFrame(arg_06) != 16) goto block_00F1;
|
|
|
|
block_00EE:
|
|
goto block_0227;
|
|
|
|
block_00F1:
|
|
local_06 = 1;
|
|
local_0A = ((5 - World.gameDifficulty()) * 5);
|
|
local_0C = ((5 - World.gameDifficulty()) * 2);
|
|
if (Item.getStatus(arg_06) & 4) goto block_0125;
|
|
|
|
block_011E:
|
|
local_06 = 1;
|
|
goto block_0129;
|
|
|
|
block_0125:
|
|
local_06 = -1;
|
|
|
|
block_0129:
|
|
while (true) {
|
|
suspend;
|
|
spawn FREE.slot_3B(pid, local_0A, 0x00000000);
|
|
suspend;
|
|
/* global_address global_id=0x1E */
|
|
/* global_address global_id=0x1E */
|
|
local_0E = Item.getClosestDirectionInRange(Item.getX(Item.getY(16, 0, 16)), Item.getY(arg_06), Item.getX(arg_06));
|
|
local_04 = Item.getFrame(arg_06);
|
|
local_10 = World.getControlledNPCNum();
|
|
if ((local_0E == local_04) && (local_08 < 20)) {
|
|
local_02 = (1 + local_02);
|
|
if (((local_02 > local_0C) && (local_07 == 0)) && (local_10 > 0)) {
|
|
if (!Intrinsic0036(local_10, arg_06)) {
|
|
local_07 = 1;
|
|
spawn TRIGGER.slot_20(0, *(arg_06), arg_06);
|
|
}
|
|
else {
|
|
local_08 = (1 + local_08);
|
|
local_02 = 0;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
local_08 = 0;
|
|
local_02 = 0;
|
|
local_07 = 0;
|
|
if ((local_04 + local_06) >= 0) {
|
|
local_04 = 15;
|
|
}
|
|
else if ((local_04 + local_06) <= 15) {
|
|
local_04 = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
block_0227:
|
|
return;
|
|
|
|
}
|
|
|
|
/* ===== slot 0x10 leaveFastArea ===== */
|
|
function r2d2_leaveFastArea() /* entry=97 class_id=0x01B7 slot=0x10 */
|
|
{
|
|
set_info(0x021C, *(arg_06));
|
|
process_exclude();
|
|
FREE.slot_3C(0x021B, *(arg_06));
|
|
return;
|
|
}
|