From 78c80d7669f93a3bee84b4894109966650d5e734 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 29 Feb 2020 23:08:46 +1000 Subject: [PATCH] Decompile currentPlayerIsInSightAimMode --- src/game/game_0c79f0.c | 11 ++++------- src/game/game_167ae0.c | 4 ++-- src/include/game/game_0c79f0.h | 2 +- src/include/types.h | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/game/game_0c79f0.c b/src/game/game_0c79f0.c index 60a039c95..a3a5bc470 100644 --- a/src/game/game_0c79f0.c +++ b/src/game/game_0c79f0.c @@ -233,13 +233,10 @@ glabel func0f0c7a8c /* f0c7aec: 00000000 */ sll $zero,$zero,0x0 ); -GLOBAL_ASM( -glabel func0f0c7af0 -/* f0c7af0: 3c0e800a */ lui $t6,0x800a -/* f0c7af4: 8dcea244 */ lw $t6,-0x5dbc($t6) -/* f0c7af8: 03e00008 */ jr $ra -/* f0c7afc: 8dc20120 */ lw $v0,0x120($t6) -); +bool currentPlayerIsInSightAimMode(void) +{ + return g_Vars.currentplayer->insightaimmode; +} GLOBAL_ASM( glabel func0f0c7b00 diff --git a/src/game/game_167ae0.c b/src/game/game_167ae0.c index a70bab8ac..c1de797a9 100644 --- a/src/game/game_167ae0.c +++ b/src/game/game_167ae0.c @@ -2553,7 +2553,7 @@ glabel func0f169374 /* f169e10: 3c054000 */ lui $a1,0x4000 /* f169e14: 50400050 */ beqzl $v0,.L0f169f58 /* f169e18: 8e6a0284 */ lw $t2,0x284($s3) -/* f169e1c: 0fc31ebc */ jal func0f0c7af0 +/* f169e1c: 0fc31ebc */ jal currentPlayerIsInSightAimMode /* f169e20: 00000000 */ sll $zero,$zero,0x0 /* f169e24: 1040004b */ beqz $v0,.L0f169f54 /* f169e28: 00002025 */ or $a0,$zero,$zero @@ -2672,7 +2672,7 @@ glabel func0f169374 /* f169fb4: 8f0b1624 */ lw $t3,0x1624($t8) /* f169fb8: 5160000b */ beqzl $t3,.L0f169fe8 /* f169fbc: 8e640284 */ lw $a0,0x284($s3) -/* f169fc0: 0fc31ebc */ jal func0f0c7af0 +/* f169fc0: 0fc31ebc */ jal currentPlayerIsInSightAimMode /* f169fc4: 00000000 */ sll $zero,$zero,0x0 /* f169fc8: 50400007 */ beqzl $v0,.L0f169fe8 /* f169fcc: 8e640284 */ lw $a0,0x284($s3) diff --git a/src/include/game/game_0c79f0.h b/src/include/game/game_0c79f0.h index d87616486..d8b3af345 100644 --- a/src/include/game/game_0c79f0.h +++ b/src/include/game/game_0c79f0.h @@ -8,7 +8,7 @@ u32 func0f0c7a00(void); void currentPlayerSetAutoAimY(bool enabled); bool currentPlayerIsAutoAimYEnabled(void); u32 func0f0c7a8c(void); -u32 func0f0c7af0(void); +bool currentPlayerIsInSightAimMode(void); u32 func0f0c7b00(void); void currentPlayerSetAutoAimX(bool enabled); bool currentPlayerIsAutoAimXEnabled(void); diff --git a/src/include/types.h b/src/include/types.h index adcf3f3b8..c3cb11ff9 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1090,7 +1090,7 @@ struct player { /*0x0114*/ u32 unk0114; /*0x0118*/ u32 unk0118; /*0x011c*/ u32 unk011c; - /*0x0120*/ u32 unk0120; + /*0x0120*/ bool insightaimmode; /*0x0124*/ bool autoyaimenabled; /*0x0128*/ u32 unk0128; /*0x012c*/ u32 unk012c;