Pseudocode and stuff

This commit is contained in:
MaddoScientisto 2026-03-25 23:32:13 +01:00
commit ee33f94b4b
466 changed files with 27770 additions and 276 deletions

View file

@ -0,0 +1,24 @@
function cameraco_gotHit() /* entry=88 class_id=0x01B6 slot=0x06 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
vel; /* [BP+0Ch] type=0x69 */
entry:
set_info(0x020C, *(arg_06));
process_exclude();
class_0A0C_slot_2B(vel, ref);
if (retval && (Item.getFrame(arg_06) != 5)) goto block_0624;
block_05BA:
class_0A0C_slot_33(0x021B, *(arg_06));
spawn class_0A18_slot_20(pid, 1, *(arg_06), arg_06);
suspend;
spawn class_0A1E_slot_28(pid, 0, 0, arg_06);
suspend;
block_0624:
return;
}

View file

@ -0,0 +1,157 @@
function cameraco_enterFastArea() /* entry=88 class_id=0x01B6 slot=0x0F */
{
var
referent, /* [BP+00h] type=0x69 */
delay, /* [BP-02h] type=0x69 */
iSeeYou, /* [BP-04h] type=0x69 */
trackedEnough, /* [BP-06h] type=0x69 */
fram, /* [BP-08h] type=0x69 */
counter, /* [BP-0Ah] type=0x69 */
sawCrusader, /* [BP-0Ch] type=0x69 */
movement, /* [BP-0Eh] type=0x69 */
target, /* [BP-10h] type=0x24 */
range, /* [BP-12h] type=0x69 */
dir; /* [BP-14h] type=0x69 */
entry:
set_info(0x021B, *(arg_06));
process_exclude();
delay = ((5 - Intrinsic0029()) * 15);
iSeeYou = (5 - (Intrinsic0029() * 15));
if (Item.getFrame(arg_06) != 5) goto block_0126;
block_0120:
goto block_04AD;
block_0126:
if (!Intrinsic0007(arg_06)) goto block_0162;
block_0139:
spawn class_0A0C_slot_32(pid, delay, 0x00000000);
suspend;
goto block_0126;
block_0162:
sawCrusader = 0;
movement = 1;
block_0170:
suspend;
range = 0;
block_0184:
if (!Intrinsic0007(arg_06)) goto block_01C0;
block_0197:
spawn class_0A0C_slot_32(pid, delay, 0x00000000);
suspend;
goto block_0184;
block_01C0:
spawn class_0A0C_slot_32(pid, delay, 0x00000000);
suspend;
if (Item.pop() != 0) goto block_0204;
block_01F7:
target = Item.pop();
goto block_020B;
block_0204:
target = 1;
block_020B:
dir = Intrinsic0027(15, 0, 16, Item.legal_create(target), Intrinsic0013(target), Item.legal_create(arg_06), Intrinsic0013(arg_06));
fram = Item.getFrame(arg_06);
if (((dir / 2) - 1) != fram) goto block_03B7;
block_0260:
range = Item.getQHi(target, arg_06);
if range goto block_0313;
block_0278:
sawCrusader = 1;
trackedEnough = (1 + trackedEnough);
if ((trackedEnough > iSeeYou) && (!(Item.getStatus(arg_06) & 0x1000))) goto block_0310;
block_02A6:
spawn class_0A0C_slot_32(pid, delay, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
suspend;
class_0A1E_slot_23(0x1000, arg_06);
block_0310:
goto block_03B4;
block_0313:
sawCrusader = 0;
if ((fram + movement) < 0) goto block_0358;
block_0328:
movement = 1;
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
suspend;
goto block_0396;
block_0358:
if ((fram + movement) > 4) goto block_0396;
block_0366:
movement = -1;
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
suspend;
goto block_0396;
block_0396:
block_03B4:
goto block_04AA;
block_03B7:
if (trackedEnough && sawCrusader) goto block_03F3;
block_03C8:
if (((dir / 2) - 1) > fram) goto block_03E9;
block_03DF:
movement = 1;
goto block_03F0;
block_03E9:
movement = -1;
block_03F0:
goto block_0410;
block_03F3:
trackedEnough = 0;
sawCrusader = 0;
/* bit_not */
block_0410:
if ((fram + movement) < 0) goto block_044E;
block_041E:
movement = 1;
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
suspend;
goto block_048C;
block_044E:
if ((fram + movement) > 4) goto block_048C;
block_045C:
movement = -1;
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
suspend;
goto block_048C;
block_048C:
block_04AA:
goto block_0170;
block_04AD:
return;
}

View file

@ -0,0 +1,10 @@
function cameraco_leaveFastArea() /* entry=88 class_id=0x01B6 slot=0x10 */
{
entry:
set_info(0x021C, *(arg_06));
process_exclude();
class_0A0C_slot_33(0x021B, *(arg_06));
/* bit_not */
return;
}