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

@ -10,127 +10,72 @@ function elevator_gotHit() /* entry=124 class_id=0x021E slot=0x06 */
n, /* [BP-08h] type=0x24 */
nT; /* [BP-0Ah] type=0x69 */
entry:
set_info(0x020C, *(arg_06));
process_exclude();
if ((ref != 1) || (Intrinsic0070() != 1)) goto block_010E;
block_0108:
goto block_04FA;
block_010E:
set_info(0x020C, *(arg_06));
process_exclude();
if ((ref == 1) || (Ultima8Engine.getUnkCrusaderFlag() != 1)) {
return;
}
else {
class_0A0C_slot_33(0x0220, 0);
block_0136:
/* global_address global_id=0x3C */
if Intrinsic0033() goto block_016F;
block_0146:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_0136;
block_016F:
while (!Actor.isBusy()) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */
if Intrinsic0035() goto block_01AF;
block_017F:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
suspend;
block_01AF:
if (!Actor.getSomeFlagProbablyCrouch()) {
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
suspend;
}
item = ref;
lowQuality = Item.fall(arg_06);
direction = Intrinsic009C(arg_06);
lowQuality = Item.getQLo(arg_06);
direction = Item.getQHi(arg_06);
/* loopscr value_u8=0x24 */
/* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */
block_01E2:
if condition goto block_0395;
block_01E5:
if (item != *(arg_06)) goto block_0391;
block_01F8:
if Item.isNpc(item) goto block_0235;
block_0207:
if (item != 1) goto block_0232;
block_0215:
n = item;
block_0232:
goto block_0391;
block_0235:
nT = Intrinsic0016(item);
if (((((((((((((((((((((((((nT != 0x0194) && (nT != 0x04D0)) && (nT != 17)) && (nT != 0x04B1)) && (nT != 0x0476)) && (nT != 0x01C6)) && (nT != 0x018D)) && (nT != 0x0193)) && (nT != 0x01C7)) && (nT != 0x028A)) && (nT != 0x018C)) && (nT != 0x0192)) && (nT != 0x0288)) && (nT != 0x028B)) && (nT != 0x018B)) && (nT != 0x0191)) && (nT != 0x028C)) && (nT != 0x028D)) && (nT != 0x018A)) && (nT != 0x0190)) && (nT != 0x0287)) && (nT != 0x028E)) && (nT != 0x0187)) && (nT != 0x0189)) && (nT != 0x0289)) goto block_0391;
block_0386:
block_0391:
/* loopnext */
goto block_01E2;
block_0395:
while (!condition) {
if (item == *(arg_06)) {
if (!Actor.isNPC(item)) {
if (item == 1) {
n = item;
}
}
else {
nT = Item.getShape(item);
}
}
/* loopnext */
}
set_info(0x0220, 0);
if (direction != 0) goto block_03B1;
block_03AE:
goto block_03BB;
block_03B1:
direction = (direction - 1);
block_03BB:
if (lowQuality < 16) goto block_03FB;
block_03C9:
if (direction == 0) {
}
else {
direction = (direction - 1);
}
if (lowQuality >= 16) {
/* global_address global_id=0x3C */
spawn class_021E_slot_20(Actor.getMap(pid, lowQuality), direction, arg_06);
suspend;
}
else if (lowQuality == 16) {
/* global_address global_id=0x3C */
spawn class_021E_slot_20(Actor.getMap(pid, 4), direction, arg_06);
suspend;
}
else if (lowQuality == 17) {
spawn class_021E_slot_20(pid, 17, 10, direction, arg_06);
suspend;
}
else if (lowQuality == 18) {
spawn class_021E_slot_20(pid, 18, 24, direction, arg_06);
suspend;
}
/* global_address global_id=0x3C */
spawn class_021E_slot_20(Item.getType(pid, lowQuality), direction, arg_06);
suspend;
goto block_0499;
block_03FB:
if (lowQuality != 16) goto block_0435;
block_0403:
/* global_address global_id=0x3C */
spawn class_021E_slot_20(Item.getType(pid, 4), direction, arg_06);
suspend;
goto block_0499;
block_0435:
if (lowQuality != 17) goto block_0467;
block_043D:
spawn class_021E_slot_20(pid, 17, 10, direction, arg_06);
suspend;
goto block_0499;
block_0467:
if (lowQuality != 18) goto block_0499;
block_046F:
spawn class_021E_slot_20(pid, 18, 24, direction, arg_06);
suspend;
goto block_0499;
block_0499:
/* global_address global_id=0x3C */
if Intrinsic0033() goto block_04D2;
block_04A9:
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
suspend;
goto block_0499;
block_04D2:
while (!Actor.isBusy()) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
suspend;
}
class_0A0C_slot_33(0x0220, 0);
block_04FA:
return;
}
return;
}