Pseudocode decompialtion improvements and docs
This commit is contained in:
parent
f869a181a3
commit
589bfc31ef
1898 changed files with 60634 additions and 6597 deletions
|
|
@ -4,7 +4,7 @@ function free_slot_21() /* entry=382 class_id=0x0A0C slot=0x21 */
|
|||
/* global_address global_id=0x3C */
|
||||
/* global_address global_id=0x3C */
|
||||
while (!AudioProcess.isSFXPlayingForObject(arg_06)) {
|
||||
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -12,35 +12,35 @@ function free_slot_22() /* entry=382 class_id=0x0A0C slot=0x22 */
|
|||
|
||||
block_0267:
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 100, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 100, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 0x007F, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 0x007F, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 57, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 57, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 60, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 60, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x1770, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x1770, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 34, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 34, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x1770, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x1770, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 33, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 33, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x1770, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x1770, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 31, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 31, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x1770, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x1770, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 26, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 26, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x0BB8, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x0BB8, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_21(pid, 32, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 32, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 0x0708, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 0x0708, 0x00000000);
|
||||
suspend;
|
||||
if (!global[0x0006]) goto block_04C6;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ function free_slot_22() /* entry=382 class_id=0x0A0C slot=0x22 */
|
|||
block_04DA:
|
||||
/* global_address global_id=0x3C */
|
||||
/* pop_global global_id=0x6 size=0x1 */
|
||||
spawn class_0A0C_slot_32(0, pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(0, pid, 10, 0x00000000);
|
||||
suspend;
|
||||
/* str_to_ptr */
|
||||
/* global_address global_id=0x3C */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
function free_slot_23() /* entry=382 class_id=0x0A0C slot=0x23 */
|
||||
{
|
||||
set_info(1, global[0x003C]);
|
||||
class_0A0C_slot_33(0x0224, 0);
|
||||
FREE.slot_33(0x0224, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function free_slot_24() /* entry=382 class_id=0x0A0C slot=0x24 */
|
|||
|
||||
block_05DC:
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, arg_06, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, arg_06, 0x00000000);
|
||||
suspend;
|
||||
if (!global[0x0006]) goto block_0620;
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ function free_slot_24() /* entry=382 class_id=0x0A0C slot=0x24 */
|
|||
block_0640:
|
||||
/* pop_global global_id=0x6 size=0x1 */
|
||||
/* global_address global_id=0x3C */
|
||||
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
|
||||
suspend;
|
||||
/* str_to_ptr */
|
||||
/* global_address global_id=0x3C */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ function free_slot_25() /* entry=382 class_id=0x0A0C slot=0x25 */
|
|||
{
|
||||
set_info(0x0224, global[0x003C]);
|
||||
/* pop_global global_id=0x6 size=0x1 */
|
||||
class_0A0C_slot_33(0, 0x0224, 0);
|
||||
FREE.slot_33(0, 0x0224, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,19 +8,19 @@ function free_slot_26() /* entry=382 class_id=0x0A0C slot=0x26 */
|
|||
set_info(1, global[0x003C]);
|
||||
/* free_local_string bp_offset=0xFE target=[BP-02h] */
|
||||
localFlick = flick;
|
||||
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
|
||||
suspend;
|
||||
class_0A0C_slot_41();
|
||||
FREE.slot_41();
|
||||
/* global_address global_id=0x3C */
|
||||
while (!Actor.NPCGetField0x59Flag1_0AB()) {
|
||||
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
/* global_address global_id=0x3C */
|
||||
if (Actor.isDead()) {
|
||||
/* 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 */
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ function free_slot_27() /* entry=382 class_id=0x0A0C slot=0x27 */
|
|||
local_02 = (arg_06 - arg_0B);
|
||||
local_04 = (arg_08 - arg_0D);
|
||||
local_06 = (arg_0A - arg_0F);
|
||||
class_0A0C_slot_3F(local_02);
|
||||
FREE.slot_3F(local_02);
|
||||
local_02 = retval;
|
||||
class_0A0C_slot_3F(local_04);
|
||||
FREE.slot_3F(local_04);
|
||||
local_04 = retval;
|
||||
class_0A0C_slot_3F(local_06);
|
||||
FREE.slot_3F(local_06);
|
||||
local_06 = retval;
|
||||
if ((local_02 <= local_04) && (local_02 > local_06)) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ function free_slot_28() /* entry=382 class_id=0x0A0C slot=0x28 */
|
|||
x = (Item.getX(item1) - Item.getX(item2));
|
||||
y = (Item.getY(item1) - Item.getY(item2));
|
||||
z = (Item.getZ(item1) - Item.getZ(item2));
|
||||
class_0A0C_slot_3F(x);
|
||||
FREE.slot_3F(x);
|
||||
x = retval;
|
||||
class_0A0C_slot_3F(y);
|
||||
FREE.slot_3F(y);
|
||||
y = retval;
|
||||
class_0A0C_slot_3F(z);
|
||||
FREE.slot_3F(z);
|
||||
z = retval;
|
||||
if ((x <= y) && (x > z)) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function free_slot_29() /* entry=382 class_id=0x0A0C slot=0x29 */
|
|||
ref2, /* [BP+08h] type=0x69 */
|
||||
dist; /* [BP-02h] type=0x69 */
|
||||
|
||||
class_0A0C_slot_28(ref2, ref1);
|
||||
FREE.slot_28(ref2, ref1);
|
||||
dist = retval;
|
||||
dist = (dist / 32);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -11,14 +11,10 @@ function free_slot_2A() /* entry=382 class_id=0x0A0C slot=0x2A */
|
|||
|
||||
closest = 0x7D00;
|
||||
closestItem = 0;
|
||||
/* loopscr value_u8=0x24 */
|
||||
/* loopscr value_u8=0x3D */
|
||||
/* loopscr value_u8=0x40 */
|
||||
/* loopscr value_u8=0x25 */
|
||||
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
|
||||
/* loop_selector item in nearby_items(shape=t, origin=global[0x003C]) */
|
||||
while (!condition) {
|
||||
if (Item.getFrame(item) == f) {
|
||||
class_0A0C_slot_28(item, global[0x003C]);
|
||||
FREE.slot_28(item, global[0x003C]);
|
||||
dist = retval;
|
||||
if (dist >= closest) {
|
||||
closest = dist;
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
|
|||
if (counter <= 2) goto block_182E;
|
||||
|
||||
block_17FB:
|
||||
spawn class_0A0C_slot_21(pid, alarm, 0x00000000);
|
||||
spawn FREE.slot_21(pid, alarm, 0x00000000);
|
||||
suspend;
|
||||
counter = (1 + counter);
|
||||
goto block_17F3;
|
||||
|
||||
block_182E:
|
||||
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
|
||||
suspend;
|
||||
if (UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange(10, 0) != 0), 10, 0) != 1), 10, 0) != 2), 10, 0) != 3), 10, 0) != 4) goto block_18AF;
|
||||
|
||||
|
|
@ -92,30 +92,18 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
|
|||
goto block_1906;
|
||||
|
||||
block_18AF:
|
||||
spawn class_0A0C_slot_21(pid, 123, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 123, 0x00000000);
|
||||
suspend;
|
||||
spawn class_0A0C_slot_32(pid, 10, 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
|
||||
suspend;
|
||||
|
||||
block_1906:
|
||||
/* 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 */
|
||||
|
||||
block_1922:
|
||||
if condition goto block_1958;
|
||||
|
||||
block_1925:
|
||||
if Item.inFastArea(item) goto block_1954;
|
||||
|
||||
block_1934:
|
||||
suspend;
|
||||
|
||||
block_1954:
|
||||
/* loopnext */
|
||||
goto block_1922;
|
||||
for item in nearby_items(shape=0x0561, origin=ref) {
|
||||
if (!Item.inFastArea(item)) {
|
||||
suspend;
|
||||
}
|
||||
/* loopnext */
|
||||
}
|
||||
|
||||
block_1958:
|
||||
|
||||
|
|
@ -128,7 +116,7 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
|
|||
|
||||
block_197C:
|
||||
ref = 1;
|
||||
spawn class_0A0C_slot_32(pid, (0x04B0 * (5 - Game.getDifficultyLevel())), 0x00000000);
|
||||
spawn FREE.waitNTimerTicks(pid, (0x04B0 * (5 - Game.getDifficultyLevel())), 0x00000000);
|
||||
suspend;
|
||||
counter = 0;
|
||||
|
||||
|
|
@ -136,7 +124,7 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
|
|||
if (counter <= 2) goto block_19F5;
|
||||
|
||||
block_19C2:
|
||||
spawn class_0A0C_slot_21(pid, alarm, 0x00000000);
|
||||
spawn FREE.slot_21(pid, alarm, 0x00000000);
|
||||
suspend;
|
||||
counter = (1 + counter);
|
||||
goto block_19BA;
|
||||
|
|
@ -150,24 +138,12 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
|
|||
block_1A1B:
|
||||
|
||||
block_1A27:
|
||||
/* 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 */
|
||||
|
||||
block_1A43:
|
||||
if condition goto block_1A79;
|
||||
|
||||
block_1A46:
|
||||
if Item.inFastArea(item) goto block_1A75;
|
||||
|
||||
block_1A55:
|
||||
suspend;
|
||||
|
||||
block_1A75:
|
||||
/* loopnext */
|
||||
goto block_1A43;
|
||||
for item in nearby_items(shape=0x0561, origin=ref) {
|
||||
if (!Item.inFastArea(item)) {
|
||||
suspend;
|
||||
}
|
||||
/* loopnext */
|
||||
}
|
||||
|
||||
block_1A79:
|
||||
goto block_195A;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function free_slot_3C() /* entry=382 class_id=0x0A0C slot=0x3C */
|
|||
rndVoice; /* [BP-06h] type=0x69 */
|
||||
|
||||
set_info(1, 0);
|
||||
class_0A0C_slot_33(0x022B, 0);
|
||||
FREE.slot_33(0x022B, 0);
|
||||
ref = 1;
|
||||
if (Ultima8Engine.getAvatarInStasis() == 1) {
|
||||
return;
|
||||
|
|
@ -14,39 +14,39 @@ function free_slot_3C() /* entry=382 class_id=0x0A0C slot=0x3C */
|
|||
else {
|
||||
rndVoice = UCMachine.rndRange(100, 0);
|
||||
if (rndVoice >= 30) {
|
||||
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 15, 0x00000000);
|
||||
suspend;
|
||||
rndVoice = UCMachine.rndRange(100, 0);
|
||||
if (rndVoice >= 50) {
|
||||
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 14, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (rndVoice <= 60) {
|
||||
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 14, 0x00000000);
|
||||
suspend;
|
||||
rndVoice = UCMachine.rndRange(100, 0);
|
||||
if (rndVoice >= 30) {
|
||||
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 15, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
if (rndVoice <= 60) {
|
||||
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 0x00B6, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
spawn class_0A0C_slot_21(pid, 0x00D2, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 0x00D2, 0x00000000);
|
||||
suspend;
|
||||
rndVoice = UCMachine.rndRange(100, 0);
|
||||
if (rndVoice >= 30) {
|
||||
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 14, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
if (rndVoice <= 60) {
|
||||
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
|
||||
spawn FREE.slot_21(pid, 0x00B6, 0x00000000);
|
||||
suspend;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ function free_slot_41() /* entry=382 class_id=0x0A0C slot=0x41 */
|
|||
item; /* [BP-02h] type=0x24 */
|
||||
|
||||
set_info(1, 0);
|
||||
/* loopscr value_u8=0x24 */
|
||||
/* loopscr value_u8=0x42 */
|
||||
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
|
||||
/* loop_selector item in selector_0x42(arg0=0x0560, arg1=0x0584, arg2=(50 * 32), origin=global[0x003C]) */
|
||||
while (!condition) {
|
||||
/* loopnext */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue