Skip to content

Commit 30dcd79

Browse files
authored
add fps custom equips (HarbourMasters#6543)
1 parent 2845baa commit 30dcd79

2 files changed

Lines changed: 38 additions & 10 deletions

File tree

soh/assets/objects/object_custom_equip/object_custom_equip.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#define dgCustomBowDL "__OTR__objects/object_custom_equip/gCustomBowDL"
88
static const ALIGN_ASSET(2) char gCustomBowDL[] = dgCustomBowDL;
99

10+
#define dgCustomFPSBowDL "__OTR__objects/object_custom_equip/gCustomFPSBowDL"
11+
static const ALIGN_ASSET(2) char gCustomFPSBowDL[] = dgCustomFPSBowDL;
12+
1013
#define dgCustomHammerDL "__OTR__objects/object_custom_equip/gCustomHammerDL"
1114
static const ALIGN_ASSET(2) char gCustomHammerDL[] = dgCustomHammerDL;
1215

@@ -16,6 +19,15 @@ static const ALIGN_ASSET(2) char gCustomHookshotDL[] = dgCustomHookshotDL;
1619
#define dgCustomLongshotDL "__OTR__objects/object_custom_equip/gCustomLongshotDL"
1720
static const ALIGN_ASSET(2) char gCustomLongshotDL[] = dgCustomLongshotDL;
1821

22+
#define dgCustomFPSSlingshotDL "__OTR__objects/object_custom_equip/gCustomFPSSlingshotDL"
23+
static const ALIGN_ASSET(2) char gCustomFPSSlingshotDL[] = dgCustomFPSSlingshotDL;
24+
25+
#define dgCustomFPSHookshotDL "__OTR__objects/object_custom_equip/gCustomFPSHookshotDL"
26+
static const ALIGN_ASSET(2) char gCustomFPSHookshotDL[] = dgCustomFPSHookshotDL;
27+
28+
#define dgCustomFPSLongshotDL "__OTR__objects/object_custom_equip/gCustomFPSLongshotDL"
29+
static const ALIGN_ASSET(2) char gCustomFPSLongshotDL[] = dgCustomFPSLongshotDL;
30+
1931
#define dgCustomHookshotTipDL "__OTR__objects/object_custom_equip/gCustomHookshotTipDL"
2032
static const ALIGN_ASSET(2) char gCustomHookshotTipDL[] = dgCustomHookshotTipDL;
2133

soh/soh/Enhancements/customequipment.cpp

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,22 @@ static const char* GetBrokenLongswordInSheathDL() {
5757
{ gCustomBrokenLongswordInSheathDL, gCustomBreakableLongswordInSheathDL, gCustomLongswordInSheathDL });
5858
}
5959

