Decompile chrGetAngleToTarget

This commit is contained in:
Ryan Dwyer 2019-11-25 23:08:18 +10:00
parent 89bd3f2eab
commit 20c819ccf7
3 changed files with 11 additions and 20 deletions

View File

@ -49157,20 +49157,11 @@ glabel func0f048a84
/* f048b48: 46006006 */ mov.s $f0,$f12
);
GLOBAL_ASM(
glabel func0f048b4c
/* f048b4c: 27bdffe8 */ addiu $sp,$sp,-24
/* f048b50: afbf0014 */ sw $ra,0x14($sp)
/* f048b54: 0fc0a221 */ jal chrGetTargetPosition
/* f048b58: afa40018 */ sw $a0,0x18($sp)
/* f048b5c: 8fa40018 */ lw $a0,0x18($sp)
/* f048b60: 0fc122a1 */ jal func0f048a84
/* f048b64: 24450008 */ addiu $a1,$v0,0x8
/* f048b68: 8fbf0014 */ lw $ra,0x14($sp)
/* f048b6c: 27bd0018 */ addiu $sp,$sp,0x18
/* f048b70: 03e00008 */ jr $ra
/* f048b74: 00000000 */ sll $zero,$zero,0x0
);
float chrGetAngleToTarget(struct chrdata *chr)
{
struct position *pos = chrGetTargetPosition(chr);
return func0f048a84(chr, &pos->coord);
}
GLOBAL_ASM(
glabel func0f048b78

View File

@ -2105,7 +2105,7 @@ glabel ai004d
/* f0507a0: afbf0014 */ sw $ra,0x14($sp)
/* f0507a4: 01cf1021 */ addu $v0,$t6,$t7
/* f0507a8: afa2001c */ sw $v0,0x1c($sp)
/* f0507ac: 0fc122d3 */ jal func0f048b4c
/* f0507ac: 0fc122d3 */ jal chrGetAngleToTarget
/* f0507b0: 8c640424 */ lw $a0,0x424($v1)
/* f0507b4: 8fa2001c */ lw $v0,0x1c($sp)
/* f0507b8: 3c03800a */ lui $v1,%hi(g_Vars)
@ -2156,7 +2156,7 @@ glabel ai004d
//{
// u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
//
// if (func0f048b4c(g_Vars.chrdata) < cmd[2] * 6.282185077f * 0.00390625f) {
// if (chrGetAngleToTarget(g_Vars.chrdata) < cmd[2] * 6.282185077f * 0.00390625f) {
// g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]);
// } else {
// g_Vars.aioffset += 4;
@ -2178,7 +2178,7 @@ glabel ai004f
/* f050860: afbf0014 */ sw $ra,0x14($sp)
/* f050864: 01cf1021 */ addu $v0,$t6,$t7
/* f050868: afa2001c */ sw $v0,0x1c($sp)
/* f05086c: 0fc122d3 */ jal func0f048b4c
/* f05086c: 0fc122d3 */ jal chrGetAngleToTarget
/* f050870: 8c640424 */ lw $a0,0x424($v1)
/* f050874: 8fa2001c */ lw $v0,0x1c($sp)
/* f050878: 3c03800a */ lui $v1,%hi(g_Vars)
@ -2229,7 +2229,7 @@ glabel ai004f
//{
// u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
//
// if (func0f048b4c(g_Vars.chrdata) > cmd[2] * 6.282185077f * 0.00390625f) {
// if (chrGetAngleToTarget(g_Vars.chrdata) > cmd[2] * 6.282185077f * 0.00390625f) {
// g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]);
// } else {
// g_Vars.aioffset += 4;

View File

@ -790,8 +790,8 @@ u32 func0f0482cc(void);
u32 func0f048398(void);
u32 func0f048a14(struct chrdata *chr);
u32 func0f048a4c(struct chrdata *chr);
u32 func0f048a84(void);
float func0f048b4c(struct chrdata *chr);
float func0f048a84(struct chrdata *chr, struct coord *coord);
float chrGetAngleToTarget(struct chrdata *chr);
u32 func0f048b78(void);
u32 func0f048cc0(void);
u32 func0f048dcc(void);