Usecode pseudocode

This commit is contained in:
MaddoScientisto 2026-03-26 00:37:17 +01:00
commit c12bb39437
1362 changed files with 71072 additions and 38056 deletions

View file

@ -6,10 +6,5 @@ function item_slot_20() /* entry=400 class_id=0x0A1E slot=0x20 */
desty, /* [BP+0Ch] type=0x69 */
truncate; /* [BP+0Eh] type=0x62 */
entry:
goto block_0150;
block_0150:
return;
return;
}

View file

@ -6,27 +6,15 @@ function item_slot_21() /* entry=400 class_id=0x0A1E slot=0x21 */
targetItem, /* [BP-02h] type=0x24 */
item; /* [BP-04h] type=0x24 */
entry:
targetItem = targetRef;
if targetRef goto block_01EA;
block_01A1:
if (Intrinsic003C(targetItem) != 6) goto block_01EA;
block_01B9:
/* loopscr value_u8=0x24 */
/* loop current_var=0xFC string_bytes=0x1 loop_type=0x4 */
block_01C9:
if condition goto block_01E8;
block_01CC:
/* loopnext */
goto block_01C9;
block_01E8:
block_01EA:
return;
targetItem = targetRef;
if (!targetRef) {
if (Item.getItemFamily(targetItem) == 6) {
/* loopscr value_u8=0x24 */
/* loop current_var=0xFC string_bytes=0x1 loop_type=0x4 */
while (!condition) {
/* loopnext */
}
}
}
return;
}

View file

@ -1,15 +1,8 @@
function item_slot_22() /* entry=400 class_id=0x0A1E slot=0x22 */
{
entry:
if (Item.getStatus(arg_06) & arg_0A) goto block_025A;
block_0249:
if (!(Item.getStatus(arg_06) & arg_0A)) {
/* bit_not */
goto block_0267;
block_025A:
block_0267:
return;
}
return;
}

View file

@ -1,6 +1,4 @@
function item_slot_23() /* entry=400 class_id=0x0A1E slot=0x23 */
{
entry:
return;
return;
}

View file

@ -1,7 +1,5 @@
function item_slot_24() /* entry=400 class_id=0x0A1E slot=0x24 */
{
entry:
/* bit_not */
return;
/* bit_not */
return;
}

View file

@ -27,8 +27,8 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
entry:
set_info(1, *(arg_06));
x = Intrinsic0013(arg_06);
y = Item.legal_create(arg_06);
x = Item.getX(arg_06);
y = Item.getY(arg_06);
z = Item.getZ(arg_06);
w = ((destX - x) + 1);
h = ((destY - y) + 1);
@ -133,7 +133,7 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
currentP = x;
local_03 = y;
local_01 = z;
if (!Item.pop(0, 1, currentP, arg_06)) goto block_0552;
if (!legalMoveToPoint(0, 1, currentP, arg_06)) goto block_0552;
block_0548:
/* word_to_dword */
@ -151,7 +151,7 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
currentP = x;
local_03 = y;
local_01 = z;
if (!Item.pop(0, 1, currentP, arg_06)) goto block_059F;
if (!legalMoveToPoint(0, 1, currentP, arg_06)) goto block_059F;
block_0595:
/* word_to_dword */
@ -184,7 +184,7 @@ function item_slot_25() /* entry=400 class_id=0x0A1E slot=0x25 */
currentP = x;
local_03 = y;
local_01 = z;
if (!Item.pop(0, 1, currentP, arg_06)) goto block_0629;
if (!legalMoveToPoint(0, 1, currentP, arg_06)) goto block_0629;
block_061F:
/* word_to_dword */

View file

@ -26,8 +26,8 @@ function item_slot_26() /* entry=400 class_id=0x0A1E slot=0x26 */
entry:
set_info(1, *(arg_06));
x = Intrinsic0013(arg_06);
y = Item.legal_create(arg_06);
x = Item.getX(arg_06);
y = Item.getY(arg_06);
z = Item.getZ(arg_06);
w = ((destX - x) + 1);
h = ((destY - y) + 1);

View file

