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

@ -0,0 +1,36 @@
function mbgunew_gotHit() /* entry=385 class_id=0x05F1 slot=0x06 */
{
set_info(0x020C, *(arg_06));
process_exclude();
local_02 = Item.getFrame(arg_06);
local_04 = Item.getQHi(arg_06);
if (local_02 <= 9) {
return;
}
else if (local_04 <= 99) {
spawn FREE.slot_3B(pid, 10, 0x00000000);
suspend;
return;
}
else {
FREE.slot_35(arg_0C, arg_0A);
if ((retval <= 0) && (local_02 > 0)) {
spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06);
suspend;
/* dword_to_word */
if (process_result) {
FREE.slot_20(1);
if (!retval) {
}
return;
}
else {
ITEM.slot_25(0x1000, arg_06);
FREE.slot_3C(0x0205, *(arg_06));
spawn ITEM.slot_2A(pid, 0, 0, arg_06);
suspend;
}
}
}
return;
}

View file

@ -0,0 +1,22 @@
function mbgunew_equip() /* entry=385 class_id=0x05F1 slot=0x0A */
{
set_info(0x0211, *(arg_06));
process_exclude();
local_04 = Item.getFrame(arg_06);
if (arg_0A == 0) {
local_06 = Kernel.getNumProcesses(0x0205, *(arg_06));
if (!local_06) {
ITEM.slot_24(4, arg_06);
}
return;
}
else if (arg_0A == 1) {
spawn MBGUNEW.slot_20(arg_06);
return;
}
else {
spawn MBGUNEW.slot_20(arg_06);
ITEM.slot_24(4, arg_06);
}
return;
}

View file

@ -0,0 +1,10 @@
function mbgunew_leaveFastArea() /* entry=385 class_id=0x05F1 slot=0x10 */
{
set_info(0x021C, *(arg_06));
process_exclude();
if (Item.getFrame(arg_06) >= 10) {
ITEM.slot_25(0x1000, arg_06);
FREE.slot_3C(0x0205, *(arg_06));
}
return;
}

View file

@ -0,0 +1,93 @@
function mbgunew_slot_20() /* entry=385 class_id=0x05F1 slot=0x20 */
{
entry:
set_info(0x0205, *(arg_06));
local_02 = Item.getFrame(arg_06);
local_04 = Item.getQHi(arg_06);
local_0A = Kernel.getNumProcesses(0x0205, *(arg_06));
ITEM.slot_26(0x1000, arg_06);
if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C;
block_0129:
goto block_031D;
block_012C:
ITEM.slot_24(0x1000, arg_06);
if (local_04 > 99) goto block_0147;
block_0140:
local_04 = (local_04 - 100);
block_0147:
suspend;
local_08 = 0;
block_0156:
if (local_08 <= 8) goto block_0189;
block_015E:
spawn FREE.slot_3B(pid, 3, 0x00000000);
suspend;
local_08 = (1 + local_08);
goto block_0156;
block_0189:
if (local_04 != 0) goto block_01B4;
block_0191:
goto block_0255;
block_01B4:
if (local_04 != 1) goto block_01DF;
block_01BC:
goto block_0255;
block_01DF:
if (local_04 != 2) goto block_020A;
block_01E7:
goto block_0255;
block_020A:
if (local_04 != 3) goto block_0235;
block_0212:
goto block_0255;
block_0235:
block_0255:
spawn FREE.slot_3B(pid, 3, 0x00000000);
suspend;
spawn FREE.slot_3B(pid, 3, 0x00000000);
suspend;
local_08 = 0;
block_029B:
if (local_08 <= 7) goto block_02D1;
block_02A3:
spawn FREE.slot_3B(pid, 3, 0x00000000);
suspend;
local_08 = (1 + local_08);
goto block_029B;
block_02D1:
ITEM.slot_26(4, arg_06);
if retval goto block_02FA;
block_02E0:
ITEM.slot_25(4, arg_06);
ITEM.slot_25(0x1000, arg_06);
goto block_031D;
block_02FA:
spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000);
suspend;
goto block_0147;
block_031D:
return;
}