mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-08-03 16:42:16 -04:00
Decompile chrGetDistanceToEntity
This commit is contained in:
+16
-34
@@ -753,40 +753,22 @@ glabel func0f02e2d0
|
||||
/* f02e36c: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f02e370
|
||||
/* f02e370: 27bdffe8 */ addiu $sp,$sp,-24
|
||||
/* f02e374: 30ae0200 */ andi $t6,$a1,0x200
|
||||
/* f02e378: 11c00005 */ beqz $t6,.L0f02e390
|
||||
/* f02e37c: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* f02e380: 0fc12472 */ jal chrGetDistanceToTarget
|
||||
/* f02e384: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f02e388: 10000011 */ beqz $zero,.L0f02e3d0
|
||||
/* f02e38c: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
.L0f02e390:
|
||||
/* f02e390: 30af0004 */ andi $t7,$a1,0x4
|
||||
/* f02e394: 11e00005 */ beqz $t7,.L0f02e3ac
|
||||
/* f02e398: 30b80008 */ andi $t8,$a1,0x8
|
||||
/* f02e39c: 0fc1272c */ jal chrGetDistanceToChr
|
||||
/* f02e3a0: 00c02825 */ or $a1,$a2,$zero
|
||||
/* f02e3a4: 1000000a */ beqz $zero,.L0f02e3d0
|
||||
/* f02e3a8: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
.L0f02e3ac:
|
||||
/* f02e3ac: 53000006 */ beqzl $t8,.L0f02e3c8
|
||||
/* f02e3b0: 44800000 */ mtc1 $zero,$f0
|
||||
/* f02e3b4: 0fc124bb */ jal chrGetDistanceToPad
|
||||
/* f02e3b8: 00c02825 */ or $a1,$a2,$zero
|
||||
/* f02e3bc: 10000004 */ beqz $zero,.L0f02e3d0
|
||||
/* f02e3c0: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f02e3c4: 44800000 */ mtc1 $zero,$f0
|
||||
.L0f02e3c8:
|
||||
/* f02e3c8: 00000000 */ sll $zero,$zero,0x0
|
||||
/* f02e3cc: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
.L0f02e3d0:
|
||||
/* f02e3d0: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
/* f02e3d4: 03e00008 */ jr $ra
|
||||
/* f02e3d8: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
f32 chrGetDistanceToEntity(struct chrdata *chr, u32 entitytype, s32 entityid)
|
||||
{
|
||||
if (entitytype & ENTITYTYPE_TARGET) {
|
||||
return chrGetDistanceToTarget(chr);
|
||||
}
|
||||
|
||||
if (entitytype & ENTITYTYPE_CHR) {
|
||||
return chrGetDistanceToChr(chr, entityid);
|
||||
}
|
||||
|
||||
if (entitytype & ENTITYTYPE_PAD) {
|
||||
return chrGetDistanceToPad(chr, entityid);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f02e3dc
|
||||
|
||||
@@ -33848,7 +33848,7 @@ glabel func0f08307c
|
||||
/* f083588: 8c85002c */ lw $a1,0x2c($a0)
|
||||
.L0f08358c:
|
||||
/* f08358c: 8c860030 */ lw $a2,0x30($a0)
|
||||
/* f083590: 0fc0b8dc */ jal func0f02e370
|
||||
/* f083590: 0fc0b8dc */ jal chrGetDistanceToEntity
|
||||
/* f083594: afa40088 */ sw $a0,0x88($sp)
|
||||
/* f083598: 8fa40088 */ lw $a0,0x88($sp)
|
||||
/* f08359c: 46000086 */ mov.s $f2,$f0
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
#define ENTITYTYPE_CHR 0x0004
|
||||
#define ENTITYTYPE_PAD 0x0008
|
||||
#define ENTITYTYPE_DIRECTION 0x0010
|
||||
#define ENTITYTYPE_TARGETCHR 0x0200
|
||||
#define ENTITYTYPE_TARGET 0x0200
|
||||
|
||||
#define EYESPYMODE_CAMSPY 0
|
||||
#define EYESPYMODE_DRUGSPY 1
|
||||
|
||||
@@ -10,7 +10,7 @@ u32 func0f02e15c(void);
|
||||
u32 func0f02e1cc(void);
|
||||
u32 func0f02e260(void);
|
||||
u32 func0f02e2d0(void);
|
||||
u32 func0f02e370(void);
|
||||
f32 chrGetDistanceToEntity(struct chrdata *chr, u32 entitytype, s32 entityid);
|
||||
u32 func0f02e3dc(void);
|
||||
u32 func0f02e4f8(void);
|
||||
u32 func0f02e550(void);
|
||||
|
||||
Reference in New Issue
Block a user