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

@ -16,10 +16,10 @@ function elevator_gotHit() /* entry=124 class_id=0x021E slot=0x06 */
return;
}
else {
class_0A0C_slot_33(0x0220, 0);
FREE.slot_33(0x0220, 0);
/* global_address global_id=0x3C */
while (!Actor.isBusy()) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */
@ -54,28 +54,28 @@ function elevator_gotHit() /* entry=124 class_id=0x021E slot=0x06 */
}
if (lowQuality >= 16) {
/* global_address global_id=0x3C */
spawn class_021E_slot_20(Actor.getMap(pid, lowQuality), direction, arg_06);
spawn ELEVATOR.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);
spawn ELEVATOR.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);
spawn ELEVATOR.slot_20(pid, 17, 10, direction, arg_06);
suspend;
}
else if (lowQuality == 18) {
spawn class_021E_slot_20(pid, 18, 24, direction, arg_06);
spawn ELEVATOR.slot_20(pid, 18, 24, direction, arg_06);
suspend;
}
/* global_address global_id=0x3C */
while (!Actor.isBusy()) {
spawn class_0A0C_slot_32(pid, 5, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
suspend;
}
class_0A0C_slot_33(0x0220, 0);
FREE.slot_33(0x0220, 0);
}
return;
}

View file

@ -10,14 +10,12 @@ function elevator_release() /* entry=124 class_id=0x021E slot=0x09 */
process_exclude();
w = Item.getSurfaceWeight(arg_06);
if (w == 0) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFC string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in selector_0x42(arg0=0x0189, arg1=0x0289, arg2=(10 * 32), origin=global[0x003C]) */
while (!condition) {
door = item;
spawn class_0A06_slot_21(pid, 2, door);
spawn DOOR.slot_21(pid, 2, door);
suspend;
/* loopnext */
}

View file

@ -13,9 +13,7 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
door1; /* [BP-0Ch] type=0x24 */
set_info(1, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in selector_0x42(arg0=0x0189, arg1=0x0289, arg2=(10 * 32), origin=arg_06) */
while (!condition) {
door = item;
/* loopnext */
@ -23,7 +21,7 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
if (door) {
return;
}
else if (Item.getShape(door) == 0x0189) {
else if (Item.getShape(door) == ELEVATOR_DOOR_SEGMENT) {
/* global_address global_id=0x3C */
suspend;
/* global_address global_id=0x3C */
@ -44,72 +42,63 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
suspend;
}
/* global_address global_id=0x3C */
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
spawn class_0A06_slot_21(pid, 2, door);
spawn DOOR.slot_21(pid, 2, door);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in selector_0x42(arg0=0x01C4, arg1=0x0186, arg2=(20 * 32), origin=arg_06) */
while (!condition) {
post1 = item;
/* loopnext */
}
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
while (!condition) {
for item in selector_0x42(arg0=0x01C5, arg1=0x0184, arg2=(20 * 32), origin=arg_06) {
post2 = item;
/* loopnext */
}
if (!(post1 && post2)) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
while (!AudioProcess.isSFXPlayingForObject(0x00F4)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */
if (!dir) {
counter = 5;
while (counter > 7) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
counter = (1 + counter);
}
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
}
else {
counter = 1;
while (counter > 4) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
counter = (1 + counter);
}
}
}
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
suspend;
spawn class_0A0C_slot_3C(pid, 0x00000000);
spawn FREE.slot_3C(pid, 0x00000000);
suspend;
/* global_address global_id=0x3C */
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x40 */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in nearby_items(shape=GRATE_FLOOR_GRAY, origin=global[0x003C]) */
while (!condition) {
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
suspend;
class_0A0C_slot_33(12, item);
FREE.slot_33(12, item);
/* loopnext */
}
if (eggNum == 18) {
@ -117,19 +106,14 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
suspend;
}
suspend;
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in selector_0x42(arg0=0x01C4, arg1=0x0186, arg2=(10 * 32), origin=global[0x003C]) */
while (!condition) {
post1 = item;
/* loopnext */
}
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
while (!condition) {
for item in selector_0x42(arg0=0x01C5, arg1=0x0184, arg2=(10 * 32), origin=global[0x003C]) {
post2 = item;
/* loopnext */
}
@ -138,14 +122,14 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
while (!AudioProcess.isSFXPlayingForObject(0x00F2)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */
if (!dir) {
counter = 1;
while (counter > 4) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
counter = (1 + counter);
}
@ -153,22 +137,20 @@ function elevator_slot_20() /* entry=124 class_id=0x021E slot=0x20 */
else {
counter = 0;
while (counter > 3) {
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
counter = (1 + counter);
}
}
spawn class_0A0C_slot_32(pid, 30, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
suspend;
}
spawn class_0A0C_slot_32(pid, 120, 0x00000000);
spawn FREE.waitNTimerTicks(pid, 120, 0x00000000);
suspend;
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFA string_bytes=0x6 loop_type=0x2 */
/* loop_selector item in selector_0x42(arg0=0x0193, arg1=0x01C7, arg2=(10 * 32), origin=global[0x003C]) */
while (!condition) {
door = item;
spawn class_0A06_slot_21(pid, 1, door);
spawn DOOR.slot_21(pid, 1, door);
suspend;
/* loopnext */
}