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,9 +1,4 @@
function free_slot_20() /* entry=382 class_id=0x0A0C slot=0x20 */
{
entry:
goto block_01C0;
block_01C0:
return;
return;
}

View file

@ -1,19 +1,11 @@
function free_slot_21() /* entry=382 class_id=0x0A0C slot=0x21 */
{
entry:
set_info(1, 0);
/* global_address global_id=0x3C */
block_01F0:
/* global_address global_id=0x3C */
if Item.touch(arg_06) goto block_022B;
block_0202:
set_info(1, 0);
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
while (!AudioProcess.isSFXPlayingForObject(arg_06)) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_01F0;
block_022B:
return;
}
return;
}

View file

@ -49,7 +49,7 @@ function free_slot_22() /* entry=382 class_id=0x0A0C slot=0x22 */
block_04C6:
/* global_address global_id=0x3C */
if (!Kernel.resetRef()) goto block_0576;
if (!Actor.isDead()) goto block_0576;
block_04DA:
/* global_address global_id=0x3C */

View file

@ -1,8 +1,6 @@
function free_slot_23() /* entry=382 class_id=0x0A0C slot=0x23 */
{
entry:
set_info(1, global[0x003C]);
class_0A0C_slot_33(0x0224, 0);
return;
set_info(1, global[0x003C]);
class_0A0C_slot_33(0x0224, 0);
return;
}

View file

@ -1,9 +1,7 @@
function free_slot_25() /* entry=382 class_id=0x0A0C slot=0x25 */
{
entry:
set_info(0x0224, global[0x003C]);
/* pop_global global_id=0x6 size=0x1 */
class_0A0C_slot_33(0, 0x0224, 0);
return;
set_info(0x0224, global[0x003C]);
/* pop_global global_id=0x6 size=0x1 */
class_0A0C_slot_33(0, 0x0224, 0);
return;
}

View file

@ -4,45 +4,30 @@ function free_slot_26() /* entry=382 class_id=0x0A0C slot=0x26 */
flick, /* [BP+06h] type=0x73 */
localFlick; /* [BP-02h] type=0x73 */
entry:
/* param_pid_chg bp_offset=0x6 target=[BP+06h] copy_type=0x1 */
set_info(1, global[0x003C]);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
localFlick = flick;
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
suspend;
class_0A0C_slot_41();
block_078D:
/* global_address global_id=0x3C */
if Npc.isDead() goto block_07C6;
block_079D:
/* param_pid_chg bp_offset=0x6 target=[BP+06h] copy_type=0x1 */
set_info(1, global[0x003C]);
/* free_local_string bp_offset=0xFE target=[BP-02h] */
localFlick = flick;
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
suspend;
class_0A0C_slot_41();
/* global_address global_id=0x3C */
while (!Actor.NPCGetField0x59Flag1_0AB()) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_078D;
block_07C6:
}
/* global_address global_id=0x3C */
if (Actor.isDead()) {
/* global_address global_id=0x3C */
if (!Kernel.resetRef()) goto block_085A;
block_07DA:
/* global_address global_id=0x3C */
if Intrinsic0033() goto block_0810;
block_07EA:
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
goto block_07DA;
block_0810:
while (!Actor.isBusy()) {
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
}
/* global_address global_id=0x3C */
suspend;
/* global_address global_id=0x3C */
suspend;
block_085A:
/* free_local_string bp_offset=0xFE target=[BP-02h] */
return;
}
/* free_local_string bp_offset=0xFE target=[BP-02h] */
return;
}

View file