@ -9,35 +9,26 @@ function item_slot_27() /* entry=400 class_id=0x0A1E slot=0x27 */
currentHits, /* [BP-04h] type=0x69 */
newHits; /* [BP-06h] type=0x69 */
entry:
set_info(1, *(arg_06));
if (damageRef != 0x4000) goto block_0B3C;
block_0B32:
set_info(1, *(arg_06));
if (damageRef == 0x4000) {
/* word_to_dword */
/* pop_result */
goto block_0BA1;
block_0B3C:
damagePoints = (vel & 0x00FF);
currentHits = Item.getNpcNum(arg_06);
newHits = (currentHits + damagePoints);
if (newHits >= maxHits) goto block_0B8A;
block_0B70:
/* word_to_dword */
/* pop_result */
goto block_0BA1;
block_0B87:
goto block_0BA1;
block_0B8A:
/* word_to_dword */
/* pop_result */
goto block_0BA1;
block_0BA1:
return;
}
else {
damagePoints = (vel & 0x00FF);
currentHits = Item.getNPCNum(arg_06);
newHits = (currentHits + damagePoints);
if (newHits < maxHits) {
/* word_to_dword */
/* pop_result */
return;
}
else {
/* word_to_dword */
/* pop_result */
return;
}
}
return;
}

View file

@ -10,81 +10,32 @@ function item_slot_28() /* entry=400 class_id=0x0A1E slot=0x28 */
x, /* [BP-07h] type=0x69 */
y; /* [BP-09h] type=0x69 */
entry:
set_info(0x020A, *(arg_06));
if (*(arg_06) != 0x4000) goto block_0C30;
block_0C2A:
goto block_0EF7;
block_0C30:
set_info(0x020A, *(arg_06));
if (*(arg_06) == 0x4000) {
return;
}
else {
bigBomb = 0;
x = Intrinsic0013(arg_06);
y = Item.legal_create(arg_06);
if (boomType != 1) goto block_0D4D;
block_0C71:
if (Intrinsic00DA(2, 0) != 1) goto block_0CC0;
block_0C82:
goto block_0D4A;
block_0CC0:
if (Intrinsic00DA(2, 0) != 2) goto block_0D0F;
block_0CD1:
goto block_0D4A;
block_0D0F:
block_0D4A:
goto block_0EC3;
block_0D4D:
if (boomType != 2) goto block_0E2E;
block_0D55:
if (Intrinsic00DA(2, 0) != 1) goto block_0DA3;
block_0D66:
goto block_0E2B;
block_0DA3:
if (Intrinsic00DA(2, 0) != 2) goto block_0DF1;
block_0DB4:
goto block_0E2B;
block_0DF1:
block_0E2B:
goto block_0EC3;
block_0E2E:
if (boomType != 0) goto block_0EC3;
block_0E36:
if (Intrinsic00DA(1, 0) != 1) goto block_0E85;
block_0E47:
goto block_0EC0;
block_0E85:
block_0EC0:
goto block_0EC3;
block_0EC3:
x = Item.getX(arg_06);
y = Item.getY(arg_06);
if (boomType == 1) {
if (UCMachine.rndRange(2, 0) == 1) {
}
else if (UCMachine.rndRange(2, 0) == 2) {
}
}
else if (boomType == 2) {
if (UCMachine.rndRange(2, 0) == 1) {
}
else if (UCMachine.rndRange(2, 0) == 2) {
}
}
else if (boomType == 0) {
if (UCMachine.rndRange(1, 0) == 1) {
}
}
origin = *(arg_06);
set_info(0x020A, 0);
if selfDestruct goto block_0EF7;
block_0EDD:
if (origin != 0x4000) goto block_0EF7;
block_0EEC:
block_0EF7:
return;
}
return;
}

View file

