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

@ -1,39 +1,27 @@
function surcamew_use() /* entry=284 class_id=0x04DE slot=0x01 */
{
entry:
set_info(0x0207, *(arg_06));
process_exclude();
if (Item.getStatus(arg_06) & 0x1000) goto block_01E7;
block_01E1:
goto block_029B;
block_01E7:
/* global_address global_id=0x3C */
if (Item.getType((Item.getNpcNum(arg_06) != 4)) != 25) goto block_028D;
block_020A:
if (global[0x002C] != 0) goto block_0275;
block_0217:
/* pop_global global_id=0x2C size=0x1 */
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
suspend;
block_0275:
/* bit_not */
goto block_029B;
block_028A:
goto block_029B;
block_028D:
spawn class_04DE_slot_20(arg_06);
block_029B:
set_info(0x0207, *(arg_06));
process_exclude();
if (!(Item.getStatus(arg_06) & 0x1000)) {
return;
}
else {
/* global_address global_id=0x3C */
if (Actor.getMap((Item.getQLo(arg_06) == 4)) != 25) {
if (global[0x002C] == 0) {
/* pop_global global_id=0x2C size=0x1 */
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
suspend;
}
/* bit_not */
return;
}
else {
spawn class_04DE_slot_20(arg_06);
}
}
return;
}

View file

@ -2,12 +2,17 @@ function surcamew_equip() /* entry=284 class_id=0x04DE slot=0x0A */
{
set_info(0x0211, *(arg_06));
process_exclude();
if ((Item.getStatus(arg_06) & 0x1000)) {
if (arg_0A == 0) {
/* global_address global_id=0x3C */
spawn class_04DE_slot_21(arg_06);
}
if (!(Item.getStatus(arg_06) & 0x1000)) {
return;
}
else if (arg_0A == 0) {
/* global_address global_id=0x3C */
spawn class_04DE_slot_21(arg_06);
return;
}
else {
/* global_address global_id=0x3C */
spawn class_04DE_slot_20(arg_06);
}
return;
}

View file

@ -11,8 +11,8 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
entry:
set_info(0x021B, 0);
link = Item.getNpcNum(arg_06);
if (Item.getMapNum(arg_06) != 0) goto block_03FC;
link = Item.getQLo(arg_06);
if (Item.getMapArray(arg_06) != 0) goto block_03FC;
block_02F3:
/* loopscr value_u8=0x24 */
@ -25,13 +25,13 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if condition goto block_038A;
block_0314:
if ((Item.getNpcNum(monit) != link) || (link != 0)) goto block_0386;
if ((Item.getQLo(monit) != link) || (link != 0)) goto block_0386;
block_032F:
if Item.hurl(monit) goto block_0386;
if Item.getQHi(monit) goto block_0386;
block_033E:
class_0A17_slot_21(Item.hurl(monit), Item.getNpcNum(monit), arg_06);
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);
@ -53,7 +53,7 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
block_03FC:
code = 0;
if Item.hurl(arg_06) goto block_04E2;
if Item.getQHi(arg_06) goto block_04E2;
block_0412:
/* loopscr value_u8=0x24 */
@ -66,7 +66,7 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if condition goto block_0468;
block_0433:
if (Item.getNpcNum(valueBox) != link) goto block_0464;
if (Item.getQLo(valueBox) != link) goto block_0464;
block_0445:
class_0A19_slot_20(valueBox);
@ -82,13 +82,13 @@ function surcamew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */
if code goto block_049A;
block_0472:
class_0A17_slot_23(passcode, Item.hurl(arg_06), Item.getNpcNum(arg_06), arg_06);
class_0A17_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_04BD;
block_049A:
class_0A17_slot_21(Item.hurl(arg_06), Item.getNpcNum(arg_06), arg_06);
class_0A17_slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
textFile = retval;

View file

