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

@ -4,38 +4,23 @@ function switch_slot_20() /* entry=392 class_id=0x0A16 slot=0x20 */
referent, /* [BP+00h] type=0x69 */
counter; /* [BP-02h] type=0x69 */
entry:
set_info(0x0207, *(arg_06));
if Item.getFrame(arg_06) goto block_0168;
block_0105:
set_info(0x0207, *(arg_06));
if (!Item.getFrame(arg_06)) {
counter = 0;
block_011A:
if (counter <= 5) goto block_0165;
block_0122:
spawn class_0A0C_slot_32(pid, 3, 0x00000000);
suspend;
counter = (1 + counter);
goto block_011A;
block_0165:
goto block_01C5;
block_0168:
counter = 0;
block_017D:
if (counter <= 5) goto block_01C5;
block_0185:
spawn class_0A0C_slot_32(pid, 3, 0x00000000);
suspend;
counter = (1 + counter);
goto block_017D;
block_01C5:
while (counter > 5) {
spawn class_0A0C_slot_32(pid, 3, 0x00000000);
suspend;
counter = (1 + counter);
}
return;
}
else {
counter = 0;
while (counter > 5) {
spawn class_0A0C_slot_32(pid, 3, 0x00000000);
suspend;
counter = (1 + counter);
}
}
return;
}

View file

@ -4,66 +4,40 @@ function switch_slot_21() /* entry=392 class_id=0x0A16 slot=0x21 */
referent, /* [BP+00h] type=0x69 */
okay; /* [BP-01h] type=0x62 */
entry:
set_info(0x0207, *(arg_06));
okay = Item.getQLo(Item.getNpcNum(arg_06));
if (Item.getFrame(arg_06) != 4) goto block_029E;
block_0221:
set_info(0x0207, *(arg_06));
okay = MainActor.hasKeycard(Item.getQLo(arg_06));
if (Item.getFrame(arg_06) == 4) {
spawn class_0A0C_slot_21(pid, 0x00AD, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
suspend;
spawn class_0A0C_slot_32(pid, 1, 0x00000000);
suspend;
goto block_043B;
block_029B:
goto block_043B;
block_029E:
if Intrinsic0000() goto block_030C;
block_02A9:
return;
}
else if (!World.getAlertActive()) {
spawn class_0A0C_slot_21(pid, 0x0090, 0x00000000);
suspend;
if (Intrinsic00DA(100, 0) > 50) goto block_02F8;
block_02E7:
goto block_0306;
block_02F8:
block_0306:
goto block_043B;
block_030C:
if okay goto block_038B;
block_0314:
if (UCMachine.rndRange(100, 0) <= 50) {
}
return;
}
else if (!okay) {
spawn class_0A0C_slot_32(pid, 1, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, 0, *(arg_06), arg_06);
suspend;
goto block_043B;
block_038B:
block_03A6:
if Item.touch(0x0090, arg_06) goto block_03E1;
block_03B8:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_03A6;
block_03E1:
return;
}
else {
while (!AudioProcess.isSFXPlayingForObject(0x0090, arg_06)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
spawn class_0A0C_slot_32(pid, 1, 0x00000000);
suspend;
spawn class_0A18_slot_20(pid, 1, *(arg_06), arg_06);
suspend;
block_043B:
return;
}
return;
}