@ -19,7 +19,7 @@ function item_slot_29() /* entry=400 class_id=0x0A1E slot=0x29 */
if condition goto block_1055;
block_0F82:
if Item.andStatus(item, arg_06) goto block_1051;
if Item.isOn(item, arg_06) goto block_1051;
block_0F93:
if (z > 1) goto block_0FBC;
@ -29,7 +29,7 @@ function item_slot_29() /* entry=400 class_id=0x0A1E slot=0x29 */
goto block_1055;
block_0FBC:
theType = Intrinsic0016(item);
theType = Item.getShape(item);
if (((((((((theType != 95) || (theType != 0x0096)) || (theType != 0x0132)) || (theType != 0x04CD)) || (theType != 0x0366)) || (theType != 0x0365)) || (theType != 0x0290)) || (theType != 0x0336)) || (theType != 0x0150)) goto block_104A;
block_103D:

View file

@ -13,13 +13,17 @@ function item_slot_2A() /* entry=400 class_id=0x0A1E slot=0x2A */
spawn class_0A1E_slot_29(pid, arg_06);
suspend;
/* dword_to_word */
if ((!process_result)) {
if ((x != 1) || (x == 2)) {
spawn class_0A1E_slot_2B(burn);
}
else if ((x != 3) || (x == 4)) {
spawn class_0A1E_slot_2B(burn);
}
if (process_result) {
return;
}
else if ((x == 1) || (x != 2)) {
spawn class_0A1E_slot_2B(burn);
}
else if ((x == 3) || (x != 4)) {
spawn class_0A1E_slot_2B(burn);
}
else {
spawn class_0A1E_slot_2B(burn);
}
return;
}

View file

@ -5,65 +5,39 @@ function item_slot_2B() /* entry=400 class_id=0x0A1E slot=0x2B */
burn, /* [BP-02h] type=0x24 */
burn2; /* [BP-04h] type=0x24 */
entry:
set_info(0x0001, *(arg_06));
spawn class_0A0C_slot_32(Intrinsic00DA(pid, 0x00C8, 100), 0x00000000);
suspend;
burn2 = *(arg_06);
if (Intrinsic0016(burn2) != 0x0456) goto block_14DD;
block_1421:
set_info(0x0001, *(arg_06));
spawn class_0A0C_slot_32(UCMachine.rndRange(pid, 0x00C8, 100), 0x00000000);
suspend;
burn2 = *(arg_06);
if (Item.getShape(burn2) == 0x0456) {
set_info(0x00F0, burn);
if Item.getQHi() goto block_14CF;
block_1484:
if ((Item.getFrame(burn) != 9) && (Intrinsic0007(arg_06) != 1)) goto block_14CF;
block_14A6:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_1484;
block_14CF:
goto block_1675;
block_14DD:
if (Intrinsic0016(burn2) != 0x044A) goto block_15A9;
block_14ED:
set_info(0x00F0, burn);
if Item.getQHi() goto block_159B;
block_1550:
if ((Item.getFrame(burn) != 9) && (Intrinsic0007(arg_06) != 1)) goto block_159B;
block_1572:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_1550;
block_159B:
goto block_1675;
block_15A9:
if (Intrinsic0016(burn2) != 0x0085) goto block_1675;
block_15B9:
set_info(0x00F0, burn);
if Item.getQHi() goto block_1667;
block_161C:
if ((Item.getFrame(burn) != 9) && (Intrinsic0007(arg_06) != 1)) goto block_1667;
block_163E:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_161C;
block_1667:
goto block_1675;
block_1675:
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
}
return;
}
else if (Item.getShape(burn2) == 0x044A) {
set_info(0x00F0, burn);
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
}
return;
}
else if (Item.getShape(burn2) == 0x0085) {
set_info(0x00F0, burn);
if (!getAnimationsDisabled()) {
while ((Item.getFrame(burn) == 9) && (Item.isOnScreen(arg_06) != 1)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
}
return;
}
return;
}

View file