@ -1,36 +1,25 @@
function free_slot_27() /* entry=382 class_id=0x0A0C slot=0x27 */
{
entry:
local_02 = (arg_06 - arg_0B);
local_04 = (arg_08 - arg_0D);
local_06 = (arg_0A - arg_0F);
class_0A0C_slot_3F(local_02);
local_02 = retval;
class_0A0C_slot_3F(local_04);
local_04 = retval;
class_0A0C_slot_3F(local_06);
local_06 = retval;
if ((local_02 > local_04) && (local_02 > local_06)) goto block_08FC;
block_08F3:
goto block_093F;
block_08FC:
if ((local_04 > local_02) && (local_04 > local_06)) goto block_0919;
block_0910:
goto block_093F;
block_0919:
if ((local_06 > local_02) && (local_06 > local_04)) goto block_0936;
block_092D:
goto block_093F;
block_0936:
goto block_093F;
block_093F:
local_02 = (arg_06 - arg_0B);
local_04 = (arg_08 - arg_0D);
local_06 = (arg_0A - arg_0F);
class_0A0C_slot_3F(local_02);
local_02 = retval;
class_0A0C_slot_3F(local_04);
local_04 = retval;
class_0A0C_slot_3F(local_06);
local_06 = retval;
if ((local_02 <= local_04) && (local_02 > local_06)) {
return;
}
else if ((local_04 <= local_02) && (local_04 > local_06)) {
return;
}
else if ((local_06 <= local_02) && (local_06 > local_04)) {
return;
}
else {
return;
}
return;
}

View file

@ -12,33 +12,25 @@ function free_slot_28() /* entry=382 class_id=0x0A0C slot=0x28 */
y, /* [BP-0Eh] type=0x69 */
z; /* [BP-10h] type=0x69 */
entry:
item1 = r1;
item2 = r2;
/* global_address global_id=0x3C */
avatarMap = Item.getType();
if Item.isNpc(item1) goto block_09C7;
block_099F:
item1 = r1;
item2 = r2;
/* global_address global_id=0x3C */
avatarMap = Actor.getMap();
if (!Actor.isNPC(item1)) {
npc1 = item1;
if (Item.getType(npc1) != avatarMap) goto block_09C7;
block_09BE:
goto block_0AD3;
block_09C7:
if Item.isNpc(item2) goto block_09FE;
block_09D6:
if (Actor.getMap(npc1) == avatarMap) {
return;
}
}
else if (!Actor.isNPC(item2)) {
npc2 = item2;
if (Item.getType(npc2) != avatarMap) goto block_09FE;
block_09F5:
goto block_0AD3;
block_09FE:
x = (Intrinsic0013(item1) - Intrinsic0013(item2));
y = (Item.legal_create(item1) - Item.legal_create(item2));
if (Actor.getMap(npc2) == avatarMap) {
return;
}
}
else {
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);
x = retval;
@ -46,27 +38,18 @@ function free_slot_28() /* entry=382 class_id=0x0A0C slot=0x28 */
y = retval;
class_0A0C_slot_3F(z);
z = retval;
if ((x > y) && (x > z)) goto block_0A90;
block_0A87:
goto block_0AD3;
block_0A90:
if ((y > x) && (y > z)) goto block_0AAD;
block_0AA4:
goto block_0AD3;
block_0AAD:
if ((z > x) && (z > y)) goto block_0ACA;
block_0AC1:
goto block_0AD3;
block_0ACA:
goto block_0AD3;
block_0AD3:
return;
if ((x <= y) && (x > z)) {
return;
}
else if ((y <= x) && (y > z)) {
return;
}
else if ((z <= x) && (z > y)) {
return;
}
else {
return;
}
}
return;
}

View file

@ -5,13 +5,8 @@ function free_slot_29() /* entry=382 class_id=0x0A0C slot=0x29 */
ref2, /* [BP+08h] type=0x69 */
dist; /* [BP-02h] type=0x69 */
entry:
class_0A0C_slot_28(ref2, ref1);
dist = retval;
dist = (dist / 32);
goto block_0B5F;
block_0B5F:
return;
class_0A0C_slot_28(ref2, ref1);
dist = retval;
dist = (dist / 32);
return;
}

View file

@ -9,38 +9,23 @@ function free_slot_2A() /* entry=382 class_id=0x0A0C slot=0x2A */
closest, /* [BP-06h] type=0x69 */
dist; /* [BP-08h] type=0x69 */
entry:
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 */
block_0BBA:
if condition goto block_0C0B;
block_0BBD:
if (Item.getFrame(item) != f) goto block_0C07;
block_0BD5:
class_0A0C_slot_28(item, global[0x003C]);
dist = retval;
if (dist < closest) goto block_0C07;
block_0BF9:
closest = dist;
closestItem = item;
block_0C07:
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 */
while (!condition) {
if (Item.getFrame(item) == f) {
class_0A0C_slot_28(item, global[0x003C]);
dist = retval;
if (dist >= closest) {
closest = dist;
closestItem = item;
}
}
/* loopnext */
goto block_0BBA;
block_0C0B:
goto block_0C16;
block_0C16:
return;
}
return;
}

