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

@ -19,66 +19,46 @@ function wshockew_gotHit() /* entry=245 class_id=0x044E slot=0x06 */
e, /* [BP-1Ah] type=0x69 */
shockCount; /* [BP-1Ch] type=0x69 */
entry:
set_info(0x020C, *(arg_06));
process_exclude();
item = ref;
if Item.isNpc(item) goto block_036A;
block_01B2:
set_info(0x020C, *(arg_06));
process_exclude();
item = ref;
if (!Actor.isNPC(item)) {
n = item;
block_01B9:
if (Item.overlaps(ref, arg_06) != 1) goto block_0344;
block_01CD:
x = Intrinsic0013(arg_06);
y = Item.getNpcNum(arg_06);
y1 = Item.legal_create(arg_06);
z = Item.AvatarStoleSomehting(item);
z1 = Item.getZ(item);
a = (y1 - y);
a = (a * 2);
b = (z - z1);
b = ((b / 2) * 3);
class_0A0C_slot_20(2);
c = (retval + 1);
block_0250:
if (c != 0) goto block_031B;
block_025B:
class_0A0C_slot_20(a);
d = retval;
d = (y1 - d);
y = d;
class_0A0C_slot_20(b);
e = retval;
e = (e + z1);
z = e;
if Item.getQLo(0, 0x045A, shocker) goto block_02E0;
block_02AF:
c = 1;
shockCount = (1 + shockCount);
block_02E0:
class_0A0C_slot_20(pid, 30);
spawn class_0A0C_slot_32(retval, 0x00000000);
suspend;
c = (c - 1);
goto block_0250;
block_031B:
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
suspend;
goto block_01B9;
block_0344:
while (Item.overlaps(ref, arg_06) == 1) {
x = Item.getX(arg_06);
y = Item.getCY(arg_06);
y1 = Item.getY(arg_06);
z = Item.getCZ(item);
z1 = Item.getZ(item);
a = (y1 - y);
a = (a * 2);
b = (z - z1);
b = ((b / 2) * 3);
class_0A0C_slot_20(2);
c = (retval + 1);
while (c == 0) {
class_0A0C_slot_20(a);
d = retval;
d = (y1 - d);
y = d;
class_0A0C_slot_20(b);
e = retval;
e = (e + z1);
z = e;
if (!Item.create(0, 0x045A, shocker)) {
c = 1;
shockCount = (1 + shockCount);
}
class_0A0C_slot_20(pid, 30);
spawn class_0A0C_slot_32(retval, 0x00000000);
suspend;
c = (c - 1);
}
spawn class_0A0C_slot_32(pid, 60, 0x00000000);
suspend;
}
spawn class_0A0C_slot_32(pid, 2, 0x00000000);
suspend;
block_036A:
return;
}
return;
}

View file

@ -5,35 +5,21 @@ function wshockew_unequip() /* entry=245 class_id=0x044E slot=0x0B */
var, /* [BP+0Ah] type=0x69 */
item; /* [BP-02h] type=0x24 */
entry:
set_info(0x0212, *(arg_06));
process_exclude();
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x3A */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
block_0115:
if condition goto block_015F;
block_0118:
if Item.isNpc(item) goto block_015B;
block_0127:
if (Item.overlaps(item, arg_06) != 1) goto block_015B;
block_0141:
spawn class_044E_gotHit(0, item, arg_06);
goto block_0161;
block_015B:
set_info(0x0212, *(arg_06));
process_exclude();
/* loopscr value_u8=0x24 */
/* loopscr value_u8=0x3D */
/* loopscr value_u8=0x3A */
/* loopscr value_u8=0x25 */
/* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
while (!condition) {
if (!Actor.isNPC(item)) {
if (Item.overlaps(item, arg_06) == 1) {
spawn class_044E_gotHit(0, item, arg_06);
return;
}
}
/* loopnext */
goto block_0115;
block_015F:
block_0161:
return;
}
return;
}

View file

@ -1,8 +1,6 @@
function wshockew_avatarStoleSomething() /* entry=245 class_id=0x044E slot=0x13 */
{
entry:
set_info(0x022E, *(arg_06));
process_exclude();
return;
set_info(0x022E, *(arg_06));
process_exclude();
return;
}