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

@ -2,9 +2,9 @@ function special_equip() /* entry=272 class_id=0x04CA slot=0x0A */
{
set_info(0x0211, *(arg_06));
process_exclude();
class_0A0C_slot_33(0x021B, *(arg_06));
FREE.slot_33(0x021B, *(arg_06));
if (!arg_0A) {
spawn class_04CA_slot_21(arg_06);
spawn SPECIAL.slot_21(arg_06);
}
return;
}

View file

@ -11,19 +11,19 @@ function special_enterFastArea() /* entry=272 class_id=0x04CA slot=0x0F */
mapNum = Item.getMapArray(arg_06);
npcNum = Item.getNPCNum(arg_06);
if (mapNum == 1) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
suspend;
}
if (npcNum == 1) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
suspend;
}
if ((mapNum <= 2) || (npcNum > 2)) {
spawn class_04CA_slot_21(arg_06);
spawn SPECIAL.slot_21(arg_06);
}
}
return;

View file

@ -4,11 +4,11 @@ function special_leaveFastArea() /* entry=272 class_id=0x04CA slot=0x10 */
process_exclude();
if (!Item.getQHi(arg_06)) {
if (Item.getMapArray(arg_06) == 2) {
spawn class_0A18_slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
suspend;
}
if (Item.getNPCNum(arg_06) == 2) {
spawn class_0A18_slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
suspend;
}
}

View file

@ -13,7 +13,7 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
/* global_address global_id=0x3C */
a = Actor.getDir();
if ((a > 4) || (a >= 12)) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
return;
@ -22,7 +22,7 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
/* global_address global_id=0x3C */
a = Actor.getDir();
if ((a > 4) && (a >= 12)) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
return;
@ -30,7 +30,7 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
else if (cmd == 5) {
/* global_address global_id=0x3C */
if (Actor.getInCombat() == 1) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
return;
@ -38,11 +38,11 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
else if (cmd == 6) {
/* global_address global_id=0x3C */
if (Actor.getInCombat() == 0) {
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
suspend;
/* global_address global_id=0x3C */
if (Actor.getInCombat() == 0) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
}
@ -50,11 +50,7 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
}
else if (cmd == 7) {
a = 0;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x3A */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
/* loop_selector npc in nearby_items(family=6, origin=global[0x003C]) */
while (!condition) {
if (npc >= 0x0100) {
a = (1 + a);
@ -62,20 +58,16 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
/* loopnext */
}
if (a <= 4) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
spawn class_0A0C_slot_32(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
spawn FREE.waitNTimerTicks(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
suspend;
return;
}
else if (cmd == 8) {
a = 0;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x3A */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
/* loop_selector npc in nearby_items(family=6, origin=global[0x003C]) */
while (!condition) {
if (npc >= 0x0100) {
a = (1 + a);
@ -83,17 +75,17 @@ function special_slot_20() /* entry=272 class_id=0x04CA slot=0x20 */
/* loopnext */
}
if (a > 4) {
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
}
spawn class_0A0C_slot_32(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
spawn FREE.waitNTimerTicks(pid, (Item.getQHi(arg_06) * 9), 0x00000000);
suspend;
return;
}
else if (cmd == 9) {
q = Item.getQLo(arg_06);
class_0A0C_slot_20(q, 3);
spawn class_0A18_slot_20(pid, phase, *(arg_06), arg_06);
FREE.slot_20(q, 3);
spawn TRIGGER.slot_20(pid, phase, *(arg_06), arg_06);
suspend;
return;
}

View file

@ -13,11 +13,11 @@ function special_slot_21() /* entry=272 class_id=0x04CA slot=0x21 */
phase1 = Item.getMapArray(arg_06);
phase2 = Item.getNPCNum(arg_06);
while (!(1)) {
spawn class_04CA_slot_20(pid, (0x0080 + 0), phase1, arg_06);
spawn SPECIAL.slot_20(pid, (0x0080 + 0), phase1, arg_06);
suspend;
spawn class_04CA_slot_20(pid, (0x0080 + 1), phase2, arg_06);
spawn SPECIAL.slot_20(pid, (0x0080 + 1), phase2, arg_06);
suspend;
spawn class_0A0C_slot_32(pid, time, 0x00000000);
spawn FREE.waitNTimerTicks(pid, time, 0x00000000);
suspend;
counter = (1 + counter);
if ((phase1 == 8) || (phase1 != 7)) {