60+
static const char* GetCustomFPSSlingshotDL() {
61+
return ResolveCustomChain({ gCustomFPSSlingshotDL, gCustomSlingshotDL });
62+
}
63+
64+
static const char* GetCustomFPSBowDL() {
65+
return ResolveCustomChain({ gCustomFPSBowDL, gCustomBowDL });
66+
}
67+
68+
static const char* GetCustomFPSHookshotDL() {
69+
return ResolveCustomChain({ gCustomFPSHookshotDL, gCustomHookshotDL });
70+
}
71+
72+
static const char* GetCustomFPSLongshotDL() {
73+
return ResolveCustomChain({ gCustomFPSLongshotDL, gCustomLongshotDL });
74+
}
75+
6076
static void UpdateCustomEquipmentSetModel(Player* player, u8 ModelGroup) {
6177
(void)ModelGroup;
6278

@@ -395,17 +411,17 @@ static void ApplyCommonEquipmentPatches() {
395411
ApplyPatchEntries({
396412
{ gLinkAdultRightHandHoldingHookshotNearDL, gCustomHookshotDL, "customHookshot1", "customHookshot2",
397413
"customHookshot3", rightHandClosed },
398-
{ gLinkAdultRightHandHoldingHookshotFarDL, gCustomHookshotDL, "customHookshotFPS1", "customHookshotFPS2",
399-
"customHookshotFPS3", fpsHand },
414+
{ gLinkAdultRightHandHoldingHookshotFarDL, GetCustomFPSHookshotDL(), "customHookshotFPS1",
415+
"customHookshotFPS2", "customHookshotFPS3", fpsHand },
400416
});
401417
}
402418

403419
if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
404420
ApplyPatchEntries({
405421
{ gLinkAdultRightHandHoldingHookshotNearDL, gCustomLongshotDL, "customHookshot1", "customHookshot2",
406422
"customHookshot3", rightHandClosed },
407-
{ gLinkAdultRightHandHoldingHookshotFarDL, gCustomLongshotDL, "customHookshotFPS1", "customHookshotFPS2",
408-
"customHookshotFPS3", fpsHand },
423+
{ gLinkAdultRightHandHoldingHookshotFarDL, GetCustomFPSLongshotDL(), "customHookshotFPS1",
424+
"customHookshotFPS2", "customHookshotFPS3", fpsHand },
409425
});
410426
}
411427

@@ -436,16 +452,16 @@ static void ApplyCommonEquipmentPatches() {
436452
"customChildOcarina3", rightHandNear },
437453
{ gLinkAdultRightHandHoldingBowNearDL, gCustomBowDL, "customBow1", "customBow2", "customBow3",
438454
rightHandClosed },
439-
{ gLinkAdultRightHandHoldingBowFirstPersonDL, gCustomBowDL, "customBowFPS1", "customBowFPS2", "customBowFPS3",
440-
fpsHand },
455+
{ gLinkAdultRightHandHoldingBowFirstPersonDL, GetCustomFPSBowDL(), "customBowFPS1", "customBowFPS2",
456+
"customBowFPS3", fpsHand },
441457
{ gLinkAdultLeftHandHoldingHammerNearDL, gCustomHammerDL, "customHammer1", "customHammer2", "customHammer3",
442458
leftHandClosed },
443459
{ gLinkChildLeftFistAndBoomerangNearDL, gCustomBoomerangDL, "customBoomerang1", "customBoomerang2",
444460
"customBoomerang3", leftHandClosed },
445461
{ gLinkChildRightHandHoldingSlingshotNearDL, gCustomSlingshotDL, "customSlingshot1", "customSlingshot2",
446462
"customSlingshot3", rightHandClosed },
447-
{ gLinkChildRightArmStretchedSlingshotDL, gCustomSlingshotDL, "customSlingshotFPS1", "customSlingshotFPS2",
448-
"customSlingshotFPS3", fpsHand },
463+
{ gLinkChildRightArmStretchedSlingshotDL, GetCustomFPSSlingshotDL(), "customSlingshotFPS1",
464+
"customSlingshotFPS2", "customSlingshotFPS3", fpsHand },
449465
});
450466

451467
ApplyPatchEntries({
@@ -457,8 +473,8 @@ static void ApplyCommonEquipmentPatches() {
457473
"customBoomerang3", leftHandClosed },
458474
{ gLinkChildRightHandHoldingSlingshotNearDL, gCustomSlingshotDL, "customSlingshot1", "customSlingshot2",
459475
"customSlingshot3", rightHandClosed },
460-
{ gLinkChildRightArmStretchedSlingshotDL, gCustomSlingshotDL, "customSlingshotFPS1", "customSlingshotFPS2",
461-
"customSlingshotFPS3", fpsHand },
476+
{ gLinkChildRightArmStretchedSlingshotDL, GetCustomFPSSlingshotDL(), "customSlingshotFPS1",
477+
"customSlingshotFPS2", "customSlingshotFPS3", fpsHand },
462478
});
463479
}
464480

0 commit comments

Comments
 (0)