Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions soh/assets/objects/object_custom_equip/object_custom_equip.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,42 @@
#define dgCustomBowDL "__OTR__objects/object_custom_equip/gCustomBowDL"
static const ALIGN_ASSET(2) char gCustomBowDL[] = dgCustomBowDL;

#define dgCustomBowFPSDL "__OTR__objects/object_custom_equip/gCustomBowFPSDL"
static const ALIGN_ASSET(2) char gCustomBowFPSDL[] = dgCustomBowFPSDL;

#define dgCustomHammerDL "__OTR__objects/object_custom_equip/gCustomHammerDL"
static const ALIGN_ASSET(2) char gCustomHammerDL[] = dgCustomHammerDL;

#define dgCustomHookshotDL "__OTR__objects/object_custom_equip/gCustomHookshotDL"
static const ALIGN_ASSET(2) char gCustomHookshotDL[] = dgCustomHookshotDL;

#define dgCustomHookshotFPSDL "__OTR__objects/object_custom_equip/gCustomHookshotFPSDL"
static const ALIGN_ASSET(2) char gCustomHookshotFPSDL[] = dgCustomHookshotFPSDL;

#define dgCustomLongshotDL "__OTR__objects/object_custom_equip/gCustomLongshotDL"
static const ALIGN_ASSET(2) char gCustomLongshotDL[] = dgCustomLongshotDL;

#define dgCustomLongshotFPSDL "__OTR__objects/object_custom_equip/gCustomLongshotFPSDL"
static const ALIGN_ASSET(2) char gCustomLongshotFPSDL[] = dgCustomLongshotFPSDL;

#define dgCustomHookshotTipDL "__OTR__objects/object_custom_equip/gCustomHookshotTipDL"
static const ALIGN_ASSET(2) char gCustomHookshotTipDL[] = dgCustomHookshotTipDL;

#define dgCustomHookshotChainDL "__OTR__objects/object_custom_equip/gCustomHookshotChainDL"
static const ALIGN_ASSET(2) char gCustomHookshotChainDL[] = dgCustomHookshotChainDL;

#define dgCustomLongshotTipDL "__OTR__objects/object_custom_equip/gCustomLongshotTipDL"
static const ALIGN_ASSET(2) char gCustomLongshotTipDL[] = dgCustomLongshotTipDL;

#define dgCustomLongshotChainDL "__OTR__objects/object_custom_equip/gCustomLongshotChainDL"
static const ALIGN_ASSET(2) char gCustomLongshotChainDL[] = dgCustomLongshotChainDL;

#define dgCustomSlingshotDL "__OTR__objects/object_custom_equip/gCustomSlingshotDL"
static const ALIGN_ASSET(2) char gCustomSlingshotDL[] = dgCustomSlingshotDL;

#define dgCustomSlingshotFPSDL "__OTR__objects/object_custom_equip/gCustomSlingshotFPSDL"
static const ALIGN_ASSET(2) char gCustomSlingshotFPSDL[] = dgCustomSlingshotFPSDL;

#define dgCustomFairyOcarinaDL "__OTR__objects/object_custom_equip/gCustomFairyOcarinaDL"
static const ALIGN_ASSET(2) char gCustomFairyOcarinaDL[] = dgCustomFairyOcarinaDL;

Expand Down
65 changes: 50 additions & 15 deletions soh/soh/Enhancements/customequipment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,34 @@ static const char* GetBrokenLongswordInSheathDL() {
{ gCustomBrokenLongswordInSheathDL, gCustomBreakableLongswordInSheathDL, gCustomLongswordInSheathDL });
}

static const char* GetLongshotDL() {
return ResolveCustomChain({ gCustomLongshotDL, gCustomHookshotDL });
}

static const char* GetBowFPSDL() {
return ResolveCustomChain({ gCustomBowFPSDL, gCustomBowDL });
}

static const char* GetSlingshotFPSDL() {
return ResolveCustomChain({ gCustomSlingshotFPSDL, gCustomSlingshotDL });
}

static const char* GetHookshotFPSDL() {
return ResolveCustomChain({ gCustomHookshotFPSDL, gCustomHookshotDL });
}

static const char* GetLongshotFPSDL() {
return ResolveCustomChain({ gCustomLongshotFPSDL, gCustomLongshotDL, gCustomHookshotDL });
}

static const char* GetLongshotTipDL() {
return ResolveCustomChain({ gCustomLongshotTipDL, gCustomHookshotTipDL });
}

static const char* GetLongshotChainDL() {
return ResolveCustomChain({ gCustomLongshotChainDL, gCustomHookshotChainDL });
}

