Decompile chrGetDistanceToTarget2

This commit is contained in:
Ryan Dwyer
2019-11-08 00:07:36 +10:00
parent 8fd229a19b
commit 0b34257e66
2 changed files with 8 additions and 17 deletions
+2 -2
View File
@@ -16770,7 +16770,7 @@ glabel ai01d7
/* f05fcbc: 468021a0 */ cvt.s.w $f6,$f4
/* f05fcc0: 8c640424 */ lw $a0,0x424($v1)
/* f05fcc4: 46083282 */ mul.s $f10,$f6,$f8
/* f05fcc8: 0fc1247e */ jal func0f0491f8
/* f05fcc8: 0fc1247e */ jal chrGetDistanceToTarget2
/* f05fccc: e7aa0018 */ swc1 $f10,0x18($sp)
/* f05fcd0: c7b00018 */ lwc1 $f16,0x18($sp)
/* f05fcd4: 3c03800a */ lui $v1,0x800a
@@ -16822,7 +16822,7 @@ glabel ai01d8
/* f05fd68: 468021a0 */ cvt.s.w $f6,$f4
/* f05fd6c: 8c640424 */ lw $a0,0x424($v1)
/* f05fd70: 46083282 */ mul.s $f10,$f6,$f8
/* f05fd74: 0fc1247e */ jal func0f0491f8
/* f05fd74: 0fc1247e */ jal chrGetDistanceToTarget2
/* f05fd78: e7aa0018 */ swc1 $f10,0x18($sp)
/* f05fd7c: c7b00018 */ lwc1 $f16,0x18($sp)
/* f05fd80: 3c03800a */ lui $v1,0x800a
+6 -15
View File
@@ -83847,21 +83847,12 @@ float chrGetDistanceToTarget(struct chrdata *chr)
return positionGetDistanceToPosition(chr->pos, targetpos);
}
GLOBAL_ASM(
glabel func0f0491f8
/* f0491f8: 27bdffe8 */ addiu $sp,$sp,-24
/* f0491fc: afbf0014 */ sw $ra,0x14($sp)
/* f049200: 0fc0a221 */ jal chrGetTargetPosition
/* f049204: afa40018 */ sw $a0,0x18($sp)
/* f049208: 8fae0018 */ lw $t6,0x18($sp)
/* f04920c: 00402825 */ or $a1,$v0,$zero
/* f049210: 0fc12495 */ jal positionGetDistanceToPosition
/* f049214: 8dc4001c */ lw $a0,0x1c($t6)
/* f049218: 8fbf0014 */ lw $ra,0x14($sp)
/* f04921c: 27bd0018 */ addiu $sp,$sp,0x18
/* f049220: 03e00008 */ jr $ra
/* f049224: 00000000 */ sll $zero,$zero,0x0
);
// Redundant function - it's the same as above
float chrGetDistanceToTarget2(struct chrdata *chr)
{
struct position *targetpos = chrGetTargetPosition(chr);
return positionGetDistanceToPosition(chr->pos, targetpos);
}
float chrGetDistanceToCurrentPlayer(struct chrdata *chr)
{