View file

@ -1,15 +1,10 @@
function free_slot_2B() /* entry=382 class_id=0x0A0C slot=0x2B */
{
entry:
if (arg_06 != 0x4000) goto block_0C8A;
block_0C7D:
goto block_0C93;
block_0C8A:
goto block_0C93;
block_0C93:
if (arg_06 == 0x4000) {
return;
}
else {
return;
}
return;
}

View file

@ -1,17 +1,12 @@
function free_slot_2C() /* entry=382 class_id=0x0A0C slot=0x2C */
{
entry:
if (arg_06 != 0x4000) goto block_0CD9;
block_0CC6:
if (arg_06 == 0x4000) {
/* rsh */
arg_08 = 8;
goto block_0CE2;
block_0CD9:
goto block_0CE2;
block_0CE2:
return;
}
else {
return;
}
return;
}

View file

@ -10,29 +10,18 @@ function free_slot_2D() /* entry=382 class_id=0x0A0C slot=0x2D */
ref, /* [BP-02h] type=0x24 */
item; /* [BP-04h] type=0x24 */
entry:
ref = r;
if (Item.hurl(t) != Intrinsic003C(ref)) goto block_0DBC;
block_0D29:
if Intrinsic0019(z, y, x, f, t, item) goto block_0DA5;
block_0D58:
goto block_0DC5;
block_0DA2:
goto block_0DB9;
block_0DA5:
goto block_0DC5;
block_0DB9:
goto block_0DC5;
block_0DBC:
goto block_0DC5;
block_0DC5:
ref = r;
if (Item.getFamilyOfType(t) == Item.getItemFamily(ref)) {
if (!Item.legalCreateAtCoords(z, y, x, f, t, item)) {
return;
}
else {
return;
}
return;
}
else {
return;
}
return;
}

View file

@ -8,22 +8,16 @@ function free_slot_2E() /* entry=382 class_id=0x0A0C slot=0x2E */
b, /* [BP-08h] type=0x69 */
c; /* [BP-0Ah] type=0x69 */
entry:
set_info(1, 0);
phold = ref;
if (Intrinsic0016(phold) != 0x0476) goto block_0EF2;
block_0E30:
a = Intrinsic00AD(phold);
set_info(1, 0);
phold = ref;
if (Item.getShape(phold) == 0x0476) {
a = Item.getNPCNum(phold);
c = (a & 15);
b = Item.getMapNum(phold);
b = Item.getMapArray(phold);
b = (((a & 0x00E0) * 8) + b);
if (b != 0) goto block_0EF2;
block_0E72:
goto block_0EF2;
block_0EF2:
return;
if (b == 0) {
return;
}
}
return;
}

View file

@ -9,22 +9,16 @@ function free_slot_2F() /* entry=382 class_id=0x0A0C slot=0x2F */
b, /* [BP-08h] type=0x69 */
c; /* [BP-0Ah] type=0x69 */
entry:
set_info(1, 0);
phold = ref;
if (Intrinsic0016(phold) != 0x0476) goto block_1020;
block_0F55:
a = Intrinsic00AD(phold);
set_info(1, 0);
phold = ref;
if (Item.getShape(phold) == 0x0476) {
a = Item.getNPCNum(phold);
c = (a & 15);
b = Item.getMapNum(phold);
b = Item.getMapArray(phold);
b = (((a & 0x00E0) * 8) + b);
if ((b != 0) && (b != addType)) goto block_1020;
block_0FA0:
goto block_1020;
block_1020:
return;
if ((b == 0) && (b != addType)) {
return;
}
}
return;
}

View file

@ -8,18 +8,12 @@ function free_slot_30() /* entry=382 class_id=0x0A0C slot=0x30 */
phold, /* [BP-02h] type=0x24 */
item; /* [BP-04h] type=0x24 */
entry:
set_info(1, 0);
phold = ref;
if (Intrinsic0016(phold) != 0x0476) goto block_111A;
block_108F:
if (addType != 0) goto block_111A;
block_109A:
goto block_111A;
block_111A:
return;
set_info(1, 0);
phold = ref;
if (Item.getShape(phold) == 0x0476) {
if (addType == 0) {
return;
}
}
return;
}

