Pseudocode decompialtion improvements and docs

This commit is contained in:
MaddoScientisto 2026-03-26 22:10:48 +01:00
commit 589bfc31ef
1898 changed files with 60634 additions and 6597 deletions

View file

@ -13,14 +13,14 @@ function surcamew_use() /* entry=284 class_id=0x04DE slot=0x01 */
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
suspend;
}
/* bit_not */
return;
}
else {
spawn class_04DE_slot_20(arg_06);
spawn SURCAMEW.slot_20(arg_06);
}
}
return;

View file

@ -7,12 +7,12 @@ function surcamew_equip() /* entry=284 class_id=0x04DE slot=0x0A */
}
else if (arg_0A == 0) {
/* global_address global_id=0x3C */
spawn class_04DE_slot_21(arg_06);
spawn SURCAMEW.slot_21(arg_06);
return;
}
else {
/* global_address global_id=0x3C */
spawn class_04DE_slot_20(arg_06);
spawn SURCAMEW.slot_20(arg_06);
}
return;
}

View file

@ -15,39 +15,26 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if (Item.getMapArray(arg_06) != 0) goto block_03FC;
block_02F3:
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
block_0311:
if condition goto block_038A;
block_0314:
if ((Item.getQLo(monit) != link) || (link != 0)) goto block_0386;
block_032F:
if Item.getQHi(monit) goto block_0386;
block_033E:
class_0A17_slot_21(Item.getQHi(monit), Item.getQLo(monit), arg_06);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
textFile = retval;
spawn class_0A17_slot_20(pid, textFile, arg_06);
/* free_stack_string value_u8=0x0 target=[SP+00h] */
suspend;
block_0386:
/* loopnext */
goto block_0311;
for monit in nearby_items(shape=0x037D, origin=arg_06) {
if ((Item.getQLo(monit) == link) || (link != 0)) {
if (!Item.getQHi(monit)) {
TEXTFILE.slot_21(Item.getQHi(monit), Item.getQLo(monit), arg_06);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
textFile = retval;
spawn TEXTFILE.slot_20(pid, textFile, arg_06);
/* free_stack_string value_u8=0x0 target=[SP+00h] */
suspend;
}
}
/* loopnext */
}
block_038A:
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
suspend;
spawn class_04DE_slot_21(pid, arg_06);
spawn SURCAMEW.slot_21(pid, arg_06);
suspend;
spawn class_0A18_slot_20(pid, 1, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
suspend;
goto block_0501;
@ -56,11 +43,7 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if Item.getQHi(arg_06) goto block_04E2;
block_0412:
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector valueBox in nearby_items(shape=PLACEHOLDER_KEY_CUBE, origin=arg_06) */
block_0430:
if condition goto block_0468;
@ -69,7 +52,7 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if (Item.getQLo(valueBox) != link) goto block_0464;
block_0445:
class_0A19_slot_20(valueBox);
VALBOX.slot_20(valueBox);
passcode = retval;
code = (1 + code);
goto block_0468;
@ -82,23 +65,23 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if code goto block_049A;
block_0472:
class_0A17_slot_23(passcode, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
TEXTFILE.slot_23(passcode, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
textFile = retval;
goto block_04BD;
block_049A:
class_0A17_slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
TEXTFILE.slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
textFile = retval;
block_04BD:
spawn class_0A17_slot_20(pid, textFile, arg_06);
spawn TEXTFILE.slot_20(pid, textFile, arg_06);
/* free_stack_string value_u8=0x0 target=[SP+00h] */
suspend;
block_04E2:
spawn class_04DE_slot_21(pid, arg_06);
spawn SURCAMEW.slot_21(pid, arg_06);
suspend;
block_0501:

View file

@ -22,13 +22,9 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
block_05AE:
block_05DA:
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
/* loop_selector cameraEgg in nearby_items(shape=PLACEHOLDER_CUBE_RED_BLACK, origin=arg_06) */
block_061F:
if condition goto block_0AF7;
@ -41,15 +37,11 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
block_0651:
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xF8 string_bytes=0x6 loop_type=0x2 */
/* loop_selector npc in nearby_items(shape=MECH_1, origin=cameraEgg) */
block_06FC:
if condition goto block_073B;
@ -72,7 +64,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
if therma goto block_0786;
block_0745:
spawn class_0A11_slot_28(pid, therma);
spawn NPC.slot_28(pid, therma);
suspend;
goto block_0B4B;
@ -91,13 +83,13 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
if (!Kernel.getCurrentKeyDown()) goto block_07EB;
block_07C2:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
goto block_07B3;
block_07EB:
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
goto block_0AF7;
@ -108,7 +100,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
if (Item.getQLo(arg_06) != 0x00FD) goto block_08B8;
block_0862:
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
suspend;
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
@ -120,9 +112,9 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
block_08CB:
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
spawn class_04DE_slot_22(cameraEgg, arg_06);
spawn SURCAMEW.slot_22(cameraEgg, arg_06);
goto block_0AF7;
block_0945:
@ -133,25 +125,25 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
y = Item.getY(cameraEgg);
z = Item.getZ(cameraEgg);
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
suspend;
if (Item.getMapArray(cameraEgg) != 0) goto block_0A23;
block_09FE:
spawn class_0A18_slot_20(pid, 0, cameraEgg, arg_06);
spawn TRIGGER.slot_20(pid, 0, cameraEgg, arg_06);
suspend;
block_0A23:
spawn class_0A0C_slot_32(pid, 120, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 120, 0x00000000);
suspend;
block_0A49:
if (!Kernel.getCurrentKeyDown()) goto block_0A81;
block_0A58:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
goto block_0A49;
@ -160,7 +152,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
goto block_0AF7;
@ -169,7 +161,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
goto block_061F;
block_0AF7:
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
if screen goto block_0B32;

View file

@ -7,9 +7,7 @@ function surcamew_slot_22() /* entry=284 class_id=0x04DE slot=0x22 */
foundGun; /* [BP-03h] type=0x62 */
set_info(0x00F0, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
/* loop_selector n in selector_0x42(arg0=0x04C8, arg1=0x01CD, arg2=(50 * 32), origin=eventTrigger) */
while (!condition) {
if (!Actor.isNPC(n)) {
foundGun = 1;
@ -17,16 +15,16 @@ function surcamew_slot_22() /* entry=284 class_id=0x04DE slot=0x22 */
/* loopnext */
}
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
if (!foundGun) {
while (getTargetNPCNumMaybe() == 1) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
suspend;
}
}
else {
spawn class_0A0C_slot_32(pid, 0x00C8, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 0x00C8, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */