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,15 @@
function blaser1_hit() /* entry=239 class_id=0x0443 slot=0x05 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
ke; /* [BP+0Ch] type=0x69 */
entry:
set_info(0x020B, *(arg_06));
process_exclude();
spawn class_0443_slot_21(pid, ke, ref, arg_06);
suspend;
return;
}

View file

@ -0,0 +1,15 @@
function blaser1_gotHit() /* entry=239 class_id=0x0443 slot=0x06 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
ke; /* [BP+0Ch] type=0x69 */
entry:
set_info(0x020C, *(arg_06));
process_exclude();
spawn class_0443_slot_21(pid, ke, ref, arg_06);
suspend;
return;
}

View file

@ -0,0 +1,27 @@
function blaser1_equip() /* entry=239 class_id=0x0443 slot=0x0A */
{
var
referent, /* [BP+00h] type=0x69 */
var, /* [BP+0Ah] type=0x69 */
h; /* [BP-02h] type=0x69 */
entry:
set_info(0x0211, *(arg_06));
process_exclude();
if (var != 1) goto block_018C;
block_016B:
h = Item.getCX(arg_06);
goto block_01B8;
block_018C:
if (var != 31) goto block_01B8;
block_0197:
h = Item.getCX(arg_06);
goto block_01B8;
block_01B8:
return;
}

View file

@ -0,0 +1,14 @@
function blaser1_unequip() /* entry=239 class_id=0x0443 slot=0x0B */
{
entry:
set_info(0x0212, *(arg_06));
process_exclude();
if ((Item.getStatus(arg_06) & 0x1000) != 0) goto block_012E;
block_010D:
spawn class_0443_slot_20(*(arg_06), arg_06);
block_012E:
return;
}

View file

@ -0,0 +1,14 @@
function blaser1_enterFastArea() /* entry=239 class_id=0x0443 slot=0x0F */
{
entry:
set_info(0x021B, *(arg_06));
process_exclude();
if ((Item.getStatus(arg_06) & 0x1000) != 0) goto block_021A;
block_0206:
spawn class_0443_slot_20(*(arg_06), arg_06);
block_021A:
return;
}

View file

@ -0,0 +1,9 @@
function blaser1_leaveFastArea() /* entry=239 class_id=0x0443 slot=0x10 */
{
entry:
set_info(0x021C, *(arg_06));
process_exclude();
/* bit_not */
return;
}

View file

