mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-07 10:50:29 -05:00
Rename things
This commit is contained in:
parent
74d81aab95
commit
b8d3e6ceec
@ -1,94 +0,0 @@
|
||||
#ifndef OBJECTS_OBJECT_CUSTOM_EQUIP_H
|
||||
#define OBJECTS_OBJECT_CUSTOM_EQUIP 1
|
||||
|
||||
#include "align_asset_macro.h"
|
||||
|
||||
// Custom Equipment Display Lists
|
||||
#define dgCustomBowDL "__OTR__objects/object_Custom_eq/gCustomBowDL"
|
||||
static const ALIGN_ASSET(2) char gCustomBowDL[] = dgCustomBowDL;
|
||||
|
||||
#define dgCustomHammerDL "__OTR__objects/object_Custom_eq/gCustomHammerDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHammerDL[] = dgCustomHammerDL;
|
||||
|
||||
#define dgCustomHookshotDL "__OTR__objects/object_Custom_eq/gCustomHookshotDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHookshotDL[] = dgCustomHookshotDL;
|
||||
|
||||
#define dgCustomHookshotTipDL "__OTR__objects/object_Custom_eq/gCustomHookshotTipDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHookshotTipDL[] = dgCustomHookshotTipDL;
|
||||
|
||||
#define dgCustomHookshotChainDL "__OTR__objects/object_Custom_eq/gCustomHookshotChainDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHookshotChainDL[] = dgCustomHookshotChainDL;
|
||||
|
||||
#define dgCustomSlingshotDL "__OTR__objects/object_Custom_eq/gCustomSlingshotDL"
|
||||
static const ALIGN_ASSET(2) char gCustomSlingshotDL[] = dgCustomSlingshotDL;
|
||||
|
||||
#define dgCustomFairyOcarinaDL "__OTR__objects/object_Custom_eq/gCustomFairyOcarinaDL"
|
||||
static const ALIGN_ASSET(2) char gCustomFairyOcarinaDL[] = dgCustomFairyOcarinaDL;
|
||||
|
||||
#define dgCustomOcarinaOfTimeDL "__OTR__objects/object_Custom_eq/gCustomOcarinaOfTimeDL"
|
||||
static const ALIGN_ASSET(2) char gCustomOcarinaOfTimeDL[] = dgCustomOcarinaOfTimeDL;
|
||||
|
||||
#define dgCustomBoomerangDL "__OTR__objects/object_Custom_eq/gCustomBoomerangDL"
|
||||
static const ALIGN_ASSET(2) char gCustomBoomerangDL[] = dgCustomBoomerangDL;
|
||||
|
||||
#define dgCustomKokiriSwordDL "__OTR__objects/object_Custom_eq/gCustomKokiriSwordDL"
|
||||
static const ALIGN_ASSET(2) char gCustomKokiriSwordDL[] = dgCustomKokiriSwordDL;
|
||||
|
||||
#define dgCustomKokiriSwordSheathDL "__OTR__objects/object_Custom_eq/gCustomKokiriSwordSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomKokiriSwordSheathDL[] = dgCustomKokiriSwordSheathDL;
|
||||
|
||||
#define dgCustomKokiriSwordInSheathDL "__OTR__objects/object_Custom_eq/gCustomKokiriSwordInSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomKokiriSwordInSheathDL[] = dgCustomKokiriSwordInSheathDL;
|
||||
|
||||
#define dgCustomMasterSwordDL "__OTR__objects/object_Custom_eq/gCustomMasterSwordDL"
|
||||
static const ALIGN_ASSET(2) char gCustomMasterSwordDL[] = dgCustomMasterSwordDL;
|
||||
|
||||
#define dgCustomMasterSwordSheathDL "__OTR__objects/object_Custom_eq/gCustomMasterSwordSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomMasterSwordSheathDL[] = dgCustomMasterSwordSheathDL;
|
||||
|
||||
#define dgCustomMasterSwordInSheathDL "__OTR__objects/object_Custom_eq/gCustomMasterSwordInSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomMasterSwordInSheathDL[] = dgCustomMasterSwordInSheathDL;
|
||||
|
||||
#define dgCustomLongswordDL "__OTR__objects/object_Custom_eq/gCustomLongswordDL"
|
||||
static const ALIGN_ASSET(2) char gCustomLongswordDL[] = dgCustomLongswordDL;
|
||||
|
||||
#define dgCustomBrokenLongswordDL "__OTR__objects/object_Custom_eq/gCustomBrokenLongswordDL"
|
||||
static const ALIGN_ASSET(2) char gCustomBrokenLongswordDL[] = dgCustomBrokenLongswordDL;
|
||||
|
||||
#define dgCustomLongswordSheathDL "__OTR__objects/object_Custom_eq/gCustomLongswordSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomLongswordSheathDL[] = dgCustomLongswordSheathDL;
|
||||
|
||||
#define dgCustomLongswordInSheathDL "__OTR__objects/object_Custom_eq/gCustomLongswordInSheathDL"
|
||||
static const ALIGN_ASSET(2) char gCustomLongswordInSheathDL[] = dgCustomLongswordInSheathDL;
|
||||
|
||||
#define dgCustomDekuShieldDL "__OTR__objects/object_Custom_eq/gCustomDekuShieldDL"
|
||||
static const ALIGN_ASSET(2) char gCustomDekuShieldDL[] = dgCustomDekuShieldDL;
|
||||
|
||||
#define dgCustomDekuShieldOnBackDL "__OTR__objects/object_Custom_eq/gCustomDekuShieldOnBackDL"
|
||||
static const ALIGN_ASSET(2) char gCustomDekuShieldOnBackDL[] = dgCustomDekuShieldOnBackDL;
|
||||
|
||||
#define dgCustomHylianShieldDL "__OTR__objects/object_Custom_eq/gCustomHylianShieldDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHylianShieldDL[] = dgCustomHylianShieldDL;
|
||||
|
||||
#define dgCustomHylianShieldOnBackDL "__OTR__objects/object_Custom_eq/gCustomHylianShieldOnBackDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHylianShieldOnBackDL[] = dgCustomHylianShieldOnBackDL;
|
||||
|
||||
#define dgCustomHylianShieldOnChildBackDL "__OTR__objects/object_Custom_eq/gCustomHylianShieldOnChildBackDL"
|
||||
static const ALIGN_ASSET(2) char gCustomHylianShieldOnChildBackDL[] = dgCustomHylianShieldOnChildBackDL;
|
||||
|
||||
#define dgCustomMirrorShieldDL "__OTR__objects/object_Custom_eq/gCustomMirrorShieldDL"
|
||||
static const ALIGN_ASSET(2) char gCustomMirrorShieldDL[] = dgCustomMirrorShieldDL;
|
||||
|
||||
#define dgCustomMirrorShieldOnBackDL "__OTR__objects/object_Custom_eq/gCustomMirrorShieldOnBackDL"
|
||||
static const ALIGN_ASSET(2) char gCustomMirrorShieldOnBackDL[] = dgCustomMirrorShieldOnBackDL;
|
||||
|
||||
// Custom First Person Hand Display Lists
|
||||
#define dgCustomAdultFPSHandDL "__OTR__objects/object_Custom_boy/gCustomAdultFPSHandDL"
|
||||
static const ALIGN_ASSET(2) char gCustomAdultFPSHandDL[] = dgCustomAdultFPSHandDL;
|
||||
|
||||
#define dgCustomChildFPSHandDL "__OTR__objects/object_Custom_child/gCustomChildFPSHandDL"
|
||||
static const ALIGN_ASSET(2) char gCustomChildFPSHandDL[] = dgCustomChildFPSHandDL;
|
||||
|
||||
|
||||
|
||||
#endif // OBJECTS_OBJECT_CUSTOM_EQUIP_H
|
@ -25,7 +25,7 @@
|
||||
#include "src/overlays/actors/ovl_En_Xc/z_en_xc.h"
|
||||
#include "objects/object_link_boy/object_link_boy.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
#include "objects/object_custom/object_custom_equip.h"
|
||||
#include "objects/object_custom_equip/object_custom_equip.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -840,8 +840,14 @@ void UpdatePatchCustomEquipmentDlists() {
|
||||
PatchOrUnpatch(gLinkAdultHandHoldingBrokenGiantsKnifeDL, gCustomBrokenLongswordDL, "customBrokenBGS1", "customBrokenBGS2", "customBrokenBGS3", gLinkAdultLeftHandClosedNearDL);
|
||||
PatchOrUnpatch(gLinkChildLeftFistAndKokiriSwordNearDL, gCustomKokiriSwordDL, "customKokiriSword1", "customKokiriSword2", "customKokiriSword3", gLinkChildLeftFistNearDL);
|
||||
PatchOrUnpatch(gLinkChildRightFistAndDekuShieldNearDL, gCustomDekuShieldDL, "customDekuShield1", "customDekuShield2", "customDekuShield3", gLinkChildRightHandClosedNearDL);
|
||||
if (INV_CONTENT(ITEM_HOOKSHOT) == ITEM_HOOKSHOT) {
|
||||
PatchOrUnpatch(gLinkAdultRightHandHoldingHookshotNearDL, gCustomHookshotDL, "customHookshot1", "customHookshot2", "customHookshot3", gLinkAdultRightHandClosedNearDL);
|
||||
PatchOrUnpatch(gLinkAdultRightHandHoldingHookshotFarDL, gCustomHookshotDL, "customHookshotFPS1", "customHookshotFPS2", "customHookshotFPS3", gCustomAdultFPSHandDL);// add chain and tip back
|
||||
PatchOrUnpatch(gLinkAdultRightHandHoldingHookshotFarDL, gCustomHookshotDL, "customHookshotFPS1", "customHookshotFPS2", "customHookshotFPS3", gCustomAdultFPSHandDL);
|
||||
}
|
||||
if (INV_CONTENT(ITEM_LONGSHOT) == ITEM_LONGSHOT) {
|
||||
PatchOrUnpatch(gLinkAdultRightHandHoldingHookshotNearDL, gCustomLongshotDL, "customHookshot1", "customHookshot2", "customHookshot3", gLinkAdultRightHandClosedNearDL);
|
||||
PatchOrUnpatch(gLinkAdultRightHandHoldingHookshotFarDL, gCustomLongshotDL, "customHookshotFPS1", "customHookshotFPS2", "customHookshotFPS3", gCustomAdultFPSHandDL);
|
||||
}
|
||||
PatchOrUnpatch(gLinkAdultHookshotTipDL, gCustomHookshotTipDL, "customHookshotTip1", "customHookshotTip2", NULL, NULL);
|
||||
PatchOrUnpatch(gLinkAdultHookshotChainDL, gCustomHookshotChainDL, "customHookshotChain1", "customHookshotChain2", NULL, NULL);
|
||||
if (INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) {
|
||||
@ -870,11 +876,16 @@ void RegisterPatchCustomEquipmentDlistsHandler() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>([]() {
|
||||
static uint16_t lastItemOnB = gSaveContext.equips.buttonItems[0];
|
||||
static uint16_t lastOcarinaContent = INV_CONTENT(ITEM_OCARINA_TIME);
|
||||
static uint16_t lastHookshotContent = INV_CONTENT(ITEM_HOOKSHOT);
|
||||
static uint16_t lastSheathType = GET_PLAYER(gPlayState)->sheathType;
|
||||
if (lastItemOnB != gSaveContext.equips.buttonItems[0] || lastOcarinaContent != INV_CONTENT(ITEM_OCARINA_TIME || GET_PLAYER(gPlayState)->sheathType != lastSheathType)) {
|
||||
if (lastItemOnB != gSaveContext.equips.buttonItems[0] ||
|
||||
lastOcarinaContent != INV_CONTENT(ITEM_OCARINA_TIME) ||
|
||||
lastHookshotContent != INV_CONTENT(ITEM_HOOKSHOT) ||
|
||||
GET_PLAYER(gPlayState)->sheathType != lastSheathType) {
|
||||
UpdatePatchCustomEquipmentDlists();
|
||||
lastItemOnB = gSaveContext.equips.buttonItems[0];
|
||||
lastOcarinaContent = INV_CONTENT(ITEM_OCARINA_TIME);
|
||||
lastHookshotContent = INV_CONTENT(ITEM_HOOKSHOT);
|
||||
lastSheathType = GET_PLAYER(gPlayState)->sheathType;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user