View file

@ -8,14 +8,11 @@ function free_slot_31() /* entry=382 class_id=0x0A0C slot=0x31 */
b, /* [BP-08h] type=0x69 */
c; /* [BP-0Ah] type=0x69 */
entry:
set_info(1, 0);
item = ref;
if item goto block_12B3;
block_117D:
set_info(1, 0);
item = ref;
if (!item) {
c = Item.getFrame(item);
b = Intrinsic0016(item);
b = Item.getShape(item);
a = (b & 0x00FF);
b = (b & 0x0700);
b = (b / 8);
@ -24,9 +21,7 @@ function free_slot_31() /* entry=382 class_id=0x0A0C slot=0x31 */
/* bit_not */
/* word_to_dword */
/* pop_result */
goto block_12B3;
block_12B3:
return;
}
return;
}

View file

@ -7,8 +7,8 @@ function free_slot_32() /* entry=382 class_id=0x0A0C slot=0x32 */
entry:
set_info(9, 0);
newTick = Item.andStatus();
oldTick = Item.andStatus();
newTick = getCurrentTimerTick();
oldTick = getCurrentTimerTick();
if (time < 1) goto block_1324;
block_131E:
@ -16,7 +16,7 @@ function free_slot_32() /* entry=382 class_id=0x0A0C slot=0x32 */
block_1324:
suspend;
newTick = Item.andStatus();
newTick = getCurrentTimerTick();
/* ne_dword */
if oldTick goto block_1371;

View file

@ -1,6 +1,4 @@
function free_slot_33() /* entry=382 class_id=0x0A0C slot=0x33 */
{
entry:
return;
return;
}

View file

@ -1,22 +1,14 @@
function free_slot_34() /* entry=382 class_id=0x0A0C slot=0x34 */
{
entry:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Item.legal_create((Item.legal_create((Intrinsic0013((Intrinsic0013() >= (arg_06 - 0x0200))) <= (arg_06 + 0x0200))) >= (arg_08 - 0x0200))) <= (arg_08 + 0x0200)) goto block_1439;
block_142D:
goto block_1442;
block_1436:
goto block_1442;
block_1439:
goto block_1442;
block_1442:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Item.getY((Item.getY((Item.getX((Item.getX() >= (arg_06 - 0x0200))) > (arg_06 + 0x0200))) >= (arg_08 - 0x0200))) <= (arg_08 + 0x0200)) {
return;
}
else {
return;
}
return;
}

View file

@ -5,19 +5,14 @@ function free_slot_36() /* entry=382 class_id=0x0A0C slot=0x36 */
line, /* [BP+08h] type=0x73 */
temp; /* [BP-02h] type=0x7A */
entry:
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
temp = list;
/* create_list element_size=0x2 count=0x1 */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
list = line;
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
list = temp;
goto block_14ED;
block_14ED:
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
return;
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
temp = list;
/* create_list element_size=0x2 count=0x1 */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
list = line;
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
list = temp;
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
return;
}

View file

@ -1,17 +1,12 @@
function free_slot_37() /* entry=382 class_id=0x0A0C slot=0x37 */
{
entry:
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
local_02 = arg_06;
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = local_02;
goto block_1545;
block_1545:
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
return;
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
local_02 = arg_06;
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = local_02;
/* free_local_slist bp_offset=0xFE target=[BP-02h] */
return;
}

View file

@ -1,17 +1,12 @@
function free_slot_38() /* entry=382 class_id=0x0A0C slot=0x38 */
{
entry:
/* create_list element_size=0x2 count=0x1 */
/* remove_matching_indirect element_size=0x2 */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
/* create_list element_size=0x2 count=0x1 */
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
goto block_159F;
block_159F:
return;
/* create_list element_size=0x2 count=0x1 */
/* remove_matching_indirect element_size=0x2 */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
/* create_list element_size=0x2 count=0x1 */
/* append_list */
/* free_local_slist bp_offset=0x6 target=[BP+06h] */
arg_06 = arg_08;
return;
}