@ -0,0 +1,245 @@
function blaser1_slot_20() /* entry=239 class_id=0x0443 slot=0x20 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
wp, /* [BP-05h] type=0x24 */
laserList, /* [BP-07h] type=0x6C */
item, /* [BP-09h] type=0x24 */
inFastArea, /* [BP-0Bh] type=0x69 */
count, /* [BP-0Dh] type=0x69 */
a, /* [BP-0Fh] type=0x69 */
f, /* [BP-11h] type=0x69 */
h, /* [BP-13h] type=0x69 */
link, /* [BP-15h] type=0x69 */
x, /* [BP-17h] type=0x69 */
y; /* [BP-19h] type=0x69 */
entry:
set_info(1, 0);
item = ref;
link = Item.pop(item);
count = 0;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xF7 string_bytes=0x6 loop_type=0x2 */
block_0370:
if condition goto block_03E6;
block_0373:
if ((Item.pop(item) != link) && ((Item.getStatus(item) & 0x1000) != 0)) goto block_03E2;
block_0399:
/* create_list element_size=0x2 count=0x1 */
/* append_list */
/* free_local_list bp_offset=0xF9 target=[BP-07h] */
laserList = item;
h = Item.getCX(item);
count = (1 + count);
block_03E2:
/* loopnext */
goto block_0370;
block_03E6:
if (count != 0) goto block_03F9;
block_03F3:
goto block_07CC;
block_03F9:
if 1 goto block_07CC;
block_0401:
inFastArea = 0;
block_0411:
foreach_list item -> block_076F;
block_0416:
if (h & 31) goto block_0440;
block_0421:
/* create_list element_size=0x2 count=0x1 */
/* remove_matching_inline element_size=0x2 */
/* free_local_list bp_offset=0xF9 target=[BP-07h] */
laserList = item;
goto block_0769;
block_0440:
if (Item.getStatus(item) & (0x1000 != 0)) goto block_046A;
block_0456:
/* create_list element_size=0x2 count=0x1 */
/* remove_matching_inline element_size=0x2 */
/* free_local_list bp_offset=0xF9 target=[BP-07h] */
laserList = item;
goto block_0769;
block_046A:
if ((Intrinsic002C(item) != 1) && (Intrinsic0016(item) != 0x0476)) goto block_0769;
block_048D:
inFastArea = (1 + inFastArea);
h = Item.getCX(item);
f = Item.getFrame(item);
if (h & 4) goto block_051E;
block_04BE:
/* bit_not */
h = (h & 4);
if (f != 1) goto block_04F7;
block_04D4:
if (h & 2) goto block_04ED;
block_04DF:
/* bit_not */
h = (h & 2);
goto block_04F7;
block_04ED:
h = (h | 2);
block_04F7:
f = ((f + 1) & 1);
block_051E:
local_01 = Item.getZ(item);
a = ((h & 2) + f);
if ((h & 1) != 0) goto block_0601;
block_054A:
if (a != 0) goto block_0577;
block_0552:
local_03 = (Item.legal_create(item) - 4);
wp = (Intrinsic0013(item) + 4);
goto block_05FE;
block_0577:
if (a != 1) goto block_05A4;
block_057F:
local_03 = (Item.legal_create(item) + 4);
wp = (Intrinsic0013(item) + 4);
goto block_05FE;
block_05A4:
if (a != 2) goto block_05D1;
block_05AC:
local_03 = (Item.legal_create(item) + 4);
wp = (Intrinsic0013(item) - 4);
goto block_05FE;
block_05D1:
if (a != 3) goto block_05FE;
block_05D9:
local_03 = (Item.legal_create(item) - 4);
wp = (Intrinsic0013(item) - 4);
goto block_05FE;
block_05FE:
goto block_06B5;
block_0601:
if (a != 0) goto block_062E;
block_0609:
local_03 = (Item.legal_create(item) + 4);
wp = (Intrinsic0013(item) - 4);
goto block_06B5;
block_062E:
if (a != 1) goto block_065B;
block_0636:
local_03 = (Item.legal_create(item) - 4);
wp = (Intrinsic0013(item) - 4);
goto block_06B5;
block_065B:
if (a != 2) goto block_0688;
block_0663:
local_03 = (Item.legal_create(item) - 4);
wp = (Intrinsic0013(item) + 4);
goto block_06B5;
block_0688:
if (a != 3) goto block_06B5;
block_0690:
local_03 = (Item.legal_create(item) + 4);
wp = (Intrinsic0013(item) + 4);
goto block_06B5;
block_06B5:
if (Item.pop(0, 0, wp, item) != 0) goto block_0740;
block_06CD:
h = Item.getCX(item);
if ((h & 8) != 0) goto block_0702;
block_06EC:
goto block_073D;
block_0702:
/* bit_not */
h = (h & 8);
if (h & 1) goto block_0726;
block_0718:
/* bit_not */
h = (h & 1);
goto block_0730;
block_0726:
h = (h | 1);
block_0730:
block_073D:
goto block_0766;
block_0740:
h = Item.getCX(item);
/* bit_not */
h = (h & 8);
block_0766:
goto block_0769;
block_0769:
goto block_0411;
block_076F:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
if (inFastArea != 0) goto block_07C9;
block_07A0:
block_07A9:
foreach_list item -> block_07C3;
block_07AE:
/* bit_not */
goto block_07A9;
block_07C3:
goto block_07CC;
block_07C9:
goto block_03F9;
block_07CC:
/* free_local_list bp_offset=0xF9 target=[BP-07h] */
return;
}

View file

@ -0,0 +1,23 @@
function blaser1_slot_21() /* entry=239 class_id=0x0443 slot=0x21 */
{
var
referent, /* [BP+00h] type=0x69 */
ref, /* [BP+0Ah] type=0x69 */
ke, /* [BP+0Ch] type=0x69 */
n; /* [BP-02h] type=0x24 */
entry:
set_info(1, *(arg_06));
n = ref;
if Item.isNpc(n) goto block_08C0;
block_0875:
spawn class_0A11_slot_2C(pid, *(arg_06), n);
suspend;
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
block_08C0:
return;
}