From 30dcd7946f0be7cd1974bb0595a7d32b9086090c Mon Sep 17 00:00:00 2001 From: Jameriquiah <42100286+Jameriquiah@users.noreply.github.com> Date: Sun, 24 May 2026 23:31:29 -0400 Subject: [PATCH] add fps custom equips (#6543) --- .../object_custom_equip/object_custom_equip.h | 12 +++++++ soh/soh/Enhancements/customequipment.cpp | 36 +++++++++++++------ 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/soh/assets/objects/object_custom_equip/object_custom_equip.h b/soh/assets/objects/object_custom_equip/object_custom_equip.h index 380116a0f9..399a824f9a 100644 --- a/soh/assets/objects/object_custom_equip/object_custom_equip.h +++ b/soh/assets/objects/object_custom_equip/object_custom_equip.h @@ -7,6 +7,9 @@ #define dgCustomBowDL "__OTR__objects/object_custom_equip/gCustomBowDL" static const ALIGN_ASSET(2) char gCustomBowDL[] = dgCustomBowDL; +#define dgCustomFPSBowDL "__OTR__objects/object_custom_equip/gCustomFPSBowDL" +static const ALIGN_ASSET(2) char gCustomFPSBowDL[] = dgCustomFPSBowDL; + #define dgCustomHammerDL "__OTR__objects/object_custom_equip/gCustomHammerDL" static const ALIGN_ASSET(2) char gCustomHammerDL[] = dgCustomHammerDL; @@ -16,6 +19,15 @@ static const ALIGN_ASSET(2) char gCustomHookshotDL[] = dgCustomHookshotDL; #define dgCustomLongshotDL "__OTR__objects/object_custom_equip/gCustomLongshotDL" static const ALIGN_ASSET(2) char gCustomLongshotDL[] = dgCustomLongshotDL; +#define dgCustomFPSSlingshotDL "__OTR__objects/object_custom_equip/gCustomFPSSlingshotDL" +static const ALIGN_ASSET(2) char gCustomFPSSlingshotDL[] = dgCustomFPSSlingshotDL; + +#define dgCustomFPSHookshotDL "__OTR__objects/object_custom_equip/gCustomFPSHookshotDL" +static const ALIGN_ASSET(2) char gCustomFPSHookshotDL[] = dgCustomFPSHookshotDL; + +#define dgCustomFPSLongshotDL "__OTR__objects/object_custom_equip/gCustomFPSLongshotDL" +static const ALIGN_ASSET(2) char gCustomFPSLongshotDL[] = dgCustomFPSLongshotDL; + #define dgCustomHookshotTipDL "__OTR__objects/object_custom_equip/gCustomHookshotTipDL" static const ALIGN_ASSET(2) char gCustomHookshotTipDL[] = dgCustomHookshotTipDL; diff --git a/soh/soh/Enhancements/customequipment.cpp b/soh/soh/Enhancements/customequipment.cpp index b799d4a995..3f5f758b19 100644 --- a/soh/soh/Enhancements/customequipment.cpp +++ b/soh/soh/Enhancements/customequipment.cpp @@ -57,6 +57,22 @@ static const char* GetBrokenLongswordInSheathDL() { { gCustomBrokenLongswordInSheathDL, gCustomBreakableLongswordInSheathDL, gCustomLongswordInSheathDL }); } +static const char* GetCustomFPSSlingshotDL() { + return ResolveCustomChain({ gCustomFPSSlingshotDL, gCustomSlingshotDL }); +} + +static const char* GetCustomFPSBowDL() { + return ResolveCustomChain({ gCustomFPSBowDL, gCustomBowDL }); +} + +static const char* GetCustomFPSHookshotDL() { + return ResolveCustomChain({ gCustomFPSHookshotDL, gCustomHookshotDL }); +} + +static const char* GetCustomFPSLongshotDL() { + return ResolveCustomChain({ gCustomFPSLongshotDL, gCustomLongshotDL }); +} + static void UpdateCustomEquipmentSetModel(Player* player, u8 ModelGroup) { (void)ModelGroup; @@ -395,8 +411,8 @@ static void ApplyCommonEquipmentPatches() { ApplyPatchEntries({ { gLinkAdultRightHandHoldingHookshotNearDL, gCustomHookshotDL, "customHookshot1", "customHookshot2", "customHookshot3", rightHandClosed }, - { gLinkAdultRightHandHoldingHookshotFarDL, gCustomHookshotDL, "customHookshotFPS1", "customHookshotFPS2", - "customHookshotFPS3", fpsHand }, + { gLinkAdultRightHandHoldingHookshotFarDL, GetCustomFPSHookshotDL(), "customHookshotFPS1", + "customHookshotFPS2", "customHookshotFPS3", fpsHand }, }); } @@ -404,8 +420,8 @@ static void ApplyCommonEquipmentPatches() { ApplyPatchEntries({ { gLinkAdultRightHandHoldingHookshotNearDL, gCustomLongshotDL, "customHookshot1", "customHookshot2", "customHookshot3", rightHandClosed }, - { gLinkAdultRightHandHoldingHookshotFarDL, gCustomLongshotDL, "customHookshotFPS1", "customHookshotFPS2", - "customHookshotFPS3", fpsHand }, + { gLinkAdultRightHandHoldingHookshotFarDL, GetCustomFPSLongshotDL(), "customHookshotFPS1", + "customHookshotFPS2", "customHookshotFPS3", fpsHand }, }); } @@ -436,16 +452,16 @@ static void ApplyCommonEquipmentPatches() { "customChildOcarina3", rightHandNear }, { gLinkAdultRightHandHoldingBowNearDL, gCustomBowDL, "customBow1", "customBow2", "customBow3", rightHandClosed }, - { gLinkAdultRightHandHoldingBowFirstPersonDL, gCustomBowDL, "customBowFPS1", "customBowFPS2", "customBowFPS3", - fpsHand }, + { gLinkAdultRightHandHoldingBowFirstPersonDL, GetCustomFPSBowDL(), "customBowFPS1", "customBowFPS2", + "customBowFPS3", fpsHand }, { gLinkAdultLeftHandHoldingHammerNearDL, gCustomHammerDL, "customHammer1", "customHammer2", "customHammer3", leftHandClosed }, { gLinkChildLeftFistAndBoomerangNearDL, gCustomBoomerangDL, "customBoomerang1", "customBoomerang2", "customBoomerang3", leftHandClosed }, { gLinkChildRightHandHoldingSlingshotNearDL, gCustomSlingshotDL, "customSlingshot1", "customSlingshot2", "customSlingshot3", rightHandClosed }, - { gLinkChildRightArmStretchedSlingshotDL, gCustomSlingshotDL, "customSlingshotFPS1", "customSlingshotFPS2", - "customSlingshotFPS3", fpsHand }, + { gLinkChildRightArmStretchedSlingshotDL, GetCustomFPSSlingshotDL(), "customSlingshotFPS1", + "customSlingshotFPS2", "customSlingshotFPS3", fpsHand }, }); ApplyPatchEntries({ @@ -457,8 +473,8 @@ static void ApplyCommonEquipmentPatches() { "customBoomerang3", leftHandClosed }, { gLinkChildRightHandHoldingSlingshotNearDL, gCustomSlingshotDL, "customSlingshot1", "customSlingshot2", "customSlingshot3", rightHandClosed }, - { gLinkChildRightArmStretchedSlingshotDL, gCustomSlingshotDL, "customSlingshotFPS1", "customSlingshotFPS2", - "customSlingshotFPS3", fpsHand }, + { gLinkChildRightArmStretchedSlingshotDL, GetCustomFPSSlingshotDL(), "customSlingshotFPS1", + "customSlingshotFPS2", "customSlingshotFPS3", fpsHand }, }); }