View file

@ -8,42 +8,171 @@ function free_slot_3B() /* entry=382 class_id=0x0A0C slot=0x3B */
ref, /* [BP-0Ah] type=0x69 */
notAlarmed; /* [BP-0Bh] type=0x62 */
set_info(0x022B, 0);
ref = 1;
if (Intrinsic0000()) {
entry:
set_info(0x022B, 0);
ref = 1;
if World.getAlertActive() goto block_16B0;
block_16AA:
goto block_1A7E;
block_16B0:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Actor.getMap((Actor.getMap((Actor.getMap((Actor.getMap((Actor.getMap((Actor.getMap() != 1)) != 5)) != 9)) != 13)) != 23)) != 27) goto block_1717;
block_170D:
alarm = 22;
goto block_17EC;
block_1717:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Actor.getMap((Actor.getMap((Actor.getMap() != 3)) != 15)) != 25) goto block_174E;
block_1743:
alarm = 0x0096;
goto block_17EC;
block_174E:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Actor.getMap((Actor.getMap((Actor.getMap((Actor.getMap() != 7)) != 11)) != 17)) != 24) goto block_1793;
block_1788:
alarm = 0x00A0;
goto block_17EC;
block_1793:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Actor.getMap((Actor.getMap((Actor.getMap() != 10)) != 19)) != 21) goto block_17CA;
block_17BF:
alarm = 0x0096;
goto block_17EC;
block_17CA:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
if (Item.getType((Item.getType((Item.getType((Item.getType((Item.getType((Item.getType() != 1)) != 5)) != 9)) != 13)) != 23)) == 27) {
alarm = 22;
}
else if (Item.getType((Item.getType((Item.getType() != 3)) != 15)) == 25) {
alarm = 0x0096;
}
else if (Item.getType((Item.getType((Item.getType((Item.getType() != 7)) != 11)) != 17)) == 24) {
alarm = 0x00A0;
}
else if (Item.getType((Item.getType((Item.getType() != 10)) != 19)) == 21) {
alarm = 0x0096;
}
else if (Item.getType() == 29) {
alarm = 0x00C4;
}
if (Actor.getMap() != 29) goto block_17E5;
block_17DA:
alarm = 0x00C4;
goto block_17EC;
block_17E5:
alarm = 22;
block_17EC:
counter = 0;
}
return;
block_17F3:
if (counter <= 2) goto block_182E;
block_17FB:
spawn class_0A0C_slot_21(pid, alarm, 0x00000000);
suspend;
counter = (1 + counter);
goto block_17F3;
block_182E:
spawn class_0A0C_slot_32(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;
block_18A1:
goto block_1906;
block_18AF:
spawn class_0A0C_slot_21(pid, 123, 0x00000000);
suspend;
spawn class_0A0C_slot_32(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;
block_1958:
block_195A:
suspend;
if (!World.getAlertActive()) goto block_197C;
block_1976:
goto block_1A7E;
block_197C:
ref = 1;
spawn class_0A0C_slot_32(pid, (0x04B0 * (5 - Game.getDifficultyLevel())), 0x00000000);
suspend;
counter = 0;
block_19BA:
if (counter <= 2) goto block_19F5;
block_19C2:
spawn class_0A0C_slot_21(pid, alarm, 0x00000000);
suspend;
counter = (1 + counter);
goto block_19BA;
block_19F5:
if (UCMachine.rndRange(100, 0) > 50) goto block_1A1B;
block_1A0C:
goto block_1A27;
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;
block_1A79:
goto block_195A;
block_1A7E:
return;
}

View file

@ -5,75 +5,51 @@ function free_slot_3C() /* entry=382 class_id=0x0A0C slot=0x3C */
ref, /* [BP-04h] type=0x69 */
rndVoice; /* [BP-06h] type=0x69 */
entry:
set_info(1, 0);
class_0A0C_slot_33(0x022B, 0);
ref = 1;
if (Item.getNpcNum() != 1) goto block_1B14;
block_1B07:
goto block_1D0A;
block_1B14:
rndVoice = Intrinsic00DA(100, 0);
if (rndVoice < 30) goto block_1BA9;
block_1B32:
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
suspend;
rndVoice = Intrinsic00DA(100, 0);
if (rndVoice < 50) goto block_1B9C;
block_1B76:
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
block_1B9C:
goto block_1D0A;
block_1BA9:
if (rndVoice > 60) goto block_1C63;
block_1BB7:
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
rndVoice = Intrinsic00DA(100, 0);
if (rndVoice < 30) goto block_1C21;
block_1BFB:
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
suspend;
block_1C21:
if (rndVoice > 60) goto block_1C56;
block_1C2F:
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
suspend;
block_1C56:
goto block_1D0A;
block_1C63:
spawn class_0A0C_slot_21(pid, 0x00D2, 0x00000000);
suspend;
rndVoice = Intrinsic00DA(100, 0);
if (rndVoice < 30) goto block_1CCE;
block_1CA8:
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
block_1CCE:
if (rndVoice > 60) goto block_1D03;
block_1CDC:
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
suspend;
block_1D03:
block_1D0A:
set_info(1, 0);
class_0A0C_slot_33(0x022B, 0);
ref = 1;
if (Ultima8Engine.getAvatarInStasis() == 1) {
return;
}
else {
rndVoice = UCMachine.rndRange(100, 0);
if (rndVoice >= 30) {
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
suspend;
rndVoice = UCMachine.rndRange(100, 0);
if (rndVoice >= 50) {
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
}
return;
}
else if (rndVoice <= 60) {
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
rndVoice = UCMachine.rndRange(100, 0);
if (rndVoice >= 30) {
spawn class_0A0C_slot_21(pid, 15, 0x00000000);
suspend;
}
if (rndVoice <= 60) {
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
suspend;
}
return;
}
else {
spawn class_0A0C_slot_21(pid, 0x00D2, 0x00000000);
suspend;
rndVoice = UCMachine.rndRange(100, 0);
if (rndVoice >= 30) {
spawn class_0A0C_slot_21(pid, 14, 0x00000000);
suspend;
}
if (rndVoice <= 60) {
spawn class_0A0C_slot_21(pid, 0x00B6, 0x00000000);
suspend;
}
}
}
return;
}

