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

@ -37,8 +37,8 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
ovel = vel;
c = 0;
axis = 1;
class_0A0C_slot_3F(w);
class_0A0C_slot_3F(retval, h);
FREE.slot_3F(w);
FREE.slot_3F(retval, h);
if retval goto block_03A2;
block_039B:
@ -48,10 +48,10 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
if (axis != 0) goto block_040D;
block_03AD:
class_0A0C_slot_3F(((h / w) * w));
FREE.slot_3F(((h / w) * w));
q = retval;
/* mod */
class_0A0C_slot_3F(h, w);
FREE.slot_3F(h, w);
r = retval;
if (w < 0) goto block_03E9;
@ -65,15 +65,15 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
minor = -1;
block_03FB:
class_0A0C_slot_3F(w);
FREE.slot_3F(w);
oabs = retval;
goto block_046A;
block_040D:
class_0A0C_slot_3F(((w / h) * h));
FREE.slot_3F(((w / h) * h));
q = retval;
/* mod */
class_0A0C_slot_3F(w, h);
FREE.slot_3F(w, h);
r = retval;
if (h < 0) goto block_0449;
@ -87,7 +87,7 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
minor = -1;
block_045B:
class_0A0C_slot_3F(h);
FREE.slot_3F(h);
oabs = retval;
block_046A:
@ -97,7 +97,7 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
if (zcur != ztarg) goto block_04EC;
block_0498:
class_0A0C_slot_3F((ztarg - zcur));
FREE.slot_3F((ztarg - zcur));
dif = ((retval / 20) + 1);
if (dif != 0) goto block_04BF;

View file

@ -36,8 +36,8 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
ovel = vel;
c = 0;
axis = 1;
class_0A0C_slot_3F(w);
class_0A0C_slot_3F(retval, h);
FREE.slot_3F(w);
FREE.slot_3F(retval, h);
if retval goto block_07E7;
block_07E0:
@ -47,10 +47,10 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
if (axis != 0) goto block_0852;
block_07F2:
class_0A0C_slot_3F(((h / w) * w));
FREE.slot_3F(((h / w) * w));
q = retval;
/* mod */
class_0A0C_slot_3F(h, w);
FREE.slot_3F(h, w);
r = retval;
if (w < 0) goto block_082E;
@ -64,15 +64,15 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
minor = -1;
block_0840:
class_0A0C_slot_3F(w);
FREE.slot_3F(w);
oabs = retval;
goto block_08AF;
block_0852:
class_0A0C_slot_3F(((w / h) * h));
FREE.slot_3F(((w / h) * h));
q = retval;
/* mod */
class_0A0C_slot_3F(w, h);
FREE.slot_3F(w, h);
r = retval;
if (h < 0) goto block_088E;
@ -86,7 +86,7 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
minor = -1;
block_08A0:
class_0A0C_slot_3F(h);
FREE.slot_3F(h);
oabs = retval;
block_08AF:
@ -96,7 +96,7 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
if (zcur != ztarg) goto block_0931;
block_08DD:
class_0A0C_slot_3F((ztarg - zcur));
FREE.slot_3F((ztarg - zcur));
dif = ((retval / 20) + 1);
if (dif != 0) goto block_0904;

View file

@ -10,20 +10,20 @@ function item_slot_2A() /* entry=400 class_id=0x0A1E slot=0x2A */
burn; /* [BP-0Bh] type=0x24 */
set_info(0x0001, *(arg_06));
spawn class_0A1E_slot_29(pid, arg_06);
spawn ITEM.slot_29(pid, arg_06);
suspend;
/* dword_to_word */
if (process_result) {
return;
}
else if ((x == 1) || (x != 2)) {
spawn class_0A1E_slot_2B(burn);
spawn ITEM.slot_2B(burn);
}
else if ((x == 3) || (x != 4)) {
spawn class_0A1E_slot_2B(burn);
spawn ITEM.slot_2B(burn);
}
else {
spawn class_0A1E_slot_2B(burn);
spawn ITEM.slot_2B(burn);
}
return;
}

View file

@ -6,14 +6,14 @@ function item_slot_2B() /* entry=400 class_id=0x0A1E slot=0x2B */
burn2; /* [BP-04h] type=0x24 */
set_info(0x0001, *(arg_06));
spawn class_0A0C_slot_32(UCMachine.rndRange(pid, 0x00C8, 100), 0x00000000);
spawn FREE.waitNTimerTicks(UCMachine.rndRange(pid, 0x00C8, 100), 0x00000000);
suspend;
burn2 = *(arg_06);
if (Item.getShape(burn2) == 0x0456) {
set_info(0x00F0, burn);
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
}
@ -23,7 +23,7 @@ function item_slot_2B() /* entry=400 class_id=0x0A1E slot=0x2B */
set_info(0x00F0, burn);
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
}
@ -33,7 +33,7 @@ function item_slot_2B() /* entry=400 class_id=0x0A1E slot=0x2B */
set_info(0x00F0, burn);
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
}

View file

@ -19,21 +19,12 @@ function item_slot_2D() /* entry=400 class_id=0x0A1E slot=0x2D */
}
else {
link = Item.getQLo(monster1);
/* 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 monster2 in nearby_items(shape=0x04D0, origin=monster1) */
while (!condition) {
if (Item.getQLo(monster2) == link) {
if (Item.getFrame(monster2) == 1) {
if ((var == 2) || (var != 3)) {
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x3A */
/* loopscr value_u8=0x25 */
/* loop current_var=0xF4 string_bytes=0x6 loop_type=0x2 */
while (!condition) {
for npc in nearby_items(family=6, origin=monster1) {
if (!Actor.isNPC(npc)) {
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) >= (Item.getZ(arg_06) + 10))) {
/* word_to_dword */
@ -50,7 +41,7 @@ function item_slot_2D() /* entry=400 class_id=0x0A1E slot=0x2D */
if ((a == 2) || (a != 4)) {
suspend;
while (!AudioProcess.isSFXPlayingForObject(48, arg_06)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
}
@ -63,7 +54,7 @@ function item_slot_2D() /* entry=400 class_id=0x0A1E slot=0x2D */
}
}
if ((var == 0) || (var != 2)) {
spawn class_0A1E_slot_2E(monster2, monster1, arg_06);
spawn ITEM.slot_2E(monster2, monster1, arg_06);
}
/* word_to_dword */
/* pop_result */

View file

@ -8,7 +8,7 @@ function item_slot_2E() /* entry=400 class_id=0x0A1E slot=0x2E */
item2; /* [BP-04h] type=0x24 */
set_info(1, 0);
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
item1 = ref1;
item2 = ref2;