@ -4,35 +4,20 @@ function item_slot_2C() /* entry=400 class_id=0x0A1E slot=0x2C */
referent, /* [BP+00h] type=0x69 */
n; /* [BP-02h] type=0x24 */
entry:
set_info(0x0001, *(arg_06));
/* loopscr value_u8=0x24 */
/* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */
block_16C6:
if condition goto block_1701;
block_16C9:
if (n < 0x00FF) goto block_16FD;
block_16D8:
if ((n > 1) && (Intrinsic00C3(n) != 0)) goto block_16FD;
block_16F3:
/* word_to_dword */
/* pop_result */
goto block_170D;
block_16FD:
set_info(0x0001, *(arg_06));
/* loopscr value_u8=0x24 */
/* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */
while (!condition) {
if (n >= 0x00FF) {
if ((n > 1) && (Actor.isDead(n) == 0)) {
/* word_to_dword */
/* pop_result */
return;
}
}
/* loopnext */
goto block_16C6;
block_1701:
/* word_to_dword */
/* pop_result */
goto block_170D;
block_170D:
return;
}
/* word_to_dword */
/* pop_result */
return;
}

View file

@ -12,107 +12,66 @@ function item_slot_2D() /* entry=400 class_id=0x0A1E slot=0x2D */
npc, /* [BP-0Ch] type=0x24 */
ref; /* [BP-0Eh] type=0x69 */
entry:
set_info(0x021B, 0);
monster1 = egg1;
if (Item.getFrame(monster1) != 0) goto block_175C;
block_1756:
goto block_19BA;
block_175C:
link = Item.getNpcNum(monster1);
set_info(0x021B, 0);
monster1 = egg1;
if (Item.getFrame(monster1) == 0) {
return;
}
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 */
block_1786:
if condition goto block_19B8;
block_1789:
if (Item.getNpcNum(monster2) != link) goto block_19B4;
block_179B:
if (Item.getFrame(monster2) != 1) goto block_19B4;
block_17AD:
if ((var != 2) || (var != 3)) goto block_193C;
block_17C1:
/* 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 */
block_17DC:
if condition goto block_1832;
block_17DF:
if Item.isNpc(npc) goto block_182E;
block_17EE:
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) < (Item.getZ(arg_06) + 10))) goto block_182E;
block_1824:
/* word_to_dword */
/* pop_result */
goto block_19BA;
block_182E:
/* loopnext */
goto block_17DC;
block_1832:
ref = Item.andStatus(monster2, arg_06);
if ref goto block_1939;
block_184C:
newNpc = ref;
a = (Item.getNpcNum(monster1) & 15);
if ((a != 2) || (a != 4)) goto block_1939;
block_1878:
suspend;
block_18FF:
if Item.touch(48, arg_06) goto block_1939;
block_1910:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_18FF;
block_1939:
goto block_1968;
block_193C:
ref = Item.andStatus(monster2, arg_06);
if ref goto block_1968;
block_1954:
newNpc = ref;
block_1968:
if ((var != 0) || (var != 2)) goto block_19AA;
block_197C:
spawn class_0A1E_slot_2E(monster2, monster1, arg_06);
block_19AA:
/* word_to_dword */
/* pop_result */
goto block_19BA;
block_19B4:
/* loopnext */
goto block_1786;
block_19B8:
block_19BA:
return;
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) {
if (!Actor.isNPC(npc)) {
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) >= (Item.getZ(arg_06) + 10))) {
/* word_to_dword */
/* pop_result */
return;
}
}
/* loopnext */
}
ref = Actor.createActorCru(monster2, arg_06);
if (!ref) {
newNpc = ref;
a = (Item.getNPCNum(monster1) & 15);
if ((a == 2) || (a != 4)) {
suspend;
while (!AudioProcess.isSFXPlayingForObject(48, arg_06)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
}
}
}
else {
ref = Actor.createActorCru(monster2, arg_06);
if (!ref) {
newNpc = ref;
}
}
if ((var == 0) || (var != 2)) {
spawn class_0A1E_slot_2E(monster2, monster1, arg_06);
}
/* word_to_dword */
/* pop_result */
return;
}
}
/* loopnext */
}
}
return;
}

View file

@ -7,12 +7,10 @@ function item_slot_2E() /* entry=400 class_id=0x0A1E slot=0x2E */
item1, /* [BP-02h] type=0x24 */
item2; /* [BP-04h] type=0x24 */
entry:
set_info(1, 0);
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
item1 = ref1;
item2 = ref2;
return;
set_info(1, 0);
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
item1 = ref1;
item2 = ref2;
return;
}