@ -17,7 +17,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
entry:
set_info(0x021B, 0);
trueRef = *(arg_06);
if Item.getQLo(0, 0x0470, screen) goto block_05DA;
if Item.create(0, 0x0470, screen) goto block_05DA;
block_05AE:
@ -34,10 +34,10 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
if condition goto block_0AF7;
block_0622:
if (Item.getNpcNum(cameraEgg) != Item.getNpcNum(arg_06)) goto block_0AF3;
if (Item.getQLo(cameraEgg) != Item.getQLo(arg_06)) goto block_0AF3;
block_063E:
if (Item.getNpcNum(arg_06) != 0x00FE) goto block_084F;
if (Item.getQLo(arg_06) != 0x00FE) goto block_084F;
block_0651:
/* global_address global_id=0x3C */
@ -55,10 +55,10 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
if condition goto block_073B;
block_06FF:
if Item.isNpc(npc) goto block_0737;
if Actor.isNPC(npc) goto block_0737;
block_070E:
if (Item.getQLo(npc) != Item.getNpcNum(arg_06)) goto block_0737;
if (Actor.GetNPCDataField0x63_00B(npc) != Item.getQLo(arg_06)) goto block_0737;
block_072A:
therma = npc;
@ -81,14 +81,14 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
block_0786:
/* global_address global_id=0x3C */
x1 = Intrinsic0013();
x1 = Item.getX();
/* global_address global_id=0x3C */
y1 = Item.legal_create();
y1 = Item.getY();
/* global_address global_id=0x3C */
z1 = Item.getZ();
block_07B3:
if (!Item.enterFastArea()) goto block_07EB;
if (!Kernel.getCurrentKeyDown()) goto block_07EB;
block_07C2:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
@ -105,7 +105,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
goto block_0AF3;
block_084F:
if (Item.getNpcNum(arg_06) != 0x00FD) goto block_08B8;
if (Item.getQLo(arg_06) != 0x00FD) goto block_08B8;
block_0862:
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
@ -116,7 +116,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
goto block_0AF3;
block_08B8:
if (Item.getNpcNum(arg_06) > 0x00F9) goto block_0948;
if (Item.getQLo(arg_06) > 0x00F9) goto block_0948;
block_08CB:
/* global_address global_id=0x3C */
@ -129,15 +129,15 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
goto block_0AF3;
block_0948:
x = Intrinsic0013(cameraEgg);
y = Item.legal_create(cameraEgg);
x = Item.getX(cameraEgg);
y = Item.getY(cameraEgg);
z = Item.getZ(cameraEgg);
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
suspend;
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
suspend;
if (Item.getMapNum(cameraEgg) != 0) goto block_0A23;
if (Item.getMapArray(cameraEgg) != 0) goto block_0A23;
block_09FE:
spawn class_0A18_slot_20(pid, 0, cameraEgg, arg_06);
@ -148,7 +148,7 @@ function surcamew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */
suspend;
block_0A49:
if (!Item.enterFastArea()) goto block_0A81;
if (!Kernel.getCurrentKeyDown()) goto block_0A81;
block_0A58:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);

View file

@ -6,51 +6,32 @@ function surcamew_slot_22() /* entry=284 class_id=0x04DE slot=0x22 */
n, /* [BP-02h] type=0x24 */
foundGun; /* [BP-03h] type=0x62 */
entry:
set_info(0x00F0, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
block_0BF2:
if condition goto block_0C1A;
block_0BF5:
if Item.isNpc(n) goto block_0C16;
block_0C04:
foundGun = 1;
block_0C16:
set_info(0x00F0, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
while (!condition) {
if (!Actor.isNPC(n)) {
foundGun = 1;
}
/* loopnext */
goto block_0BF2;
block_0C1A:
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
suspend;
if foundGun goto block_0CBC;
block_0C7F:
if (Item.pop() != 1) goto block_0CB9;
block_0C90:
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
suspend;
goto block_0C7F;
block_0CB9:
goto block_0CE3;
block_0CBC:
}
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
suspend;
if (!foundGun) {
while (getTargetNPCNumMaybe() == 1) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
suspend;
}
}
else {
spawn class_0A0C_slot_32(pid, 0x00C8, 0x00000000);
suspend;
block_0CE3:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
return;
}
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
return;
}