static void UpdateCustomEquipmentSetModel(Player* player, u8 ModelGroup) {
(void)ModelGroup;

Expand Down Expand Up @@ -395,26 +423,33 @@ static void ApplyCommonEquipmentPatches() {
ApplyPatchEntries({
{ gLinkAdultRightHandHoldingHookshotNearDL, gCustomHookshotDL, "customHookshot1", "customHookshot2",
"customHookshot3", rightHandClosed },
{ gLinkAdultRightHandHoldingHookshotFarDL, gCustomHookshotDL, "customHookshotFPS1", "customHookshotFPS2",
{ gLinkAdultRightHandHoldingHookshotFarDL, GetHookshotFPSDL(), "customHookshotFPS1", "customHookshotFPS2",
"customHookshotFPS3", fpsHand },
{ gLinkAdultHookshotTipDL, gCustomHookshotTipDL, "customHookshotTip1", "customHookshotTip2", nullptr,
nullptr },
{ gLinkAdultHookshotChainDL, gCustomHookshotChainDL, "customHookshotChain1", "customHookshotChain2",
nullptr, nullptr },
});
}

if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
} else if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
ApplyPatchEntries({
{ gLinkAdultRightHandHoldingHookshotNearDL, gCustomLongshotDL, "customHookshot1", "customHookshot2",
{ gLinkAdultRightHandHoldingHookshotNearDL, GetLongshotDL(), "customHookshot1", "customHookshot2",
"customHookshot3", rightHandClosed },
{ gLinkAdultRightHandHoldingHookshotFarDL, gCustomLongshotDL, "customHookshotFPS1", "customHookshotFPS2",
{ gLinkAdultRightHandHoldingHookshotFarDL, GetLongshotFPSDL(), "customHookshotFPS1", "customHookshotFPS2",
"customHookshotFPS3", fpsHand },
{ gLinkAdultHookshotTipDL, GetLongshotTipDL(), "customHookshotTip1", "customHookshotTip2", nullptr,
nullptr },
{ gLinkAdultHookshotChainDL, GetLongshotChainDL(), "customHookshotChain1", "customHookshotChain2", nullptr,
nullptr },
});
} else {
ApplyPatchEntries({
{ gLinkAdultHookshotTipDL, gCustomHookshotTipDL, "customHookshotTip1", "customHookshotTip2", nullptr,
nullptr },
{ gLinkAdultHookshotChainDL, gCustomHookshotChainDL, "customHookshotChain1", "customHookshotChain2",
nullptr, nullptr },
});
}

ApplyPatchEntries({
{ gLinkAdultHookshotTipDL, gCustomHookshotTipDL, "customHookshotTip1", "customHookshotTip2", nullptr, nullptr },
{ gLinkAdultHookshotChainDL, gCustomHookshotChainDL, "customHookshotChain1", "customHookshotChain2", nullptr,
nullptr },
});

if (INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) {
ApplyPatchEntries({
{ gLinkAdultRightHandHoldingOotNearDL, isChild ? gCustomFairyOcarinaDL : gCustomFairyOcarinaAdultDL,
Expand All @@ -436,15 +471,15 @@ static void ApplyCommonEquipmentPatches() {
"customChildOcarina3", rightHandNear },
{ gLinkAdultRightHandHoldingBowNearDL, gCustomBowDL, "customBow1", "customBow2", "customBow3",
rightHandClosed },
{ gLinkAdultRightHandHoldingBowFirstPersonDL, gCustomBowDL, "customBowFPS1", "customBowFPS2", "customBowFPS3",
{ gLinkAdultRightHandHoldingBowFirstPersonDL, GetBowFPSDL(), "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",
{ gLinkChildRightArmStretchedSlingshotDL, GetSlingshotFPSDL(), "customSlingshotFPS1", "customSlingshotFPS2",
"customSlingshotFPS3", fpsHand },
});

Expand All @@ -457,7 +492,7 @@ static void ApplyCommonEquipmentPatches() {
"customBoomerang3", leftHandClosed },
{ gLinkChildRightHandHoldingSlingshotNearDL, gCustomSlingshotDL, "customSlingshot1", "customSlingshot2",
"customSlingshot3", rightHandClosed },
{ gLinkChildRightArmStretchedSlingshotDL, gCustomSlingshotDL, "customSlingshotFPS1", "customSlingshotFPS2",
{ gLinkChildRightArmStretchedSlingshotDL, GetSlingshotFPSDL(), "customSlingshotFPS1", "customSlingshotFPS2",
"customSlingshotFPS3", fpsHand },
});
}
Expand Down
Loading