Decompile currentPlayerUpdateAutoAimYProp

This commit is contained in:
Ryan Dwyer 2020-02-29 23:41:32 +10:00
parent 78cd37b8d9
commit 788bf872cc
4 changed files with 26 additions and 36 deletions

View File

@ -5893,7 +5893,7 @@ glabel func0f064ce8
/* f065388: 46123283 */ div.s $f10,$f6,$f18
/* f06538c: 46105101 */ sub.s $f4,$f10,$f16
/* f065390: 44052000 */ mfc1 $a1,$f4
/* f065394: 0fc31ec0 */ jal func0f0c7b00
/* f065394: 0fc31ec0 */ jal currentPlayerUpdateAutoAimYProp
/* f065398: 00000000 */ sll $zero,$zero,0x0
.L0f06539c:
/* f06539c: 0fc31ef4 */ jal func0f0c7bd0
@ -5965,7 +5965,7 @@ glabel func0f064ce8
/* f065494: 1000000a */ beqz $zero,.L0f0654c0
/* f065498: a04a1583 */ sb $t2,0x1583($v0)
.L0f06549c:
/* f06549c: 0fc31ec0 */ jal func0f0c7b00
/* f06549c: 0fc31ec0 */ jal currentPlayerUpdateAutoAimYProp
/* f0654a0: 24050000 */ addiu $a1,$zero,0x0
/* f0654a4: 00002025 */ or $a0,$zero,$zero
/* f0654a8: 0fc31f0d */ jal currentPlayerUpdateAutoAimXProp

View File

@ -238,36 +238,23 @@ bool currentPlayerIsInSightAimMode(void)
return g_Vars.currentplayer->insightaimmode;
}
GLOBAL_ASM(
glabel func0f0c7b00
/* f0c7b00: 44856000 */ mtc1 $a1,$f12
/* f0c7b04: 3c05800a */ lui $a1,%hi(g_Vars)
/* f0c7b08: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars)
/* f0c7b0c: 8ca20284 */ lw $v0,0x284($a1)
/* f0c7b10: 8c430130 */ lw $v1,0x130($v0)
/* f0c7b14: 04620006 */ bltzl $v1,.L0f0c7b30
/* f0c7b18: 8c58012c */ lw $t8,0x12c($v0)
/* f0c7b1c: 8cae0038 */ lw $t6,0x38($a1)
/* f0c7b20: 006e7823 */ subu $t7,$v1,$t6
/* f0c7b24: ac4f0130 */ sw $t7,0x130($v0)
/* f0c7b28: 8ca20284 */ lw $v0,0x284($a1)
/* f0c7b2c: 8c58012c */ lw $t8,0x12c($v0)
.L0f0c7b30:
/* f0c7b30: 5098000a */ beql $a0,$t8,.L0f0c7b5c
/* f0c7b34: e44c0128 */ swc1 $f12,0x128($v0)
/* f0c7b38: 8c590130 */ lw $t9,0x130($v0)
/* f0c7b3c: 2408001e */ addiu $t0,$zero,0x1e
/* f0c7b40: 07210006 */ bgez $t9,.L0f0c7b5c
/* f0c7b44: 00000000 */ sll $zero,$zero,0x0
/* f0c7b48: ac480130 */ sw $t0,0x130($v0)
/* f0c7b4c: 8ca90284 */ lw $t1,0x284($a1)
/* f0c7b50: ad24012c */ sw $a0,0x12c($t1)
/* f0c7b54: 8ca20284 */ lw $v0,0x284($a1)
/* f0c7b58: e44c0128 */ swc1 $f12,0x128($v0)
.L0f0c7b5c:
/* f0c7b5c: 03e00008 */ jr $ra
/* f0c7b60: 00000000 */ sll $zero,$zero,0x0
);
void currentPlayerUpdateAutoAimYProp(struct prop *prop, f32 autoaimy)
{
if (g_Vars.currentplayer->autoyaimtime60 >= 0) {
g_Vars.currentplayer->autoyaimtime60 -= g_Vars.lvupdate240_60;
}
if (prop != g_Vars.currentplayer->autoyaimprop) {
if (g_Vars.currentplayer->autoyaimtime60 < 0) {
g_Vars.currentplayer->autoyaimtime60 = 30;
g_Vars.currentplayer->autoyaimprop = prop;
} else {
return;
}
}
g_Vars.currentplayer->autoaimy = autoaimy;
}
void currentPlayerSetAutoAimX(bool enabled)
{

View File

@ -9,7 +9,7 @@ void currentPlayerSetAutoAimY(bool enabled);
bool currentPlayerIsAutoAimYEnabled(void);
u32 func0f0c7a8c(void);
bool currentPlayerIsInSightAimMode(void);
u32 func0f0c7b00(void);
void currentPlayerUpdateAutoAimYProp(struct prop *prop, f32 autoaimy);
void currentPlayerSetAutoAimX(bool enabled);
bool currentPlayerIsAutoAimXEnabled(void);
u32 func0f0c7bd0(void);

View File

@ -1091,14 +1091,17 @@ struct player {
/*0x0118*/ u32 unk0118;
/*0x011c*/ u32 unk011c;
/*0x0120*/ bool insightaimmode;
/*0x0124*/ bool autoyaimenabled;
/*0x0128*/ u32 unk0128;
/*0x012c*/ u32 unk012c;
/*0x0130*/ u32 unk0130;
/*0x0128*/ f32 autoaimy;
/*0x012c*/ struct prop *autoyaimprop;
/*0x0130*/ s32 autoyaimtime60;
/*0x0134*/ bool autoxaimenabled;
/*0x0138*/ f32 autoaimx;
/*0x013c*/ struct prop *autoxaimprop;
/*0x0140*/ s32 autoxaimtime60;
/*0x0144*/ f32 unk0144;
/*0x0148*/ u32 unk0148;
/*0x014c*/ u32 unk014c;