Pseudocode decompialtion improvements and docs
This commit is contained in:
parent
f869a181a3
commit
589bfc31ef
1898 changed files with 60634 additions and 6597 deletions
|
|
@ -6,7 +6,7 @@ function surcamns_use() /* entry=269 class_id=0x04C6 slot=0x01 */
|
|||
return;
|
||||
}
|
||||
else {
|
||||
spawn class_04C6_slot_20(arg_06);
|
||||
spawn SURCAMNS.slot_20(arg_06);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ function surcamns_equip() /* entry=269 class_id=0x04C6 slot=0x0A */
|
|||
}
|
||||
else if (arg_0A == 0) {
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_04C6_slot_21(arg_06);
|
||||
spawn SURCAMNS.slot_21(arg_06);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_04C6_slot_20(arg_06);
|
||||
spawn SURCAMNS.slot_20(arg_06);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,39 +15,26 @@ function surcamns_slot_20() /* entry=269 class_id=0x04C6 slot=0x20 */
|
|||
if (Item.getMapArray(arg_06) != 0) goto block_0356;
|
||||
|
||||
block_024D:
|
||||
/* 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_026B:
|
||||
if condition goto block_02E4;
|
||||
|
||||
block_026E:
|
||||
if ((Item.getQLo(monit) != link) || (link != 0)) goto block_02E0;
|
||||
|
||||
block_0289:
|
||||
if Item.getQHi(monit) goto block_02E0;
|
||||
|
||||
block_0298:
|
||||
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_02E0:
|
||||
/* loopnext */
|
||||
goto block_026B;
|
||||
for monit in nearby_items(shape=0x037A, 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_02E4:
|
||||
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
|
||||
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
||||
suspend;
|
||||
spawn class_04C6_slot_21(pid, arg_06);
|
||||
spawn SURCAMNS.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_045B;
|
||||
|
||||
|
|
@ -56,11 +43,7 @@ function surcamns_slot_20() /* entry=269 class_id=0x04C6 slot=0x20 */
|
|||
if Item.getQHi(arg_06) goto block_043C;
|
||||
|
||||
block_036C:
|
||||
/* 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_038A:
|
||||
if condition goto block_03C2;
|
||||
|
|
@ -69,7 +52,7 @@ function surcamns_slot_20() /* entry=269 class_id=0x04C6 slot=0x20 */
|
|||
if (Item.getQLo(valueBox) != link) goto block_03BE;
|
||||
|
||||
block_039F:
|
||||
class_0A19_slot_20(valueBox);
|
||||
VALBOX.slot_20(valueBox);
|
||||
passcode = retval;
|
||||
code = (1 + code);
|
||||
goto block_03C2;
|
||||
|
|
@ -82,23 +65,23 @@ function surcamns_slot_20() /* entry=269 class_id=0x04C6 slot=0x20 */
|
|||
if code goto block_03F4;
|
||||
|
||||
block_03CC:
|
||||
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_0417;
|
||||
|
||||
block_03F4:
|
||||
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_0417:
|
||||
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_043C:
|
||||
spawn class_04C6_slot_21(pid, arg_06);
|
||||
spawn SURCAMNS.slot_21(pid, arg_06);
|
||||
suspend;
|
||||
|
||||
block_045B:
|
||||
|
|
|
|||
|
|
@ -22,13 +22,9 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
block_0508:
|
||||
|
||||
block_0534:
|
||||
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_0579:
|
||||
if condition goto block_0B05;
|
||||
|
|
@ -41,15 +37,11 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
|
||||
block_05AB:
|
||||
/* 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=0xF3 string_bytes=0x6 loop_type=0x2 */
|
||||
/* loop_selector npc in nearby_items(shape=MECH_1, origin=cameraEgg) */
|
||||
|
||||
block_0656:
|
||||
if condition goto block_0695;
|
||||
|
|
@ -78,20 +70,20 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
y1 = Item.getY();
|
||||
/* global_address global_id=0x3C */
|
||||
z1 = Item.getZ();
|
||||
spawn class_0A11_slot_28(pid, therma);
|
||||
spawn NPC.slot_28(pid, therma);
|
||||
suspend;
|
||||
|
||||
block_06FD:
|
||||
if (getTargetNPCNumMaybe() != 1) goto block_0737;
|
||||
|
||||
block_070E:
|
||||
spawn class_0A0C_slot_32(pid, 3, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 3, 0x00000000);
|
||||
suspend;
|
||||
goto block_06FD;
|
||||
|
||||
block_0737:
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
|
||||
suspend;
|
||||
goto block_0B05;
|
||||
|
||||
|
|
@ -110,13 +102,13 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
if (!Kernel.getCurrentKeyDown()) goto block_0800;
|
||||
|
||||
block_07D7:
|
||||
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
||||
suspend;
|
||||
goto block_07C8;
|
||||
|
||||
block_0800:
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
|
||||
suspend;
|
||||
goto block_0B05;
|
||||
|
||||
|
|
@ -127,7 +119,7 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
if (Item.getQLo(arg_06) != 0x00FD) goto block_08C6;
|
||||
|
||||
block_0870:
|
||||
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] */
|
||||
|
|
@ -139,9 +131,9 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
|
||||
block_08D9:
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
|
||||
suspend;
|
||||
spawn class_04C6_slot_22(cameraEgg, arg_06);
|
||||
spawn SURCAMNS.slot_22(cameraEgg, arg_06);
|
||||
goto block_0B05;
|
||||
|
||||
block_0953:
|
||||
|
|
@ -152,25 +144,25 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 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_0A31;
|
||||
|
||||
block_0A0C:
|
||||
spawn class_0A18_slot_20(pid, 0, cameraEgg, arg_06);
|
||||
spawn TRIGGER.slot_20(pid, 0, cameraEgg, arg_06);
|
||||
suspend;
|
||||
|
||||
block_0A31:
|
||||
spawn class_0A0C_slot_32(pid, 120, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 120, 0x00000000);
|
||||
suspend;
|
||||
|
||||
block_0A57:
|
||||
if (!Kernel.getCurrentKeyDown()) goto block_0A8F;
|
||||
|
||||
block_0A66:
|
||||
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
||||
suspend;
|
||||
goto block_0A57;
|
||||
|
||||
|
|
@ -179,7 +171,7 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 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_0B05;
|
||||
|
||||
|
|
@ -188,7 +180,7 @@ function surcamns_slot_21() /* entry=269 class_id=0x04C6 slot=0x21 */
|
|||
goto block_0579;
|
||||
|
||||
block_0B05:
|
||||
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
|
||||
suspend;
|
||||
if screen goto block_0B40;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ function surcamns_slot_22() /* entry=269 class_id=0x04C6 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 surcamns_slot_22() /* entry=269 class_id=0x04C6 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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue