summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorA Green Spoon <121978037+A-Green-Spoon@users.noreply.github.com>2026-02-17 15:08:06 -0500
committerGitHub <noreply@github.com>2026-02-17 20:08:06 +0000
commitd9ebce9f9f895b392f645130bffc75bcae328ee5 (patch)
tree87c3a9e83b43be030bd0f534a45c4ad9f96ce607 /soh/src/code
parent4cae79fd89e6a094e56f5d95ba494e92e6cfd562 (diff)
hookify additional reticles (#6278)
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_player_lib.c56
1 files changed, 2 insertions, 54 deletions
diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c
index aa3623b6a..6e2292ce1 100644
--- a/soh/src/code/z_player_lib.c
+++ b/soh/src/code/z_player_lib.c
@@ -845,16 +845,6 @@ s32 Player_HoldsSlingshot(Player* this) {
return this->heldItemAction == PLAYER_IA_SLINGSHOT;
}
-// #region SOH [Enhancement]
-s32 Player_HoldsBoomerang(Player* this) {
- return this->heldItemAction == PLAYER_IA_BOOMERANG;
-}
-
-s32 Player_AimsBoomerang(Player* this) {
- return Player_HoldsBoomerang(this) && (this->unk_834 != 0);
-}
-// #endregion
-
s32 func_8008F128(Player* this) {
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
}
@@ -1781,17 +1771,9 @@ Vec3f sLeftRightFootLimbModelFootPos[] = {
{ 200.0f, 200.0f, 0.0f },
};
-// OTRTODO: Figure out why this value works/what this value should be
-// This was originally obtained by working down from FLT_MAX until the math
-// started working out properly
-#define RETICLE_MAX 3.402823466e+12f
-
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
Player* this = (Player*)thisx;
- const Vec3s BoomerangViewAdult = { -31200, -9200, 17000 };
- const Vec3s BoomerangViewChild = { -31200, -8700, 17000 };
-
if (*dList != NULL) {
Matrix_MultVec3f(&sZeroVec, D_80160000);
}
@@ -1933,7 +1915,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
}
if (this->actor.scale.y >= 0.0f) {
- if ((this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT)) {
+ if (GameInteractor_Should(VB_DRAW_ADDITIONAL_RETICLES, (this->heldItemAction == PLAYER_IA_HOOKSHOT) ||
+ (this->heldItemAction == PLAYER_IA_LONGSHOT))) {
Matrix_MultVec3f(&D_80126184, &this->unk_3C8);
if (heldActor != NULL) {
@@ -1954,41 +1937,6 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
CVarGetFloat(CVAR_CHEAT("HookshotReachMultiplier"), 1.0f));
}
}
-
- // #region SOH [Enhancement]
- } else if (CVarGetInteger(CVAR_ENHANCEMENT("BowReticle"), 0) &&
- ((this->heldItemAction == PLAYER_IA_BOW_FIRE) || (this->heldItemAction == PLAYER_IA_BOW_ICE) ||
- (this->heldItemAction == PLAYER_IA_BOW_LIGHT) || (this->heldItemAction == PLAYER_IA_BOW) ||
- (this->heldItemAction == PLAYER_IA_SLINGSHOT))) {
- if (heldActor != NULL) {
- MtxF sp44;
- s32 pad;
-
- Matrix_RotateZYX(0, -15216, -17496, MTXMODE_APPLY);
- Matrix_Get(&sp44);
-
- if (func_8002DD78(this) != 0) {
- Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
- Player_DrawHookshotReticle(play, this, RETICLE_MAX);
- }
- }
- } else if (CVarGetInteger(CVAR_ENHANCEMENT("BoomerangReticle"), 0) &&
- (this->heldItemAction == PLAYER_IA_BOOMERANG)) {
- if (Player_HoldsBoomerang(this)) {
- if (LINK_IS_ADULT) {
- Matrix_RotateZYX(BoomerangViewAdult.x, BoomerangViewAdult.y, BoomerangViewAdult.z,
- MTXMODE_APPLY);
- } else {
- Matrix_RotateZYX(BoomerangViewChild.x, BoomerangViewChild.y, BoomerangViewChild.z,
- MTXMODE_APPLY);
- }
-
- if (Player_AimsBoomerang(this)) {
- Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
- Player_DrawHookshotReticle(play, this, RETICLE_MAX);
- }
- }
- // #endregion
}
if ((this->unk_862 != 0) || ((func_8002DD6C(this) == 0) && (heldActor != NULL))) {