View file

@ -1,8 +1,6 @@
function free_slot_3D() /* entry=382 class_id=0x0A0C slot=0x3D */
{
entry:
set_info(1, 0);
/* global_address global_id=0x3C */
return;
set_info(1, 0);
/* global_address global_id=0x3C */
return;
}

View file

@ -1,11 +1,9 @@
function free_slot_3E() /* entry=382 class_id=0x0A0C slot=0x3E */
{
entry:
set_info(1, 0);
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
return;
set_info(1, 0);
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
return;
}

View file

@ -1,15 +1,10 @@
function free_slot_3F() /* entry=382 class_id=0x0A0C slot=0x3F */
{
entry:
if (arg_06 > 0) goto block_1DE3;
block_1DDA:
goto block_1DEF;
block_1DE3:
goto block_1DEF;
block_1DEF:
if (arg_06 <= 0) {
return;
}
else {
return;
}
return;
}

View file

@ -5,29 +5,15 @@ function free_slot_40() /* entry=382 class_id=0x0A0C slot=0x40 */
item, /* [BP-02h] type=0x24 */
leftOvers; /* [BP-03h] type=0x62 */
entry:
/* loopscr value_u8=0x24 */
/* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */
block_1E17:
if condition goto block_1E76;
block_1E1A:
if (!Item.getCY(1, item)) goto block_1E72;
block_1E2F:
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
block_1E72:
/* loopscr value_u8=0x24 */
/* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */
while (!condition) {
if (MainActor.addItemCru(1, item)) {
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
}
/* loopnext */
goto block_1E17;
block_1E76:
goto block_1E81;
block_1E81:
return;
}
return;
}

View file

@ -3,20 +3,12 @@ function free_slot_41() /* entry=382 class_id=0x0A0C slot=0x41 */
var
item; /* [BP-02h] type=0x24 */
entry:
set_info(1, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
block_1EDF:
if condition goto block_1EF1;
block_1EE2:
set_info(1, 0);
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x42 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
while (!condition) {
/* loopnext */
goto block_1EDF;
block_1EF1:
return;
}
return;
}