diff --git a/code/Makefile b/code/Makefile index 5ab329e4..aa06bd18 100644 --- a/code/Makefile +++ b/code/Makefile @@ -55,21 +55,21 @@ CFLAGS += $(INCLUDE) -DARM11 -D_3DS $(VERFLAGS) CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 +LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $*.map) -T $(TOPDIR)/oot.ld $(VERFLAGS) -lgcc + ifeq ($(USA), $(REGION)) - LINK_SCRIPT := oot.ld ASFLAGS += -D _USA_=1 -D _EUR_=0 -D _JP_=0 CFLAGS += -g -DVersion_USA BUILD := build_usa TARGET := code_usa else ifeq ($(EUR), $(REGION)) - LINK_SCRIPT := oot_e.ld + LDFLAGS += -Wl,--defsym,_EUR_=1 ASFLAGS += -D _USA_=0 -D _EUR_=1 -D _JP_=0 CFLAGS += -g -DVersion_EUR BUILD := build_eur TARGET := code_eur ifeq ($(JP), $(REGION)) - LINK_SCRIPT := oot_j.ld ASFLAGS += -D _USA_=0 -D _EUR_=0 -D _JP_=1 CFLAGS += -g -DVersion_JP BUILD := build_jp @@ -79,7 +79,6 @@ endif endif ASFLAGS += -g $(ARCH) $(VERFLAGS) -LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $*.map) -T $(TOPDIR)/$(LINK_SCRIPT) $(VERFLAGS) -lgcc LIBS := -lgcc diff --git a/code/include/z3D/z3D.h b/code/include/z3D/z3D.h index 73f6ee7e..a05f6a47 100644 --- a/code/include/z3D/z3D.h +++ b/code/include/z3D/z3D.h @@ -10,6 +10,21 @@ // #include "hid.h" +#ifdef Version_EUR + #define GAME_ADDR(addr) \ + ({ \ + int finalAddr = (addr); \ + if (addr >= 0x41A144 && addr <= 0x43668B) { \ + finalAddr += 0x24; \ + } else if (addr >= 0x436690 && addr <= 0x4A5ADF) { \ + finalAddr += 0x20; \ + } \ + finalAddr; \ + }) +#else + #define GAME_ADDR(addr) (addr) +#endif + #define TRUE 1 #define FALSE 0 @@ -746,170 +761,132 @@ typedef enum { #define Z3D_BOTTOM_SCREEN_2 0x143D86C0 typedef void (*Item_Give_proc)(GlobalContext* globalCtx, u8 item); -#define Item_Give_addr 0x376A78 -#define Item_Give ((Item_Give_proc)Item_Give_addr) +#define Item_Give ((Item_Give_proc)GAME_ADDR(0x376A78)) typedef void (*DisplayTextbox_proc)(GlobalContext* globalCtx, u16 textId, Actor* actor); -#define DisplayTextbox_addr 0x367C7C -#define DisplayTextbox ((DisplayTextbox_proc)DisplayTextbox_addr) +#define DisplayTextbox ((DisplayTextbox_proc)GAME_ADDR(0x367C7C)) typedef u32 (*EventCheck_proc)(u32 flag); -#define EventCheck_addr 0x350CF4 -#define EventCheck ((EventCheck_proc)EventCheck_addr) +#define EventCheck ((EventCheck_proc)GAME_ADDR(0x350CF4)) typedef void (*EventSet_proc)(u32 flag); -#define EventSet_addr 0x34CBF8 -#define EventSet ((EventSet_proc)EventSet_addr) +#define EventSet ((EventSet_proc)GAME_ADDR(0x34CBF8)) typedef void (*Rupees_ChangeBy_proc)(s16 rupeeChange); -#define Rupees_ChangeBy_addr 0x376A60 -#define Rupees_ChangeBy ((Rupees_ChangeBy_proc)Rupees_ChangeBy_addr) +#define Rupees_ChangeBy ((Rupees_ChangeBy_proc)GAME_ADDR(0x376A60)) typedef void (*LinkDamage_proc)(GlobalContext* globalCtx, Player* player, s32 arg2, f32 arg3, f32 arg4, s16 arg5, s32 arg6); -#define LinkDamage_addr 0x35D304 -#define LinkDamage ((LinkDamage_proc)LinkDamage_addr) +#define LinkDamage ((LinkDamage_proc)GAME_ADDR(0x35D304)) typedef u32 (*Inventory_HasEmptyBottle_proc)(void); -#define Inventory_HasEmptyBottle_addr 0x377A04 -#define Inventory_HasEmptyBottle ((Inventory_HasEmptyBottle_proc)Inventory_HasEmptyBottle_addr) +#define Inventory_HasEmptyBottle ((Inventory_HasEmptyBottle_proc)GAME_ADDR(0x377A04)) typedef void (*PlaySound_proc)(u32); -#define PlaySound_addr 0x35C528 // This function plays sound effects and music tracks, overlaid on top of the current BGM -#define PlaySound ((PlaySound_proc)PlaySound_addr) +#define PlaySound ((PlaySound_proc)GAME_ADDR(0x35C528)) typedef Actor* (*Actor_Spawn_proc)(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId, float posX, float posY, float posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params, s32 initImmediately) __attribute__((pcs("aapcs-vfp"))); -#define Actor_Spawn_addr 0x3738D0 -#define Actor_Spawn ((Actor_Spawn_proc)Actor_Spawn_addr) +#define Actor_Spawn ((Actor_Spawn_proc)GAME_ADDR(0x3738D0)) typedef Actor* (*Actor_Find_proc)(ActorContext* actorCtx, s16 actorId, u8 actorType); -#define Actor_Find_addr 0x372D64 -#define Actor_Find ((Actor_Find_proc)Actor_Find_addr) +#define Actor_Find ((Actor_Find_proc)GAME_ADDR(0x372D64)) typedef void (*Actor_GetScreenPos_proc)(GlobalContext* globalCtx, Actor* actor, s16* outX, s16* outY); -#define Actor_GetScreenPos_addr 0x363A20 -#define Actor_GetScreenPos ((Actor_GetScreenPos_proc)Actor_GetScreenPos_addr) +#define Actor_GetScreenPos ((Actor_GetScreenPos_proc)GAME_ADDR(0x363A20)) typedef void (*FireDamage_proc)(Actor* player, GlobalContext* globalCtx, int flamesColor); -#define FireDamage_addr 0x35D8D8 -#define FireDamage ((FireDamage_proc)FireDamage_addr) +#define FireDamage ((FireDamage_proc)GAME_ADDR(0x35D8D8)) typedef void (*Flags_SetEnv_proc)(GlobalContext* globalCtx, s16 flag); -#define Flags_SetEnv_addr 0x366704 -#define Flags_SetEnv ((Flags_SetEnv_proc)Flags_SetEnv_addr) +#define Flags_SetEnv ((Flags_SetEnv_proc)GAME_ADDR(0x366704)) typedef void (*GiveItem_proc)(Actor* actor, GlobalContext* globalCtx, s32 getItemId, f32 xzRange, f32 yRange) __attribute__((pcs("aapcs-vfp"))); -#define GiveItem_addr 0x3724DC -#define GiveItem ((GiveItem_proc)GiveItem_addr) +#define GiveItem ((GiveItem_proc)GAME_ADDR(0x3724DC)) typedef void (*Message_CloseTextbox_proc)(GlobalContext* globalCtx); -#define Message_CloseTextbox_addr 0x3725E0 -#define Message_CloseTextbox ((Message_CloseTextbox_proc)Message_CloseTextbox_addr) +#define Message_CloseTextbox ((Message_CloseTextbox_proc)GAME_ADDR(0x3725E0)) typedef void (*SetupItemInWater_proc)(Player* player, GlobalContext* globalCtx); -#define SetupItemInWater_addr 0x354894 -#define SetupItemInWater ((SetupItemInWater_proc)SetupItemInWater_addr) +#define SetupItemInWater ((SetupItemInWater_proc)GAME_ADDR(0x354894)) typedef void (*Health_ChangeBy_proc)(GlobalContext* arg1, u32 arg2); -#define Health_ChangeBy_addr 0x352DBC -#define Health_ChangeBy ((Health_ChangeBy_proc)Health_ChangeBy_addr) +#define Health_ChangeBy ((Health_ChangeBy_proc)GAME_ADDR(0x352DBC)) typedef void (*PlaySFX_proc)(u32 sfxId, Vec3f* pos, u32 token, f32* freqScale, f32* a4, s8* reverbAdd); -#define PlaySFX_addr 0x37547C -#define PlaySFX ((PlaySFX_proc)PlaySFX_addr) +#define PlaySFX ((PlaySFX_proc)GAME_ADDR(0x37547C)) typedef void (*Flags_SetSwitch_proc)(GlobalContext* globalCtx, u32 flag); -#define Flags_SetSwitch_addr 0x375C10 -#define Flags_SetSwitch ((Flags_SetSwitch_proc)Flags_SetSwitch_addr) +#define Flags_SetSwitch ((Flags_SetSwitch_proc)GAME_ADDR(0x375C10)) typedef u32 (*Flags_GetSwitch_proc)(GlobalContext* globalCtx, u32 flag); -#define Flags_GetSwitch_addr 0x36E864 -#define Flags_GetSwitch ((Flags_GetSwitch_proc)Flags_GetSwitch_addr) +#define Flags_GetSwitch ((Flags_GetSwitch_proc)GAME_ADDR(0x36E864)) typedef u32 (*Flags_GetCollectible_proc)(GlobalContext* globalCtx, u32 flag); -#define Flags_GetCollectible_addr 0x36405C -#define Flags_GetCollectible ((Flags_GetCollectible_proc)Flags_GetCollectible_addr) +#define Flags_GetCollectible ((Flags_GetCollectible_proc)GAME_ADDR(0x36405C)) typedef void (*Player_SetEquipmentData_proc)(GlobalContext* globalCtx, Player* player); -#define Player_SetEquipmentData_addr 0x34913C -#define Player_SetEquipmentData ((Player_SetEquipmentData_proc)Player_SetEquipmentData_addr) +#define Player_SetEquipmentData ((Player_SetEquipmentData_proc)GAME_ADDR(0x34913C)) typedef s32 (*BossChallenge_IsActive_proc)(void); -#define BossChallenge_IsActive_addr 0x35B164 -#define BossChallenge_IsActive ((BossChallenge_IsActive_proc)BossChallenge_IsActive_addr) +#define BossChallenge_IsActive ((BossChallenge_IsActive_proc)GAME_ADDR(0x35B164)) typedef s32 (*Audio_PlayActorSfx2_proc)(Actor* actor, s32 sfxID); -#define Audio_PlayActorSfx2_addr 0x375BCC -#define Audio_PlayActorSfx2 ((Audio_PlayActorSfx2_proc)Audio_PlayActorSfx2_addr) +#define Audio_PlayActorSfx2 ((Audio_PlayActorSfx2_proc)GAME_ADDR(0x375BCC)) typedef s32 (*Model_GetMeshGroupCount_proc)(SkeletonAnimationModel* skelAnimeModel); -#define Model_GetMeshGroupCount ((Model_GetMeshGroupCount_proc)0x2BB71C) +#define Model_GetMeshGroupCount ((Model_GetMeshGroupCount_proc)GAME_ADDR(0x2BB71C)) typedef s32 (*Model_IsMeshGroupUsed_proc)(SkeletonAnimationModel* skelAnimeModel, s32 param); -#define Model_IsMeshGroupUsed ((Model_IsMeshGroupUsed_proc)0x4C6880) +#define Model_IsMeshGroupUsed ((Model_IsMeshGroupUsed_proc)GAME_ADDR(0x4C6880)) typedef void (*Model_EnableMeshGroupByIndex_proc)(SkeletonAnimationModel* skel, u32 index); -#define Model_EnableMeshGroupByIndex ((Model_EnableMeshGroupByIndex_proc)0x37266C) +#define Model_EnableMeshGroupByIndex ((Model_EnableMeshGroupByIndex_proc)GAME_ADDR(0x37266C)) typedef void (*Model_DisableMeshGroupByIndex_proc)(SkeletonAnimationModel* skel, u32 index); -#define Model_DisableMeshGroupByIndex ((Model_DisableMeshGroupByIndex_proc)0x36932C) +#define Model_DisableMeshGroupByIndex ((Model_DisableMeshGroupByIndex_proc)GAME_ADDR(0x36932C)) typedef s32 (*Player_InBlockingCsMode_proc)(GlobalContext* globalCtx, Player* player); -#define Player_InBlockingCsMode ((Player_InBlockingCsMode_proc)0x35DB20) +#define Player_InBlockingCsMode ((Player_InBlockingCsMode_proc)GAME_ADDR(0x35DB20)) typedef u32 (*PauseContext_GetState_proc)(void); -#define PauseContext_GetState ((PauseContext_GetState_proc)0x3695F8) +#define PauseContext_GetState ((PauseContext_GetState_proc)GAME_ADDR(0x3695F8)) typedef s32 (*Camera_CheckWater_proc)(Camera* camera); -#define Camera_CheckWater ((Camera_CheckWater_proc)0x2D06A0) +#define Camera_CheckWater ((Camera_CheckWater_proc)GAME_ADDR(0x2D06A0)) typedef void (*Camera_UpdateInterface_proc)(u32 flags); -#define Camera_UpdateInterface ((Camera_UpdateInterface_proc)0x330D84) +#define Camera_UpdateInterface ((Camera_UpdateInterface_proc)GAME_ADDR(0x330D84)) typedef f32 (*Camera_BGCheckInfo_proc)(Camera* camera, Vec3f* from, CamColChk* to); -#define Camera_BGCheckInfo ((Camera_BGCheckInfo_proc)0x3553FC) +#define Camera_BGCheckInfo ((Camera_BGCheckInfo_proc)GAME_ADDR(0x3553FC)) typedef s32 (*Quake_Update_proc)(Camera* camera, ShakeInfo* camShake); -#ifdef Version_EUR - #define Quake_Update_addr 0x4787E8 -#else - #define Quake_Update_addr 0x4787C8 -#endif -#define Quake_Update ((Quake_Update_proc)Quake_Update_addr) +#define Quake_Update ((Quake_Update_proc)GAME_ADDR(0x4787C8)) typedef s16 (*Camera_GetCamDataId_proc)(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId); -#ifdef Version_EUR - #define Camera_GetCamDataId_addr 0x47BFF8 -#else - #define Camera_GetCamDataId_addr 0x47BFD8 -#endif -#define Camera_GetCamDataId ((Camera_GetCamDataId_proc)Camera_GetCamDataId_addr) +#define Camera_GetCamDataId ((Camera_GetCamDataId_proc)GAME_ADDR(0x47BFD8)) typedef s32 (*Animation_GetLastFrame_proc)(SkelAnime* anime, s32 animation_index); -#define Animation_GetLastFrame_addr 0x36AE14 -#define Animation_GetLastFrame ((Animation_GetLastFrame_proc)Animation_GetLastFrame_addr) +#define Animation_GetLastFrame ((Animation_GetLastFrame_proc)GAME_ADDR(0x36AE14)) typedef void (*Animation_Change_proc)(SkelAnime* anime, s32 animation_index, f32 play_speed, f32 start_frame, f32 end_frame, f32 morph_frames, s32 mode) __attribute__((pcs("aapcs-vfp"))); -#define Animation_Change_addr 0x375C08 -#define Animation_Change ((Animation_Change_proc)Animation_Change_addr) +#define Animation_Change ((Animation_Change_proc)GAME_ADDR(0x375C08)) typedef void (*EffectSsDeadDb_Spawn_proc)(GlobalContext* globalCtx, Vec3f* position, Vec3f* velocity, Vec3f* acceleration, s16 scale, s16 scale_step, s16 prim_r, s16 prim_g, s16 prim_b, s16 prim_a, s16 env_r, s16 env_g, s16 env_b, s16 unused, s32 frame_duration, s16 play_sound); -#define EffectSsDeadDb_Spawn_addr 0x3642F4 -#define EffectSsDeadDb_Spawn ((EffectSsDeadDb_Spawn_proc)EffectSsDeadDb_Spawn_addr) +#define EffectSsDeadDb_Spawn ((EffectSsDeadDb_Spawn_proc)GAME_ADDR(0x3642F4)) typedef void (*SaveGame_proc)(GlobalContext* globalCtx, u8 isSaveFileCreation); -#define SaveGame_addr 0x2FDAC8 -#define SaveGame ((SaveGame_proc)SaveGame_addr) +#define SaveGame ((SaveGame_proc)GAME_ADDR(0x2FDAC8)) typedef s32 (*Message_GetState_proc)(void); -#define Message_GetState ((Message_GetState_proc)0x3769d8) +#define Message_GetState ((Message_GetState_proc)GAME_ADDR(0x3769d8)) #endif //_Z3D_H_ diff --git a/code/include/z3D/z3Dactor.h b/code/include/z3D/z3Dactor.h index 13e5075d..274c248e 100644 --- a/code/include/z3D/z3Dactor.h +++ b/code/include/z3D/z3Dactor.h @@ -336,23 +336,22 @@ void Actor_Kill(Actor* actor); #define gActorOverlayTable ((ActorOverlay*)0x50CD84) typedef u32 (*Actor_HasParent_proc)(Actor* actor, struct GlobalContext* globalCtx); -#define Actor_HasParent_addr 0x371E40 -#define Actor_HasParent ((Actor_HasParent_proc)Actor_HasParent_addr) +#define Actor_HasParent ((Actor_HasParent_proc)GAME_ADDR(0x371E40)) typedef f32 (*Actor_WorldDistXYZToActor_proc)(Actor* a, Actor* b) __attribute__((pcs("aapcs-vfp"))); -#define Actor_WorldDistXYZToActor ((Actor_WorldDistXYZToActor_proc)0x3306C4) +#define Actor_WorldDistXYZToActor ((Actor_WorldDistXYZToActor_proc)GAME_ADDR(0x3306C4)) typedef void (*ActorShape_Init_proc)(ActorShape* shape, f32 yOffset, void* shadowDrawFunc, f32 shadowScale) __attribute__((pcs("aapcs-vfp"))); -#define ActorShape_Init ((ActorShape_Init_proc)0x372D4C) +#define ActorShape_Init ((ActorShape_Init_proc)GAME_ADDR(0x372D4C)) typedef void (*Actor_SetFeetPos_proc)(Actor* actor, nn_math_MTX34* mtx, int param_3, int param_4, Vec3f* param_5, int param_6, Vec3f* param_7); -#define Actor_SetFeetPos ((Actor_SetFeetPos_proc)0x34CBB4) +#define Actor_SetFeetPos ((Actor_SetFeetPos_proc)GAME_ADDR(0x34CBB4)) typedef void (*Actor_UpdateBgCheckInfo_proc)(struct GlobalContext* globalCtx, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius, f32 ceilingCheckHeight, s32 flags) __attribute__((pcs("aapcs-vfp"))); -#define Actor_UpdateBgCheckInfo ((Actor_UpdateBgCheckInfo_proc)0x376340) +#define Actor_UpdateBgCheckInfo ((Actor_UpdateBgCheckInfo_proc)GAME_ADDR(0x376340)) #endif diff --git a/code/include/z3D/z3Dcollision_check.h b/code/include/z3D/z3Dcollision_check.h index e35a89cc..4e1f55ad 100644 --- a/code/include/z3D/z3Dcollision_check.h +++ b/code/include/z3D/z3Dcollision_check.h @@ -99,21 +99,21 @@ typedef struct { _Static_assert(sizeof(ColliderCylinderInit) == 0x38, "ColliderCylinderInit size"); typedef void (*Collider_InitCylinder_proc)(struct GlobalContext* globalCtx, ColliderCylinder* collider); -#define Collider_InitCylinder ((Collider_InitCylinder_proc)0x353DD0) +#define Collider_InitCylinder ((Collider_InitCylinder_proc)GAME_ADDR(0x353DD0)) typedef void (*Collider_SetCylinder_proc)(struct GlobalContext* globalCtx, ColliderCylinder* collider, struct Actor* actor, void* cylinderInitData); -#define Collider_SetCylinder ((Collider_SetCylinder_proc)0x353D24) +#define Collider_SetCylinder ((Collider_SetCylinder_proc)GAME_ADDR(0x353D24)) typedef void (*Collider_UpdateCylinder_proc)(struct Actor* actor, ColliderCylinder* collider); -#define Collider_UpdateCylinder ((Collider_UpdateCylinder_proc)0x37632C) +#define Collider_UpdateCylinder ((Collider_UpdateCylinder_proc)GAME_ADDR(0x37632C)) typedef void (*CollisionCheck_SetOC_proc)(struct GlobalContext* globalCtx, struct CollisionCheckContext* colChkCtx, void* collider); -#define CollisionCheck_SetOC ((CollisionCheck_SetOC_proc)0x3762A4) +#define CollisionCheck_SetOC ((CollisionCheck_SetOC_proc)GAME_ADDR(0x3762A4)) typedef void (*CollisionCheck_SetAC_proc)(struct GlobalContext* globalCtx, struct CollisionCheckContext* colChkCtx, void* collider); -#define CollisionCheck_SetAC ((CollisionCheck_SetAC_proc)0x376168) +#define CollisionCheck_SetAC ((CollisionCheck_SetAC_proc)GAME_ADDR(0x376168)) #endif //_Z3DCOLLISION_CHECK_H_ diff --git a/code/include/z3D/z3Dmath.h b/code/include/z3D/z3Dmath.h index 0b78e67e..f83e5e88 100644 --- a/code/include/z3D/z3Dmath.h +++ b/code/include/z3D/z3Dmath.h @@ -2,19 +2,17 @@ #define _Z3DMATH_H_ typedef f32 (*Math_SinS_proc)(s16 angle) __attribute__((pcs("aapcs-vfp"))); -#define Math_SinS ((Math_SinS_proc)0x2CFCA0) +#define Math_SinS ((Math_SinS_proc)GAME_ADDR(0x2CFCA0)) typedef f32 (*Math_CosS_proc)(s16 angle) __attribute__((pcs("aapcs-vfp"))); -#define Math_CosS ((Math_CosS_proc)0x338F60) +#define Math_CosS ((Math_CosS_proc)GAME_ADDR(0x338F60)) typedef void (*Matrix_Multiply_proc)(nn_math_MTX34* dst, nn_math_MTX34* lhs, nn_math_MTX44* rhs) __attribute__((pcs("aapcs-vfp"))); -#define Matrix_Multiply_addr 0x36C174 -#define Matrix_Multiply ((Matrix_Multiply_proc)Matrix_Multiply_addr) +#define Matrix_Multiply ((Matrix_Multiply_proc)GAME_ADDR(0x36C174)) typedef void (*Matrix_UpdatePosition_proc)(nn_math_MTX34* dst, nn_math_MTX34* src, Vec3f* vec) __attribute__((pcs("aapcs-vfp"))); -#define Matrix_UpdatePosition_addr 0x372070 -#define Matrix_UpdatePosition ((Matrix_UpdatePosition_proc)Matrix_UpdatePosition_addr) +#define Matrix_UpdatePosition ((Matrix_UpdatePosition_proc)GAME_ADDR(0x372070)) #endif diff --git a/code/oot.ld b/code/oot.ld index 12eb6eab..a64dffe4 100644 --- a/code/oot.ld +++ b/code/oot.ld @@ -956,14 +956,14 @@ SECTIONS *(.patch_GKSetDurability) } - .patch_GiveItemMasterSword 0x376C18 : { - *(.patch_GiveItemMasterSword) - } - .patch_GiantsKnifeWithoutKokiriSword 0x376BEC : { *(.patch_GiantsKnifeWithoutKokiriSword) } + .patch_GiveItemMasterSword 0x376C18 : { + *(.patch_GiveItemMasterSword) + } + .patch_NoLensOfTruthNaviText 0x37798C : { *(.patch_NoLensOfTruthNaviText) } @@ -1240,347 +1240,347 @@ SECTIONS *(.patch_SleepQueryCallback) } - .patch_OcarinaNoteButtonsPress 0x41AAAC : { + .patch_OcarinaNoteButtonsPress ((DEFINED(_EUR_)) ? 0x41AAD0 : 0x41AAAC) : { * (.patch_OcarinaNoteButtonsPress) } - .patch_CurseTrapDizzyStick 0x41AB24 : { + .patch_CurseTrapDizzyStick ((DEFINED(_EUR_)) ? 0x41AB48 : 0x41AB24) : { *(.patch_CurseTrapDizzyStick) } - .patch_CurseTrapDizzyButtons 0x41ABDC : { + .patch_CurseTrapDizzyButtons ((DEFINED(_EUR_)) ? 0x41AC00 : 0x41ABDC) : { *(.patch_CurseTrapDizzyButtons) } - .patch_PermadeathSkipMenu 0x41C980 : { + .patch_PermadeathSkipMenu ((DEFINED(_EUR_)) ? 0x41C9A4 : 0x41C980) : { *(.patch_PermadeathSkipMenu) } - .patch_SaveMenuIgnoreOpen 0x42EC00 : { + .patch_SaveMenuIgnoreOpen ((DEFINED(_EUR_)) ? 0x42EC24 : 0x42EC00) : { *(.patch_SaveMenuIgnoreOpen) } - .patch_ItemsMenuDraw 0x434C08 : { + .patch_ItemsMenuDraw ((DEFINED(_EUR_)) ? 0x434C2C : 0x434C08) : { *(.patch_ItemsMenuDraw) } - .patch_GearMenuEmptySlot 0x438C00 : { + .patch_GearMenuEmptySlot ((DEFINED(_EUR_)) ? 0x438C20 : 0x438C00) : { *(.patch_GearMenuEmptySlot) } - .patch_BeforeLoadGame 0x447380 : { + .patch_BeforeLoadGame ((DEFINED(_EUR_)) ? 0x4473A0 : 0x447380) : { *(.patch_BeforeLoadGame) } - .patch_AfterLoadGame 0x449F00 : { + .patch_AfterLoadGame ((DEFINED(_EUR_)) ? 0x449F20 : 0x449F00) : { *(.patch_AfterLoadGame) } - .patch_DontSetMotionSetting 0x447410 : { + .patch_DontSetMotionSetting ((DEFINED(_EUR_)) ? 0x447430 : 0x447410) : { *(.patch_DontSetMotionSetting) } - .patch_OverrideFogDuringGameplayInit 0x4485B4 : { + .patch_OverrideFogDuringGameplayInit ((DEFINED(_EUR_)) ? 0x4485D4 : 0x4485B4) : { *(.patch_OverrideFogDuringGameplayInit) } - .patch_CheckForWeirdEggHatchGameplayInit 0x448A64 : { + .patch_CheckForWeirdEggHatchGameplayInit ((DEFINED(_EUR_)) ? 0x448A84 : 0x448A64) : { *(.patch_CheckForWeirdEggHatchGameplayInit) } - .patch_CheckForPocketCuccoHatchGameplayInit 0x448A80 : { + .patch_CheckForPocketCuccoHatchGameplayInit ((DEFINED(_EUR_)) ? 0x448AA0 : 0x448A80) : { *(.patch_CheckForPocketCuccoHatchGameplayInit) } - .patch_InitSceneMirrorWorld 0x4490DC : { + .patch_InitSceneMirrorWorld ((DEFINED(_EUR_)) ? 0x4490FC : 0x4490DC) : { *(.patch_InitSceneMirrorWorld) } - .patch_InitSceneEntranceOverride 0x449190 : { + .patch_InitSceneEntranceOverride ((DEFINED(_EUR_)) ? 0x4491B0 : 0x449190) : { *(.patch_InitSceneEntranceOverride) } - .patch_InitSceneClearExtendedObjects 0x449218 : { + .patch_InitSceneClearExtendedObjects ((DEFINED(_EUR_)) ? 0x449238 : 0x449218) : { *(.patch_InitSceneClearExtendedObjects) } - .patch_SaveFile_Init 0x449A04 : { + .patch_SaveFile_Init ((DEFINED(_EUR_)) ? 0x449A24 : 0x449A04) : { *(.patch_SaveFile_Init) } - .patch_SavewarpSetRespawnFlag 0x449E40 : { + .patch_SavewarpSetRespawnFlag ((DEFINED(_EUR_)) ? 0x449E60 : 0x449E40) : { *(.patch_SavewarpSetRespawnFlag) } - .patch_Multiplayer_OnLoadFile 0x449EFC : { + .patch_Multiplayer_OnLoadFile ((DEFINED(_EUR_)) ? 0x449F1C : 0x449EFC) : { *(.patch_Multiplayer_OnLoadFile) } - .patch_GetCustomMessageEntryTwo 0x44D564 : { + .patch_GetCustomMessageEntryTwo ((DEFINED(_EUR_)) ? 0x44D584 : 0x44D564) : { *(.patch_GetCustomMessageEntryTwo) } - .patch_GetCustomMessageTextTwo 0x44D5A4 : { + .patch_GetCustomMessageTextTwo ((DEFINED(_EUR_)) ? 0x44D5C4 : 0x44D5A4) : { *(.patch_GetCustomMessageTextTwo) } - .patch_GameplayDestroy 0x44E294 : { + .patch_GameplayDestroy ((DEFINED(_EUR_)) ? 0x44E2B4 : 0x44E294) : { *(.patch_GameplayDestroy) } - .patch_ExtendedObjectClear 0x44E754 : { + .patch_ExtendedObjectClear ((DEFINED(_EUR_)) ? 0x44E774 : 0x44E754) : { *(.patch_ExtendedObjectClear) } - .patch_Multiplayer_UpdatePrevActorFlags 0x44E878 : { + .patch_Multiplayer_UpdatePrevActorFlags ((DEFINED(_EUR_)) ? 0x44E898 : 0x44E878) : { *(.patch_Multiplayer_UpdatePrevActorFlags) } - .patch_PlayEntranceCutscene 0x44F068 : { + .patch_PlayEntranceCutscene ((DEFINED(_EUR_)) ? 0x44F088 : 0x44F068) : { *(.patch_PlayEntranceCutscene) } - .patch_RequiemLocation 0x44F104 : { + .patch_RequiemLocation ((DEFINED(_EUR_)) ? 0x44F124 : 0x44F104) : { *(.patch_RequiemLocation) } - .patch_NocturneLocation 0x44F12C : { + .patch_NocturneLocation ((DEFINED(_EUR_)) ? 0x44F14C : 0x44F12C) : { *(.patch_NocturneLocation) } - .patch_SariasGift 0x44F188 : { + .patch_SariasGift ((DEFINED(_EUR_)) ? 0x44F1A8 : 0x44F188) : { *(.patch_SariasGift) } - .patch_LACSConditionOne 0x44F1D4 : { + .patch_LACSConditionOne ((DEFINED(_EUR_)) ? 0x44F1F4 : 0x44F1D4) : { *(.patch_LACSConditionOne) } - .patch_LACSConditionTwo 0x44F20C : { + .patch_LACSConditionTwo ((DEFINED(_EUR_)) ? 0x44F22C : 0x44F20C) : { *(.patch_LACSConditionTwo) } - .patch_BossChallenge_Enter 0x44F634 : { + .patch_BossChallenge_Enter ((DEFINED(_EUR_)) ? 0x44F654 : 0x44F634) : { *(.patch_BossChallenge_Enter) } - .patch_SetSavewarpEntrance 0x44FBE4 : { + .patch_SetSavewarpEntrance ((DEFINED(_EUR_)) ? 0x44FC04 : 0x44FBE4) : { *(.patch_SetSavewarpEntrance) } - .patch_LullabyCheckFlag 0x44FD54 : { + .patch_LullabyCheckFlag ((DEFINED(_EUR_)) ? 0x44FD74 : 0x44FD54) : { *(.patch_LullabyCheckFlag) } - .patch_LoadFileSwordless 0x44FD98 : { + .patch_LoadFileSwordless ((DEFINED(_EUR_)) ? 0x44FDB8 : 0x44FD98) : { *(.patch_LoadFileSwordless) } - .patch_OpenSaveDontSpoilTradeItems 0x44FDF8 : { + .patch_OpenSaveDontSpoilTradeItems ((DEFINED(_EUR_)) ? 0x44FE18 : 0x44FDF8) : { *(.patch_OpenSaveDontSpoilTradeItems) } - .patch_OnActorSetup_SceneChange 0x452250 : { + .patch_OnActorSetup_SceneChange ((DEFINED(_EUR_)) ? 0x452270 : 0x452250) : { *(.patch_OnActorSetup_SceneChange) } - .patch_AfterActorSetup_SceneChange 0x4522B8 : { + .patch_AfterActorSetup_SceneChange ((DEFINED(_EUR_)) ? 0x4522D8 : 0x4522B8) : { *(.patch_AfterActorSetup_SceneChange) } - .patch_before_GlobalContext_Update 0x452390 : { + .patch_before_GlobalContext_Update ((DEFINED(_EUR_)) ? 0x4523B0 : 0x452390) : { *(.patch_before_GlobalContext_Update) } - .patch_after_GlobalContext_Update 0x452434 : { + .patch_after_GlobalContext_Update ((DEFINED(_EUR_)) ? 0x452454 : 0x452434) : { *(.patch_after_GlobalContext_Update) } - .patch_FixItemsMenuSlotDuplication 0x456B90 : { + .patch_FixItemsMenuSlotDuplication ((DEFINED(_EUR_)) ? 0x456BB0 : 0x456B90) : { *(.patch_FixItemsMenuSlotDuplication) } - .patch_GameOverDontSpoilTradeItems 0x458BE0 : { + .patch_GameOverDontSpoilTradeItems ((DEFINED(_EUR_)) ? 0x458C00 : 0x458BE0) : { *(.patch_GameOverDontSpoilTradeItems) } - .patch_DeathHandleBButton 0x458CA8 : { + .patch_DeathHandleBButton ((DEFINED(_EUR_)) ? 0x458CC8 : 0x458CA8) : { *(.patch_DeathHandleBButton) } - .patch_PermadeathForceQuit 0x458E20 : { + .patch_PermadeathForceQuit ((DEFINED(_EUR_)) ? 0x458E40 : 0x458E20) : { *(.patch_PermadeathForceQuit) } - .patch_SetGameOverEntrance 0x458E3C : { + .patch_SetGameOverEntrance ((DEFINED(_EUR_)) ? 0x458E5C : 0x458E3C) : { *(.patch_SetGameOverEntrance) } - .patch_SetGameOverRespawnFlag 0x458EF0 : { + .patch_SetGameOverRespawnFlag ((DEFINED(_EUR_)) ? 0x458F10 : 0x458EF0) : { *(.patch_SetGameOverRespawnFlag) } - .patch_InterfaceDrawDontSpoilTradeItems 0x45A17C : { + .patch_InterfaceDrawDontSpoilTradeItems ((DEFINED(_EUR_)) ? 0x45A19C : 0x45A17C) : { *(.patch_InterfaceDrawDontSpoilTradeItems) } - .patch_TimerExpiration 0x45A948 : { + .patch_TimerExpiration ((DEFINED(_EUR_)) ? 0x45A968 : 0x45A948) : { *(.patch_TimerExpiration) } - .patch_Timer2TickSound 0x45A9B4 : { + .patch_Timer2TickSound ((DEFINED(_EUR_)) ? 0x45A9D4 : 0x45A9B4) : { *(.patch_Timer2TickSound) } - .patch_SunsSongEndCloseTextbox 0x45B514 : { + .patch_SunsSongEndCloseTextbox ((DEFINED(_EUR_)) ? 0x45B534 : 0x45B514) : { *(.patch_SunsSongEndCloseTextbox) } - .patch_SetSunsSongRespawnFlag 0x45B660 : { + .patch_SetSunsSongRespawnFlag ((DEFINED(_EUR_)) ? 0x45B680 : 0x45B660) : { *(.patch_SetSunsSongRespawnFlag) } - .patch_BossChallenge_ExitMenu 0x45CCA4 : { + .patch_BossChallenge_ExitMenu ((DEFINED(_EUR_)) ? 0x45CCC4 : 0x45CCA4) : { *(.patch_BossChallenge_ExitMenu) } - .patch_StoreChildBButtonEquip 0x45F20C : { + .patch_StoreChildBButtonEquip ((DEFINED(_EUR_)) ? 0x45F22C : 0x45F20C) : { *(.patch_StoreChildBButtonEquip) } - .patch_BecomeAdult 0x45F230 : { + .patch_BecomeAdult ((DEFINED(_EUR_)) ? 0x45F250 : 0x45F230) : { *(.patch_BecomeAdult) } - .patch_AlwaysRestoreChildEquips 0x45F3B0 : { + .patch_AlwaysRestoreChildEquips ((DEFINED(_EUR_)) ? 0x45F3D0 : 0x45F3B0) : { *(.patch_AlwaysRestoreChildEquips) } - .patch_ChildDontEquipSwordSlotByDefault 0x45F49C : { + .patch_ChildDontEquipSwordSlotByDefault ((DEFINED(_EUR_)) ? 0x45F4BC : 0x45F49C) : { *(.patch_ChildDontEquipSwordSlotByDefault) } - .patch_OnActorSetup_RoomChange 0x4613C4 : { + .patch_OnActorSetup_RoomChange ((DEFINED(_EUR_)) ? 0x4613E4 : 0x4613C4) : { *(.patch_OnActorSetup_RoomChange) } - .patch_AfterActorSetup_RoomChange 0x461434 : { + .patch_AfterActorSetup_RoomChange ((DEFINED(_EUR_)) ? 0x461454 : 0x461434) : { *(.patch_AfterActorSetup_RoomChange) } - .patch_ActorUpdate 0x461790 : { + .patch_ActorUpdate ((DEFINED(_EUR_)) ? 0x4617B0 : 0x461790) : { *(.patch_ActorUpdate) } - .patch_TitleCardUpdate 0x4618B8 : { + .patch_TitleCardUpdate ((DEFINED(_EUR_)) ? 0x4618D8 : 0x4618B8) : { *(.patch_TitleCardUpdate) } - .patch_ItemsMenuNumSprites 0x46B758 : { + .patch_ItemsMenuNumSprites ((DEFINED(_EUR_)) ? 0x46B778 : 0x46B758) : { *(.patch_ItemsMenuNumSprites) } - .patch_CheckForWeirdEggHatchKankyo 0x470D00 : { + .patch_CheckForWeirdEggHatchKankyo ((DEFINED(_EUR_)) ? 0x470D20 : 0x470D00) : { *(.patch_CheckForWeirdEggHatchKankyo) } - .patch_CheckForPocketCuccoHatchKankyo 0x470D1C : { + .patch_CheckForPocketCuccoHatchKankyo ((DEFINED(_EUR_)) ? 0x470D3C : 0x470D1C) : { *(.patch_CheckForPocketCuccoHatchKankyo) } - .patch_CriticalHealthCheckOne 0x4715B8 : { + .patch_CriticalHealthCheckOne ((DEFINED(_EUR_)) ? 0x4715D8 : 0x4715B8) : { *(.patch_CriticalHealthCheckOne) } - .patch_CriticalHealthCheckTwo 0x4716D4 : { + .patch_CriticalHealthCheckTwo ((DEFINED(_EUR_)) ? 0x4716F4 : 0x4716D4) : { *(.patch_CriticalHealthCheckTwo) } - .patch_EnableFW 0x476D1C : { + .patch_EnableFW ((DEFINED(_EUR_)) ? 0x476D3C : 0x476D1C) : { *(.patch_EnableFW) } - .patch_StoreTargetActorType 0x479984 : { + .patch_StoreTargetActorType ((DEFINED(_EUR_)) ? 0x4799A4 : 0x479984) : { *(.patch_StoreTargetActorType) } - .patch_TargetReticleColor 0x47B284 : { + .patch_TargetReticleColor ((DEFINED(_EUR_)) ? 0x47B2A4 : 0x47B284) : { *(.patch_TargetReticleColor) } - .patch_TargetPointerColor 0x47BAE8 : { + .patch_TargetPointerColor ((DEFINED(_EUR_)) ? 0x47BB08 : 0x47BAE8) : { *(.patch_TargetPointerColor) } - .patch_FWKeepWarpPoint 0x47C3C0 : { + .patch_FWKeepWarpPoint ((DEFINED(_EUR_)) ? 0x47C3E0 : 0x47C3C0) : { *(.patch_FWKeepWarpPoint) } - .patch_TurboTextAdvance 0x480928 : { + .patch_TurboTextAdvance ((DEFINED(_EUR_)) ? 0x480948 : 0x480928) : { *(.patch_TurboTextAdvance) } - .patch_SetBGMDayNight 0x483C88 : { + .patch_SetBGMDayNight ((DEFINED(_EUR_)) ? 0x483CA8 : 0x483C88) : { *(.patch_SetBGMDayNight) } - .patch_TurboTextClose 0x488214 : { + .patch_TurboTextClose ((DEFINED(_EUR_)) ? 0x488234 : 0x488214) : { *(.patch_TurboTextClose) } - .patch_WarpSongEntranceOverride 0x488850 : { + .patch_WarpSongEntranceOverride ((DEFINED(_EUR_)) ? 0x488870 : 0x488850) : { *(.patch_WarpSongEntranceOverride) } - .patch_SetFWPlayerParams 0x4911B8 : { + .patch_SetFWPlayerParams ((DEFINED(_EUR_)) ? 0x4911D8 : 0x4911B8) : { *(.patch_SetFWPlayerParams) } - .patch_SwapFaroresWind 0x49186C : { + .patch_SwapFaroresWind ((DEFINED(_EUR_)) ? 0x49188C : 0x49186C) : { *(.patch_SwapFaroresWind) } - .patch_SkipTimeTravelCutsceneTwo 0x4918C8 : { + .patch_SkipTimeTravelCutsceneTwo ((DEFINED(_EUR_)) ? 0x4918E8 : 0x4918C8) : { *(.patch_SkipTimeTravelCutsceneTwo) } - .patch_SwapAgeIgnoreSceneSetup 0x4918B0 : { + .patch_SwapAgeIgnoreSceneSetup ((DEFINED(_EUR_)) ? 0x4918D0 : 0x4918B0) : { *(.patch_SwapAgeIgnoreSceneSetup) } - .patch_DMTOwlEntranceOverride 0x492064 : { + .patch_DMTOwlEntranceOverride ((DEFINED(_EUR_)) ? 0x492084 : 0x492064) : { *(.patch_DMTOwlEntranceOverride) } - .patch_LHOwlEntranceOverride 0x492080 : { + .patch_LHOwlEntranceOverride ((DEFINED(_EUR_)) ? 0x4920A0 : 0x492080) : { *(.patch_LHOwlEntranceOverride) } - .patch_FairyUseHealAmount 0x4968B4 : { + .patch_FairyUseHealAmount ((DEFINED(_EUR_)) ? 0x4968D4 : 0x4968B4) : { *(.patch_FairyUseHealAmount) } - .patch_SendDroppedBottleContents 0x496A1C : { + .patch_SendDroppedBottleContents ((DEFINED(_EUR_)) ? 0x496A3C : 0x496A1C) : { *(.patch_SendDroppedBottleContents) } - .patch_ReturnFW 0x496B88 : { + .patch_ReturnFW ((DEFINED(_EUR_)) ? 0x496BA8 : 0x496B88) : { *(.patch_ReturnFW) } - .patch_SetSpecialVoidOutRespawnFlag 0x496C70 : { + .patch_SetSpecialVoidOutRespawnFlag ((DEFINED(_EUR_)) ? 0x496C90 : 0x496C70) : { *(.patch_SetSpecialVoidOutRespawnFlag) } - .patch_GanonBattleDeathWarp 0x496C98 : { + .patch_GanonBattleDeathWarp ((DEFINED(_EUR_)) ? 0x496CB8 : 0x496C98) : { *(.patch_GanonBattleDeathWarp) } - .patch_GanonRestoreMSOnDeath 0x496CB4 : { + .patch_GanonRestoreMSOnDeath ((DEFINED(_EUR_)) ? 0x496CD4 : 0x496CB4) : { *(.patch_GanonRestoreMSOnDeath) } - .patch_CriticalHealthCheckThree 0x49F294 : { + .patch_CriticalHealthCheckThree ((DEFINED(_EUR_)) ? 0x49F2B4 : 0x49F294) : { *(.patch_CriticalHealthCheckThree) } diff --git a/code/oot_e.ld b/code/oot_e.ld deleted file mode 100644 index f9da2397..00000000 --- a/code/oot_e.ld +++ /dev/null @@ -1,1677 +0,0 @@ -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(loader_patch) -SECTIONS -{ - . = 0x100000; - .patch_loader 0x100000 : { - *(.patch_loader) - } - - .patch_GrogSetTradedCojiroFlag 0x104C50 : { - *(.patch_GrogSetTradedCojiroFlag) - } - - .patch_MidoCheckDekuTreeClearTwo 0x105CD4 : { - *(.patch_MidoCheckDekuTreeClearTwo) - } - - .patch_ArmosCooldownTimer 0x10B41C : { - *(.patch_ArmosCooldownTimer) - } - - .patch_ArmosPushSpeed 0x10B5C4 : { - *(.patch_ArmosPushSpeed) - } - - .patch_ShortenRainbowBridgeCS 0x10B904 : { - *(.patch_ShortenRainbowBridgeCS) - } - - .patch_GrannyTextID 0x10DCD0 : { - *(.patch_GrannyTextID) - } - - .patch_LabScientistDontStartTimerAndSetFlag 0x112440 : { - *(.patch_LabScientistDontStartTimerAndSetFlag) - } - - .patch_BombchuPurchaseableCheck 0x112ED0 : { - *(.patch_BombchuPurchaseableCheck) - } - - .patch_PoeCollectorGetFirstTextbox 0x113844 : { - *(.patch_PoeCollectorGetFirstTextbox) - } - - .patch_ItemEtceteraModelDraw 0x117080 : { - *(.patch_ItemEtceteraModelDraw) - } - - .patch_FlyingPotCollision 0x11DB34 : { - *(.patch_FlyingPotCollision) - } - - .patch_DodongoAfterSwallowBomb 0x11E4B8 : { - *(.patch_DodongoAfterSwallowBomb) - } - - .patch_SariasSongItemGive 0x12C84C : { - *(.patch_SariasSongItemGive) - } - - .patch_SariasSongLocation 0x12C8F8 : { - *(.patch_SariasSongLocation) - } - - .patch_SkulltulaRewardOne 0x12CC68 : { - *(.patch_SkulltulaRewardOne) - } - - .patch_SkulltulaRewardTwo 0x12CD38 : { - *(.patch_SkulltulaRewardTwo) - } - - .patch_MedigoronCheckFlagOne 0x13024C : { - *(.patch_MedigoronCheckFlagOne) - } - - .patch_MedigoronGetCustomText 0x130258 : { - *(.patch_MedigoronGetCustomText) - } - - .patch_MedigoronCheckFlagTwo 0x1302C4 : { - *(.patch_MedigoronCheckFlagTwo) - } - - .patch_BeanDaddyModifyBeansBought 0x130CEC : { - *(.patch_BeanDaddyModifyBeansBought) - } - - .patch_BiggoronDontSetBGSFlag 0x133F7C : { - *(.patch_BiggoronDontSetBGSFlag) - } - - .patch_KingZoraDontStartTimer 0x134D7C : { - *(.patch_KingZoraDontStartTimer) - } - - .patch_SongOfStormsLocation 0x1427E0 : { - *(.patch_SongOfStormsLocation) - } - - .patch_JabuSwitchRutoCheck 0x143AC8 : { - *(.patch_JabuSwitchRutoCheck) - } - - .patch_OwlMagicCheck 0x144B44 : { - *(.patch_OwlMagicCheck) - } - - .patch_MedigoronItemOverrideOne 0x14D95C : { - *(.patch_MedigoronItemOverrideOne) - } - - .patch_BeanDaddyPurchase 0x14EDA8 : { - *(.patch_BeanDaddyPurchase) - } - - .patch_BeanDaddyModifyPrice 0x14EE98 : { - *(.patch_BeanDaddyModifyPrice) - } - - .patch_SkipTwinrovaQuarrelCutsceneOne 0x15273C : { - *(.patch_SkipTwinrovaQuarrelCutsceneOne) - } - - .patch_FairyPickupHealAmount 0x15CA4C : { - *(.patch_FairyPickupHealAmount) - } - - .patch_RandomGsLoc_SkipSoilJingle 0x15DBD8 : { - *(.patch_RandomGsLoc_SkipSoilJingle) - } - - .patch_GrannyBottleCheck 0x161044 : { - *(.patch_GrannyBottleCheck) - } - - .patch_GrannyItemOverrideOne 0x161094 : { - *(.patch_GrannyItemOverrideOne) - } - - .patch_ScrubStickUpgradeOne 0x161898 : { - *(.patch_ScrubStickUpgradeOne) - } - - .patch_ScrubNutUpgradeOne 0x1618EC : { - *(.patch_ScrubNutUpgradeOne) - } - - .patch_EnKoInitCheckForest_165834 0x165834 : { - *(.patch_EnKoInitCheckForest_165834) - } - - .patch_EnKoInitCheckForest_165878 0x165878 : { - *(.patch_EnKoInitCheckForest_165878) - } - - .patch_EnKoInitCheckForest_1658C0 0x1658C0 : { - *(.patch_EnKoInitCheckForest_1658C0) - } - - .patch_EnKoInitCheckForest_1658F0 0x1658F0 : { - *(.patch_EnKoInitCheckForest_1658F0) - } - - .patch_KingZoraCheckMovedFlag 0x165A60 : { - *(.patch_KingZoraCheckMovedFlag) - } - - .patch_MidoCheckSpawn 0x166154 : { - *(.patch_MidoCheckSpawn) - } - - .patch_MidoCheckDekuTreeClearOne 0x16623C : { - *(.patch_MidoCheckDekuTreeClearOne) - } - - .patch_SariasSongCheckFlag 0x1686A0 : { - *(.patch_SariasSongCheckFlag) - } - - .patch_GrogCheckForShouldDespawn 0x16485C : { - *(.patch_GrogCheckForShouldDespawn) - } - - .patch_CheckFadoCanSpawnInLostWoods 0x1657EC : { - *(.patch_CheckFadoCanSpawnInLostWoods) - } - - .patch_RandomGsLoc_BlockSpawn_Tree 0x16C43C : { - *(.patch_RandomGsLoc_BlockSpawn_Tree) - } - - .patch_MedigoronSetRewardFlag 0x16C918 : { - *(.patch_MedigoronSetRewardFlag) - } - - .patch_MedigoronItemOverrideTwo 0x16C9BC : { - *(.patch_MedigoronItemOverrideTwo) - } - - .patch_MaskSalesmanBorrowMask 0x16D148 : { - *(patch_MaskSalesmanBorrowMask) - } - - .patch_KingZoraIgnoreSapphire 0x1736B8 : { - *(.patch_KingZoraIgnoreSapphire) - } - - .patch_MidoForestDialog 0x173944 : { - *(.patch_MidoForestDialog) - } - - .patch_SkipTimeTravelCutsceneOne 0x174DEC : { - *(.patch_SkipTimeTravelCutsceneOne) - } - - .patch_SkipTwinrovaQuarrelCutsceneTwo 0x176110 : { - *(.patch_SkipTwinrovaQuarrelCutsceneTwo) - } - - .patch_LostWoodsTargetCutscene 0x178058 : { - *(.patch_LostWoodsTargetCutscene) - } - - .patch_CarpenterBossDontNullExchangeItem 0x178BE4 : { - *(.patch_CarpenterBossDontNullExchangeItem) - } - - .patch_CarpenterBossSetTradedSawFlag 0x178D58 : { - *(.patch_CarpenterBossSetTradedSawFlag) - } - - .patch_AnjuCheckCuccoAmount 0x179420 : { - *(.patch_AnjuCheckCuccoAmount) - } - - .patch_FastOwlCutscenes 0x188584 : { - *(.patch_FastOwlCutscenes) - } - - .patch_BombchuShopInfinitePurchases 0x188D3C : { - *(.patch_BombchuShopInfinitePurchases) - } - - .patch_BusinessScrubTable 0x18A634 : { - *(.patch_BusinessScrubTable) - } - - .patch_CheckGerudoToken_18B368 0x18B368 : { - *(.patch_CheckGerudoToken_18B368) - } - - .patch_CheckGerudoToken_18B3A0 0x18B3A0 : { - *(.patch_CheckGerudoToken_18B3A0) - } - - .patch_CheckGerudoToken_18B3C0 0x18B3C0 : { - *(.patch_CheckGerudoToken_18B3C0) - } - - .patch_CheckGerudoToken_18B448 0x18B448 : { - *(.patch_CheckGerudoToken_18B448) - } - - .patch_CheckGerudoToken_18B6F4 0x18B6F4 : { - *(.patch_CheckGerudoToken_18B6F4) - } - - .patch_CheckGerudoToken_18B710 0x18B710 : { - *(.patch_CheckGerudoToken_18B710) - } - - .patch_EponasSongCheckFlag 0x18C56C : { - *(.patch_EponasSongCheckFlag) - } - - .patch_PreludeLocation 0x18D9FC : { - *(.patch_PreludeLocation) - } - - .patch_PoeCollectorCheckPoints 0x19091C : { - *(.patch_PoeCollectorCheckPoints) - } - - .patch_GoronShopPurchaseableCheck 0x19120C : { - *(.patch_GoronShopPurchaseableCheck) - } - - .patch_PlayerEditAndRetrieveCMB 0x191970 : { - *(.patch_PlayerEditAndRetrieveCMB) - } - - .patch_AdultItemsCMABsAsChild 0x191BB0 : { - *(.patch_AdultItemsCMABsAsChild) - } - - .patch_SetChildCustomTunic 0x191DB0 : { - *(.patch_SetChildCustomTunic) - } - - .patch_PlayerGetCustomTunicCMAB 0x191DD4 : { - *(.patch_PlayerGetCustomTunicCMAB) - } - - .patch_SkipDaruniaDanceOne 0x19493C : { - *(.patch_SkipDaruniaDanceOne) - } - - .patch_SkipDaruniaDanceTwo 0x194944 : { - *(.patch_SkipDaruniaDanceTwo) - } - - .patch_ChildRollingGoron 0x194B18 : { - *(.patch_ChildRollingGoron) - } - - .patch_BiggoronCheckBGSFlag 0x194DA0 : { - *(.patch_BiggoronCheckBGSFlag) - } - - .patch_ChildRollingGoronDontCheckBombBag 0x195414 : { - *(.patch_ChildRollingGoronDontCheckBombBag) - } - - .patch_AdultRollingGoronIgnoreMedallion 0x195450 : { - *(.patch_AdultRollingGoronIgnoreMedallion) - } - - .patch_AdultRollingGoronOne 0x195480 : { - *(.patch_AdultRollingGoronOne) - } - - .patch_AdultRollingGoronTwo 0x1954AC : { - *(.patch_AdultRollingGoronTwo) - } - - .patch_BiggoronGetTextId 0x1954F8 : { - *(.patch_BiggoronGetTextId) - } - - .patch_EponasSongCheckFlagTwo 0x195CFC : { - *(.patch_EponasSongCheckFlagTwo) - } - - .patch_AmyBlockCooldownTimer 0x196ECC : { - *(.patch_AmyBlockCooldownTimer) - } - - .patch_AmyBlockSpeed 0x196F3C : { - *(.patch_AmyBlockSpeed) - } - - .patch_DampeChest 0x19A420 : { - *(.patch_DampeChest) - } - - .patch_PierreSoftlockFixOne 0x19C734 : { - *(.patch_PierreSoftlockFixOne) - } - - .patch_RutoBlueWarpOverride 0x1A1900 : { - *(.patch_RutoBlueWarpOverride) - } - - .patch_KotakeDontPlayBattleMusic 0x1A8218 : { - *(.patch_KotakeDontPlayBattleMusic) - } - - .patch_GossipStoneAddSariaHint 0x1B3968 : { - *(.patch_GossipStoneAddSariaHint) - } - - .patch_ReadGossipStoneHints 0x1B3A44 : { - *(.patch_ReadGossipStoneHints) - } - - .patch_SkipJabuOpeningCutscene 0x1B583C : { - *(.patch_SkipJabuOpeningCutscene) - } - - .patch_KingZoraSecondTunic 0x1B6A18 : { - *(.patch_KingZoraSecondTunic) - } - - .patch_KingZoraGiveTunic 0x1B6A64 : { - *(.patch_KingZoraGiveTunic) - } - - .patch_MidoCheckDekuTreeClearThree 0x1B7414 : { - *(.patch_MidoCheckDekuTreeClearThree) - } - - .patch_FishingNewRecord 0x1C3AA4 : { - *(.patch_FishingNewRecord) - } - - .patch_FishingSizeIgnoreChild 0x1C3DFC : { - *(.patch_FishingSizeIgnoreChild) - } - - .patch_FishingSizeIgnoreAdult 0x1C3E40 : { - *(.patch_FishingSizeIgnoreAdult) - } - - .patch_BabyDodongoAfterSwallowBomb 0x1C42DC : { - *(.patch_BabyDodongoAfterSwallowBomb) - } - - .patch_BiggoronAfterGiveItem 0x1C4E4C : { - *(.patch_BiggoronAfterGiveItem) - } - - .patch_KingZoraSetTradedPrescriptionFlag 0x1C52A0 : { - *(.patch_KingZoraSetTradedPrescriptionFlag) - } - - .patch_TruthSpinnerSpeed 0x1CD814 : { - *(.patch_TruthSpinnerSpeed) - } - - .patch_DemoEffectStoneDraw 0x1D209C : { - *(.patch_DemoEffectStoneDraw) - } - - .patch_ChestIceSmoke 0x1D5E5C : { - *(.patch_ChestIceSmoke) - } - - .patch_CheckGerudoToken_1D7AD4 0x1D7AD4 : { - *(.patch_CheckGerudoToken_1D7AD4) - } - - .patch_BiggoronSetTextId 0x1D8A10 : { - *(.patch_BiggoronSetTextId) - } - - .patch_BombchuShopAlwaysOpen 0x1DC6B0 : { - *(.patch_BombchuShopAlwaysOpen) - } - - .patch_AdultBlueWarpOverride 0x1E3F50 : { - *(.patch_AdultBlueWarpOverride) - } - - .patch_DaruniaCheckStrength 0x1E489C : { - *(.patch_DaruniaCheckStrength) - } - - .patch_CanPlayBombchuBowlingTwo 0x1EA1D4 : { - *(.patch_CanPlayBombchuBowlingTwo) - } - - .patch_BoomerangTrailEffect 0x1F4220 : { - *(.patch_BoomerangTrailEffect) - } /*EnBoom_Draw*/ - - .patch_ItemGiveBombchuDropOne 0x1F6F70 : { - *(.patch_ItemGiveBombchuDropOne) - } - - .patch_BombchuBowlingStaticReward 0x206150 : { - *(.patch_BombchuBowlingStaticReward) - } - - .patch_SkipSongReplays_TimeBlocksFix 0x208004 : { - *(.patch_SkipSongReplays_TimeBlocksFix) - } - - .patch_SkipSongReplays_WarpBlocksFix 0x208068 : { - *(.patch_SkipSongReplays_WarpBlocksFix) - } - - .patch_ChestMinigame_DontOpenChestsOnInit 0x20EC8C : { - *(.patch_ChestMinigame_DontOpenChestsOnInit) - } - - .patch_ChestMinigame_KeyChestVisibility 0x20EDB8 : { - *(.patch_ChestMinigame_KeyChestVisibility) - } - - .patch_ChestMinigame_RewardChestVisibility 0x20EFE0 : { - *(.patch_ChestMinigame_RewardChestVisibility) - } - - .patch_ShopItemDontSetAnimSpeedOne 0x2101BC : { - *(.patch_ShopItemDontSetAnimSpeedOne) - } - - .patch_ShopItemDontSetAnimSpeedTwo 0x2101CC : { - *(.patch_ShopItemDontSetAnimSpeedTwo) - } - - .patch_CourtyardCheckForVisitedZeldaOne 0x210C4C : { - *(.patch_CourtyardCheckForVisitedZeldaOne) - } - - .patch_CourtyardCheckForVisitedZeldaTwo 0x210C78 : { - *(.patch_CourtyardCheckForVisitedZeldaTwo) - } - - .patch_BugsRecatchable 0x212090 : { - *(.patch_BugsRecatchable) - } - - .patch_WaterSpoutMasterQuestCheck 0x212BDC : { - *(.patch_WaterSpoutMasterQuestCheck) - } - - .patch_DekuSproutCheckForest 0x2153A4 : { - *(.patch_DekuSproutCheckForest) - } - - .patch_DungeonCheckJabuMQBox 0x21590C : { - *(.patch_DungeonCheckJabuMQBox) - } - - .patch_JabuBoxCheckRuto 0x215934 : { - *(.patch_JabuBoxCheckRuto) - } - - .patch_DekuTheaterMaskOfTruth 0x21CA30 : { - *(.patch_DekuTheaterMaskOfTruth) - } - - .patch_BombchuBowlingPrizeOrder 0x21CAD4 : { - *(.patch_BombchuBowlingPrizeOrder) - } - - .patch_NoHealFromBombchuBowlingPrize 0x21D170 : { - *(.patch_NoHealFromBombchuBowlingPrize) - } - - .patch_HookshotDrawChain 0x2202A0 : { - *(.patch_HookshotDrawChain) - } - - .patch_patch_ItemGiveBombchuDropTwo 0x22BAE4 : { - *(.patch_ItemGiveBombchuDropTwo) - } - - .patch_BusinessScrubCheckFlags 0x22EE64 : { - *(.patch_BusinessScrubCheckFlags) - } - - .patch_GanonCSEquipMS 0x2359A4 : { - *(.patch_GanonCSEquipMS) - } - - .patch_RainbowChuTrailOne 0x247FC0 : { - *(.patch_RainbowChuTrailOne) - } /*Bombchus use 2 EffectBlure instances*/ - - .patch_RainbowChuTrailTwo 0x2480A4 : { - *(.patch_RainbowChuTrailTwo) - } /*Bombchus use 2 EffectBlure instances*/ - - .patch_EnExItemModelDraw 0x249C94 : { - *(.patch_EnExItemModelDraw) - } - - .patch_SwordTrailDurationGrezzoFix 0x2507D0 : { - *(.patch_SwordTrailDurationGrezzoFix) - } /*duration is set to 6 due to framerate increase. NOP to allow custom duration*/ - - .patch_MultiplyPlayerSpeed 0x251D34 : { - *(.patch_MultiplyPlayerSpeed) - } - - .patch_PermadeathDeleteSave 0x252424 : { - *(.patch_PermadeathDeleteSave) - } - - .patch_SkipDaruniaDanceThree 0x257F00 : { - *(.patch_SkipDaruniaDanceThree) - } - - .patch_LostWoodsTargetTimer 0x2592B8 : { - *(.patch_LostWoodsTargetTimer) - } - - .patch_LostWoodsShootingGame 0x259E4C : { - *(.patch_LostWoodsShootingGame) - } - - .patch_CanPlayBombchuBowlingOne 0x25A744 : { - *(.patch_CanPlayBombchuBowlingOne) - } - - .patch_GanonDrawMasterSword 0x26207C : { - *(.patch_GanonDrawMasterSword) - } - - .patch_NaviNotifications 0x267E04 : { - *(.patch_NaviNotifications) - } - - .patch_CheckGerudoToken_269884 0x269884 : { - *(.patch_CheckGerudoToken_269884) - } - - .patch_MinuetLocation 0x26C388 : { - *(.patch_MinuetLocation) - } - - .patch_BoleroLocation 0x26C448 : { - *(.patch_BoleroLocation) - } - - .patch_FlyingTileCollision 0x26E730 : { - *(.patch_FlyingTileCollision) - } - - .patch_RedBoulderExplode 0x26FE7C : { - *(.patch_RedBoulderExplode) - } - - .patch_MaskSalesmanGiveMaskOfTruth 0x271D48 : { - *(.patch_MaskSalesmanGiveMaskOfTruth) - } - - .patch_SongOfTimeJingle 0x274B1C : { - *(.patch_SongOfTimeJingle) - } - - .patch_DoorOfTimeCheck 0x274B68 : { - *(.patch_DoorOfTimeCheck) - } - - .patch_ImpaInCourtyardCheckForVisitedZelda 0x27DEF8 : { - *(.patch_ImpaInCourtyardCheckForVisitedZelda) - } - - .patch_GanonGiveMSMidFight 0x288030 : { - *(.patch_GanonGiveMSMidFight) - } - - .patch_AnjuGiveCojiro 0x2884F4 : { - *(.patch_AnjuGiveCojiro) - } - - .patch_SunsSongLocation 0x2888C8 : { - *(.patch_SunsSongLocation) - } - - .patch_PierreSoftlockFixTwo 0x288914 : { - *(.patch_PierreSoftlockFixTwo) - } - - .patch_PierreSoftlockFixThree 0x2889D4 : { - *(.patch_PierreSoftlockFixThree) - } - - .patch_KakarikoGateCheck 0x28A678 : { - *(.patch_KakarikoGateCheck) - } - - .patch_BombchuBowlingAlwaysFirstPrize 0x291924 : { - *(.patch_BombchuBowlingAlwaysFirstPrize) - } - - .patch_LostWoodsShootingGameTwo 0x2990E8 : { - *(.patch_LostWoodsShootingGameTwo) - } - - .patch_Sheik_GetTextID 0x2A4B44 : { - *(.patch_Sheik_GetTextID) - } - - .patch_SerenadeCheckChestFlag 0x2B2544 : { - *(.patch_SerenadeCheckChestFlag) - } - - .patch_SerenadeLocation 0x2B2574 : { - *(.patch_SerenadeLocation) - } - - .patch_RainbowSwordTrail 0x2B9AD0 : { - *(.patch_RainbowSwordTrail) - } - - .patch_OverrideTextID 0x2BC1C4 : { - *(.patch_OverrideTextID) - } - - .patch_OverrideItemID 0x2BC1D0 : { - *(.patch_OverrideItemID) - } - - .patch_NoSilverGauntletsCutsceneWarp 0x2BC2A0 : { - *(.patch_NoSilverGauntletsCutsceneWarp) - } - - .patch_RunAnimationSpeed 0x2BE70C : { - *(.patch_RunAnimationSpeed) - } - - .patch_FishingIgnoreTempBOne 0x2C3A10 : { - *(.patch_FishingIgnoreTempBOne) - } - - .patch_DoorOfTimeOpenCutscene 0x2C6218 : { - *(.patch_DoorOfTimeOpenCutscene) - } - - .patch_NoHealFromHealthUpgrades 0x2CD07C : { - *(.patch_NoHealFromHealthUpgrades) - } - - .patch_GetCustomMessageEntryOne 0x2CD3A4 : { - *(.patch_GetCustomMessageEntryOne) - } - - .patch_GetCustomMessageTextOne 0x2CD3EC : { - *(.patch_GetCustomMessageTextOne) - } - - .patch_ActorDraw 0x2D6310 : { - *(.patch_ActorDraw) - } - - .patch_CamUpdate 0x2D84C8 : { - * (.patch_CamUpdate) - } - - .patch_CamRoll 0x2D88E4 : { - *(.patch_CamRoll) - } - - .patch_CheckForTextControlCode 0x2E0490 : { - * (.patch_CheckForTextControlCode) - } - - .patch_HandleTextControlCode 0x2E057C : { - * (.patch_HandleTextControlCode) - } - - .patch_SceneInitAfterCopyScenes 0x2EAFDC : { - *(.patch_SceneInitAfterCopyScenes) - } - - .patch_ChildCanOpenBowSubMenu 0x2EB2D8 : { - *(.patch_ChildCanOpenBowSubMenu) - } - - .patch_CorrectCompassChests 0x2F161C : { - *(.patch_CorrectCompassChests) - } - - .patch_CorrectCompassChestsTwo 0x2F1770 : { - *(.patch_CorrectCompassChestsTwo) - } - - .patch_OverrideDrawItemOne 0x2F7498 : { - *(.patch_OverrideDrawItemOne) - } - - .patch_OcarinaNoteButtonsDraw 0x2F9430 : { - * (.patch_OcarinaNoteButtonsDraw) - } - - .patch_SaveGame 0x2FBFA8 : { - *(.patch_SaveGame) - } - - .patch_SaveFileSwordless 0x2FDCE4 : { - *(.patch_SaveFileSwordless) - } - - .patch_Gfx_Update 0x310254 : { - *(.patch_Gfx_Update) - } - - .patch_OverrideDrawItemTwo 0x3148A8 : { - *(.patch_OverrideDrawItemTwo) - } - - .patch_OoBBombchuOne 0x315120 : { - *(.patch_OoBBombchuOne) - } - - .patch_OoBBombchuTwo 0x31513C : { - *(.patch_OoBBombchuTwo) - } - - .patch_OoBBombchuThree 0x315150 : { - *(.patch_OoBBombchuThree) - } - - .patch_CollisionATvsAC 0x3191B0 : { - *(.patch_CollisionATvsAC) - } - - .patch_ISGPutaway 0x32B4AC : { - *(.patch_ISGPutaway) - } - - .patch_SetBGMEntrance 0x331048 : { - *(.patch_SetBGMEntrance) - } - - .patch_NockArrow 0x33615C : { - *(.patch_NockArrow) - } - - .patch_DecreaseArrowCount 0x3362C4 : { - *(.patch_DecreaseArrowCount) - } - - .patch_SceneExitOverride 0x3366EC : { - *(.patch_SceneExitOverride) - } - - .patch_SceneExitDynamicOverride 0x33676C : { - *(.patch_SceneExitDynamicOverride) - } - - .patch_EnteredLocation 0x338DB8 : { - *(.patch_EnteredLocation) - } - - .patch_LostWoodsBridgeMusic 0x338DD8 : { - *(.patch_LostWoodsBridgeMusic) - } - - .patch_ChestGetIceTrapObjectStatus 0x33AB24 : { - *(.patch_ChestGetIceTrapObjectStatus) - } - - .patch_BiggoronDayCheck 0x33DCC0 : { - *(.patch_BiggoronDayCheck) - } - - .patch_FWandWarpSongTimerDepletion 0x33DE84 : { - *(.patch_FWandWarpSongTimerDepletion) - } - - .patch_RandomGsLoc_CustomTangibilityCheck 0x3415B0 : { - *(.patch_RandomGsLoc_CustomTangibilityCheck) - } - - .patch_MasterQuestGoldSkulltulaCheck 0x3415C8 : { - *(.patch_MasterQuestGoldSkulltulaCheck) - } - - .patch_TurboTextSignalNPC 0x3469F4 : { - *(.patch_TurboTextSignalNPC) - } - - .patch_FairyReviveHealAmount 0x34AF48 : { - *(.patch_FairyReviveHealAmount) - } - - .patch_FishingIgnoreTempBTwo 0x34CFCC : { - *(.patch_FishingIgnoreTempBTwo) - } - - .patch_FWLoadSet 0x34D9E8 : { - *(.patch_FWLoadSet) - } - - .patch_FWGetSet 0x3519CC : { - *(.patch_FWGetSet) - } - - .patch_ApplyDamageMultiplier 0x352DC0 : { - *(.patch_ApplyDamageMultiplier) - } - - .patch_FastChests 0x354CD4 : { - *(.patch_FastChests) - } - - .patch_AboutToPickUpActor 0x354DD8 : { - *(.patch_AboutToPickUpActor) - } - - .patch_MasterSwordTimerCheck 0x354DFC : { - *(.patch_MasterSwordTimerCheck) - } - - .patch_LikeLikeNeverEatTunic 0x355C2C : { - *(.patch_LikeLikeNeverEatTunic) - } - - .patch_PlaySound 0x35C528 : { - *(.patch_PlaySound) - } - - .patch_ConvertBombDropOne 0x35E46C : { - *(.patch_ConvertBombDropOne) - } - - .patch_ISGCrouchStab 0x360690 : { - *(.patch_ISGCrouchStab) - } - - .patch_ForceTrailEffectUpdate 0x362108 : { - *(.patch_ForceTrailEffectUpdate) - } /*EffectBlure_AddVertex*/ - - .patch_ModelSpawnGetObjectStatus 0x36A96C : { - *(.patch_ModelSpawnGetObjectStatus) - } - - .patch_IgnoreMaskReaction 0x36BBC4 : { - *(.patch_IgnoreMaskReaction) - } - - .patch_SetBGMEvent 0x36EC40 : { - *(.patch_SetBGMEvent) - } - - .patch_DemoEffectMedallionDraw 0x37214C : { - *(.patch_DemoEffectMedallionDraw) - } - - .patch_IncomingGetItemID 0x3725AC : { - *(.patch_IncomingGetItemID) - } - - .patch_Model_EnableMeshGroupByIndex 0x372670 : { - *(.patch_Model_EnableMeshGroupByIndex) - } - - .patch_MaskSalesmanCheckNoMaskOne 0x372B64 : { - *(.patch_MaskSalesmanCheckNoMask) - } - - .patch_MaskSalesmanCheckNoMaskTwo 0x372B70 : { - *(.patch_MaskSalesmanCheckNoMaskTwo) - } - - .patch_ConvertBombDropTwo 0x3747A4 : { - *(.patch_ConvertBombDropTwo) - } - - .patch_SetSFX 0x37547C : { - *(.patch_SetSFX) - } - - .patch_CollisionCheck_SetAC_Once 0x376174 : { - *(.patch_CollisionCheck_SetAC_Once) - } - - .patch_CollisionCheck_SetAT_Once 0x3761FC : { - *(.patch_CollisionCheck_SetAT_Once) - } - - .patch_CollisionCheck_SetOC_Once 0x3762B0 : { - *(.patch_CollisionCheck_SetOC_Once) - } - - .patch_GKSetDurability 0x376BDC : { - *(.patch_GKSetDurability) - } - - .patch_GiantsKnifeWithoutKokiriSword 0x376BEC : { - *(.patch_GiantsKnifeWithoutKokiriSword) - } - - .patch_GiveItemMasterSword 0x376C18 : { - *(.patch_GiveItemMasterSword) - } - - .patch_NoLensOfTruthNaviText 0x37798C : { - *(.patch_NoLensOfTruthNaviText) - } - - .patch_FrogRewardPurple 0x3898F0 : { - *(.patch_FrogRewardPurple) - } - - .patch_FrogReward 0x38992C : { - *(.patch_FrogReward) - } - - .patch_ChildShootingGallery 0x38AB70 : { - *(.patch_ChildShootingGallery) - } - - .patch_AdultShootingGallery 0x38ABA0 : { - *(.patch_AdultShootingGallery) - } - - .patch_SariasSongHintsOne 0x390620 : { - *(.patch_SariasSongHintsOne) - } - - .patch_SariasSongHintsTwo 0x39073C : { - *(.patch_SariasSongHintsTwo) - } - - .patch_OcarinaMinigameEndAfterWin 0x39DF38 : { - *(.patch_OcarinaMinigameEndAfterWin) - } - - .patch_LullabyLocation 0x3A0A7C : { - *(.patch_LullabyLocation) - } - - .patch_OverrideDrawItemThree 0x3A0EA8 : { - *(.patch_OverrideDrawItemThree) - } - - .patch_KokiriCheckOpenForest 0x3ACCFC : { - *(.patch_KokiriCheckOpenForest) - } - - .patch_TokenNoItemGive2 0x3AD270 : { - *(.patch_TokenNoItemGive2) - } - - .patch_GetToken2 0x3AD2F0 : { - *(.patch_GetToken2) - } - - .patch_TokenNoItemGive1 0x3ADD68 : { - *(.patch_TokenNoItemGive1) - } - - .patch_GetToken1 0x3ADDE4 : { - *(.patch_GetToken1) - } - - .patch_TalonGetCastleTextbox 0x3AE6E8 : { - *(.patch_TalonGetCastleTextbox) - } - - .patch_GerudoArcheryOne 0x3AFA34 : { - *(.patch_GerudoArcheryOne) - } - - .patch_ShabomAfterDamagePlayer 0x3B5060 : { - *(.patch_ShabomAfterDamagePlayer) - } - - .patch_RandomGsLoc_CustomTokenSpawnOffset 0x3B94C4 : { - *(.patch_RandomGsLoc_CustomTokenSpawnOffset) - } - - .patch_RandomGsLoc_BlockSpawn_Crate 0x3BCA68 : { - *(.patch_RandomGsLoc_BlockSpawn_Crate) - } - - .patch_MovableBlockCooldownTimer 0x3BD46C : { - *(.patch_MovableBlockCooldownTimer) - } - - .patch_MovableBlockSpeed 0x3BD508 : { - *(.patch_MovableBlockSpeed) - } - - .patch_MilkCrateCooldownTimer 0x3BD85C : { - *(.patch_MilkCrateCooldownTimer) - } - - .patch_MilkCrateSpeed 0x3BD88C : { - *(.patch_MilkCrateSpeed) - } - - .patch_RandomGsLoc_BlockSpawn_Soil 0x3BF690 : { - *(.patch_RandomGsLoc_BlockSpawn_Soil) - } - - .patch_ForestTempleBasementPuzzleDelay 0x3BFA8C : { - *(.patch_ForestTempleBasementPuzzleDelay) - } - - .patch_GerudoArcheryTwo 0x3C2D80 : { - *(.patch_GerudoArcheryTwo) - } - - .patch_DampeCheckCanDig1 0x3C3354 : { - *(.patch_DampeCheckCanDig1) - } - - .patch_DampeRollHigh 0x3C3418 : { - *(.patch_DampeRollHigh) - } - - .patch_DampeCheckRewardFlag 0x3C3598 : { - *(.patch_DampeCheckRewardFlag) - } - - .patch_DampeCheckCanDig2 0x3C35D0 : { - *(.patch_DampeCheckCanDig2) - } - - .patch_SongOfTimeLocation 0x3C375C : { - *(.patch_SongOfTimeLocation) - } - - .patch_EponasSongLocation 0x3C6194 : { - *(.patch_EponasSongLocation) - } - - .patch_MalonNextAction 0x3C6210 : { - *(.patch_MalonNextAction) - } - - .patch_GrannySetRewardFlag 0x3D0E34 : { - *(.patch_GrannySetRewardFlag) - } - - .patch_GrannyItemOverrideTwo 0x3D0E60 : { - *(.patch_GrannyItemOverrideTwo) - } - - .patch_MidoCheckDekuTreeClearFour 0x3D2C18 : { - *(.patch_MidoCheckDekuTreeClearFour) - } - - .patch_ShadowShip_Speed 0x3DFB30 : { - *(.patch_ShadowShip_Speed) - } - - .patch_BombPurchaseableCheck 0x3CE800 : { - *(.patch_BombPurchaseableCheck) - } - - .patch_ScrubStickUpgradeTwo 0x3CE990 : { - *(.patch_ScrubStickUpgradeTwo) - } - - .patch_ScrubNutUpgradeTwo 0x3CE9DC : { - *(.patch_ScrubNutUpgradeTwo) - } - - .patch_FireBlockSpeed 0x3E0BB4 : { - *(.patch_FireBlockSpeed) - } - - .patch_FreeScarecrow 0x3E55A8 : { - *(.patch_FreeScarecrow) - } - - .patch_MasterSwordAlwaysDrop 0x3E5E98 : { - *(.patch_MasterSwordAlwaysDrop) - } - - .patch_PickUpMasterSword 0x3E5EC8 : { - *(.patch_PickUpMasterSword) - } - - .patch_SkipMasterSwordFanfare 0x3E5F60 : { - *(.patch_SkipMasterSwordFanfare) - } - - .patch_ShadowShip_CSTimer 0x3E6C50 : { - *(.patch_ShadowShip_CSTimer) - } - - .patch_FairyReward 0x3E7598 : { - *(.patch_FairyReward) - } - - .patch_RainbowBridge 0x3E7CAC : { - *(.patch_RainbowBridge) - } - - .patch_RemoveWaterfallCS 0x3E7F64 : { - *(.patch_RemoveWaterfallCS) - } - - .patch_DekuTheaterSkullMask 0x3EAF38 : { - *(.patch_DekuTheaterSkullMask) - } - - .patch_CowItemOverride 0x3EE378 : { - *(.patch_CowItemOverride) - } - - .patch_CowBottleCheck 0x3F065C : { - *(.patch_CowBottleCheck) - } - - .patch_CarpetSalesmanCheckFlagOne 0x3F0A18 : { - *(.patch_CarpetSalesmanCheckFlagOne) - } - - .patch_CarpetSalesmanCheckFlagTwo 0x3F0A64 : { - *(.patch_CarpetSalesmanCheckFlagTwo) - } - - .patch_LabScientistIgnoreEyedropsInInventory 0x3F0B44 : { - *(.patch_LabScientistIgnoreEyedropsInInventory) - } - - .patch_FastChestsTwo 0x3F1048 : { - *(.patch_FastChestsTwo) - } - - .patch_HandleDoorDestroyCustomModels 0x3F1B88 : { - *(.patch_HandleDoorDestroyCustomModels) - } - - .patch_OverrideGrottoActorEntrance 0x3F2254 : { - *(.patch_OverrideGrottoActorEntrance) - } - - .patch_FireArrowRequirement 0x3F23AC : { - *(.patch_FireArrowRequirement) - } - - .patch_FireArrowCheckChestFlagOne 0x3F23FC : { - *(.patch_FireArrowCheckChestFlagOne) - } - - .patch_FireArrowCheckChestFlagTwo 0x3F2448 : { - *(.patch_FireArrowCheckChestFlagTwo) - } - - .patch_LinkReflection 0x3F2F0C : { - *(.patch_LinkReflection) - } - - .patch_SlidingDoorDestroyCustomModels 0x3F4A70 : { - *(.patch_SlidingDoorDestroyCustomModels) - } - - .patch_ChildBlueWarpOverride 0x3F5774 : { - *(.patch_ChildBlueWarpOverride) - } - - .patch_CarpetSalesmanSetFlag 0x3F9550 : { - *(.patch_CarpetSalesmanSetFlag) - } - - .patch_PreSwapBuffers 0x3FD384 : { - *(.patch_PreSwapBuffers) - } - - .patch_AwakeCallback 0x3FD43C : { - *(.patch_AwakeCallback) - } - - .patch_SleepQueryCallback 0x3FD6C4 : { - *(.patch_SleepQueryCallback) - } - - .patch_OcarinaNoteButtonsPress 0x41AAD0 : { - * (.patch_OcarinaNoteButtonsPress) - } - - .patch_CurseTrapDizzyStick 0x41AB48 : { - *(.patch_CurseTrapDizzyStick) - } - - .patch_CurseTrapDizzyButtons 0x41AC00 : { - *(.patch_CurseTrapDizzyButtons) - } - - .patch_PermadeathSkipMenu 0x41C9A4 : { - *(.patch_PermadeathSkipMenu) - } - - .patch_SaveMenuIgnoreOpen 0x42EC24 : { - *(.patch_SaveMenuIgnoreOpen) - } - - .patch_ItemsMenuDraw 0x434C2C : { - *(.patch_ItemsMenuDraw) - } - - .patch_GearMenuEmptySlot 0x438C20 : { - *(.patch_GearMenuEmptySlot) - } - - .patch_BeforeLoadGame 0x4473A0 : { - *(.patch_BeforeLoadGame) - } - - .patch_AfterLoadGame 0x449F20 : { - *(.patch_AfterLoadGame) - } - - .patch_DontSetMotionSetting 0x447430 : { - *(.patch_DontSetMotionSetting) - } - - .patch_OverrideFogDuringGameplayInit 0x4485D4 : { - *(.patch_OverrideFogDuringGameplayInit) - } - - .patch_CheckForWeirdEggHatchGameplayInit 0x448A84 : { - *(.patch_CheckForWeirdEggHatchGameplayInit) - } - - .patch_CheckForPocketCuccoHatchGameplayInit 0x448AA0 : { - *(.patch_CheckForPocketCuccoHatchGameplayInit) - } - - .patch_InitSceneMirrorWorld 0x4490FC : { - *(.patch_InitSceneMirrorWorld) - } - - .patch_InitSceneEntranceOverride 0x4491B0 : { - *(.patch_InitSceneEntranceOverride) - } - - .patch_InitSceneClearExtendedObjects 0x449238 : { - *(.patch_InitSceneClearExtendedObjects) - } - - .patch_SaveFile_Init 0x449A24 : { - *(.patch_SaveFile_Init) - } - - .patch_SavewarpSetRespawnFlag 0x449E60 : { - *(.patch_SavewarpSetRespawnFlag) - } - - .patch_Multiplayer_OnLoadFile 0x449F1C : { - *(.patch_Multiplayer_OnLoadFile) - } - - .patch_GetCustomMessageEntryTwo 0x44D584 : { - *(.patch_GetCustomMessageEntryTwo) - } - - .patch_GetCustomMessageTextTwo 0x44D5C4 : { - *(.patch_GetCustomMessageTextTwo) - } - - .patch_GameplayDestroy 0x44E2B4 : { - *(.patch_GameplayDestroy) - } - - .patch_ExtendedObjectClear 0x44E774 : { - *(.patch_ExtendedObjectClear) - } - - .patch_Multiplayer_UpdatePrevActorFlags 0x44E898 : { - *(.patch_Multiplayer_UpdatePrevActorFlags) - } - - .patch_PlayEntranceCutscene 0x44F088 : { - *(.patch_PlayEntranceCutscene) - } - - .patch_RequiemLocation 0x44F124 : { - *(.patch_RequiemLocation) - } - - .patch_NocturneLocation 0x44F14C : { - *(.patch_NocturneLocation) - } - - .patch_SariasGift 0x44F1A8 : { - *(.patch_SariasGift) - } - - .patch_LACSConditionOne 0x44F1F4 : { - *(.patch_LACSConditionOne) - } - - .patch_LACSConditionTwo 0x44F22C : { - *(.patch_LACSConditionTwo) - } - - .patch_BossChallenge_Enter 0x44F654 : { - *(.patch_BossChallenge_Enter) - } - - .patch_SetSavewarpEntrance 0x44FC04 : { - *(.patch_SetSavewarpEntrance) - } - - .patch_LullabyCheckFlag 0x44FD74 : { - *(.patch_LullabyCheckFlag) - } - - .patch_LoadFileSwordless 0x44FDB8 : { - *(.patch_LoadFileSwordless) - } - - .patch_OpenSaveDontSpoilTradeItems 0x44FE18 : { - *(.patch_OpenSaveDontSpoilTradeItems) - } - - .patch_OnActorSetup_SceneChange 0x452270 : { - *(.patch_OnActorSetup_SceneChange) - } - - .patch_AfterActorSetup_SceneChange 0x4522D8 : { - *(.patch_AfterActorSetup_SceneChange) - } - - .patch_before_GlobalContext_Update 0x4523B0 : { - *(.patch_before_GlobalContext_Update) - } - - .patch_after_GlobalContext_Update 0x452454 : { - *(.patch_after_GlobalContext_Update) - } - - .patch_FixItemsMenuSlotDuplication 0x456BB0 : { - *(.patch_FixItemsMenuSlotDuplication) - } - - .patch_GameOverDontSpoilTradeItems 0x458C00 : { - *(.patch_GameOverDontSpoilTradeItems) - } - - .patch_DeathHandleBButton 0x458CC8 : { - *(.patch_DeathHandleBButton) - } - - .patch_PermadeathForceQuit 0x458E40 : { - *(.patch_PermadeathForceQuit) - } - - .patch_SetGameOverEntrance 0x458E5C : { - *(.patch_SetGameOverEntrance) - } - - .patch_SetGameOverRespawnFlag 0x458F10 : { - *(.patch_SetGameOverRespawnFlag) - } - - .patch_InterfaceDrawDontSpoilTradeItems 0x45A19C : { - *(.patch_InterfaceDrawDontSpoilTradeItems) - } - - .patch_TimerExpiration 0x45A968 : { - *(.patch_TimerExpiration) - } - - .patch_Timer2TickSound 0x45A9D4 : { - *(.patch_Timer2TickSound) - } - - .patch_SunsSongEndCloseTextbox 0x45B534 : { - *(.patch_SunsSongEndCloseTextbox) - } - - .patch_SetSunsSongRespawnFlag 0x45B680 : { - *(.patch_SetSunsSongRespawnFlag) - } - - .patch_BossChallenge_ExitMenu 0x45CCC4 : { - *(.patch_BossChallenge_ExitMenu) - } - - .patch_StoreChildBButtonEquip 0x45F22C : { - *(.patch_StoreChildBButtonEquip) - } - - .patch_BecomeAdult 0x45F250 : { - *(.patch_BecomeAdult) - } - - .patch_AlwaysRestoreChildEquips 0x45F3D0 : { - *(.patch_AlwaysRestoreChildEquips) - } - - .patch_ChildDontEquipSwordSlotByDefault 0x45F4BC : { - *(.patch_ChildDontEquipSwordSlotByDefault) - } - - .patch_OnActorSetup_RoomChange 0x4613E4 : { - *(.patch_OnActorSetup_RoomChange) - } - - .patch_AfterActorSetup_RoomChange 0x461454 : { - *(.patch_AfterActorSetup_RoomChange) - } - - .patch_ActorUpdate 0x4617B0 : { - *(.patch_ActorUpdate) - } - - .patch_TitleCardUpdate 0x4618D8 : { - *(.patch_TitleCardUpdate) - } - - .patch_ItemsMenuNumSprites 0x46B778 : { - *(.patch_ItemsMenuNumSprites) - } - - .patch_CheckForWeirdEggHatchKankyo 0x470D20 : { - *(.patch_CheckForWeirdEggHatchKankyo) - } - - .patch_CheckForPocketCuccoHatchKankyo 0x470D3C : { - *(.patch_CheckForPocketCuccoHatchKankyo) - } - - .patch_CriticalHealthCheckOne 0x4715D8 : { - *(.patch_CriticalHealthCheckOne) - } - - .patch_CriticalHealthCheckTwo 0x4716F4 : { - *(.patch_CriticalHealthCheckTwo) - } - - .patch_EnableFW 0x476D3C : { - *(.patch_EnableFW) - } - - .patch_StoreTargetActorType 0x4799A4 : { - *(.patch_StoreTargetActorType) - } - - .patch_TargetReticleColor 0x47B2A4 : { - *(.patch_TargetReticleColor) - } - - .patch_TargetPointerColor 0x47BB08 : { - *(.patch_TargetPointerColor) - } - - .patch_FWKeepWarpPoint 0x47C3E0 : { - *(.patch_FWKeepWarpPoint) - } - - .patch_TurboTextAdvance 0x480948 : { - *(.patch_TurboTextAdvance) - } - - .patch_SetBGMDayNight 0x483CA8 : { - *(.patch_SetBGMDayNight) - } - - .patch_TurboTextClose 0x488234 : { - *(.patch_TurboTextClose) - } - - .patch_WarpSongEntranceOverride 0x488870 : { - *(.patch_WarpSongEntranceOverride) - } - - .patch_SetFWPlayerParams 0x4911D8 : { - *(.patch_SetFWPlayerParams) - } - - .patch_SwapFaroresWind 0x49188C : { - *(.patch_SwapFaroresWind) - } - - .patch_SkipTimeTravelCutsceneTwo 0x4918E8 : { - *(.patch_SkipTimeTravelCutsceneTwo) - } - - .patch_SwapAgeIgnoreSceneSetup 0x4918D0 : { - *(.patch_SwapAgeIgnoreSceneSetup) - } - - .patch_DMTOwlEntranceOverride 0x492084 : { - *(.patch_DMTOwlEntranceOverride) - } - - .patch_LHOwlEntranceOverride 0x4920A0 : { - *(.patch_LHOwlEntranceOverride) - } - - .patch_FairyUseHealAmount 0x4968D4 : { - *(.patch_FairyUseHealAmount) - } - - .patch_SendDroppedBottleContents 0x496A3C : { - *(.patch_SendDroppedBottleContents) - } - - .patch_ReturnFW 0x496BA8 : { - *(.patch_ReturnFW) - } - - .patch_SetSpecialVoidOutRespawnFlag 0x496C90 : { - *(.patch_SetSpecialVoidOutRespawnFlag) - } - - .patch_GanonBattleDeathWarp 0x496CB8 : { - *(.patch_GanonBattleDeathWarp) - } - - .patch_GanonRestoreMSOnDeath 0x496CD4 : { - *(.patch_GanonRestoreMSOnDeath) - } - - .patch_CriticalHealthCheckThree 0x49F2B4 : { - *(.patch_CriticalHealthCheckThree) - } - - .patch_OverrideGiDrawIdPlusOne 0x4BC610 : { - *(.patch_OverrideGiDrawIdPlusOne) - } - - .patch_EditDrawGetItemBeforeModelSpawn 0x4C0FD0 : { - *(.patch_EditDrawGetItemBeforeModelSpawn) - } - - .patch_HookshotRotation 0x4C2524 : { - *(.patch_HookshotRotation) - } - - .patch_EditDrawGetItemAfterMatrixUpdate 0x4C4D14 : { - *(.patch_EditDrawGetItemAfterMatrixUpdate) - } - - .patch_EditDrawGetItemAfterModelSpawn 0x4C61A4 : { - *(.patch_EditDrawGetItemAfterModelSpawn) - } - - .patch_CrouchStabHitbox 0x4C85D4 : { - *(.patch_CrouchStabHitbox) - } - - . = 0x4C99A8; - . = ALIGN(4); - .loader : { - *(.loader*) - } - - .patch_DampeSetCollectibleFlag 0x4D9D50 : { - *(.patch_DampeSetCollectibleFlag) - } - - .patch_KingDodongoID 0x514594 : { - *(.patch_KingDodongoID) - } - - .patch_KingDodongoFireBreathID 0x520D38 : { - *(.patch_KingDodongoFireBreathID) - } - - .patch_PhantomGanonLightningID 0x523698 : { - *(.patch_PhantomGanonLightningID) - } - - .patch_GohmaLarvaID 0x525F24 : { - *(.patch_GohmaLarvaID) - } - - .patch_VolvagiaRockID 0x52FDB4 : { - *(.patch_VolvagiaRockID) - } - - .patch_BombchuCheapestPriceOne 0x525348 : { - *(.patch_BombchuCheapestPriceOne) - } - - .patch_BombchuCheapestPriceTwo 0x5253D8 : { - *(.patch_BombchuCheapestPriceTwo) - } - - .patch_BombchuCheapestPriceThree 0x525408 : { - *(.patch_BombchuCheapestPriceThree) - } - - .patch_BombchuCheapestPriceFour 0x525498 : { - *(.patch_BombchuCheapestPriceFour) - } - - .patch_OcarinaMinigameRewardsOrder 0x52ED10 : { - *(.patch_OcarinaMinigameRewardsOrder) - } - - .patch_TycoonWalletSize 0x53CC08 : { - *(.patch_TycoonWalletSize) - } - - . = 0x005C7000; - .text : { - __text_start = . ; - *(.text) - *(.text.*) - *(.rodata) - *(.data) - *(.bss) - *(COMMON) - rCustomMessages = . ; - __text_end = . ; - } -} diff --git a/code/src/actor.c b/code/src/actor.c index 51e445fc..34810b6d 100644 --- a/code/src/actor.c +++ b/code/src/actor.c @@ -73,12 +73,7 @@ #define OBJECT_TRIFORCE 149 typedef void (*TitleCard_Update_proc)(GlobalContext* globalCtx, TitleCardContext* titleCtx); -#ifdef Version_EUR - #define TitleCard_Update_addr 0x47955C -#else - #define TitleCard_Update_addr 0x47953C -#endif -#define TitleCard_Update ((TitleCard_Update_proc)TitleCard_Update_addr) +#define TitleCard_Update ((TitleCard_Update_proc)GAME_ADDR(0x47953C)) void Actor_Init() { gActorOverlayTable[0x0].initInfo->init = PlayerActor_rInit; diff --git a/code/src/actors/anubis.c b/code/src/actors/anubis.c index 2a8180b8..0cce0d38 100644 --- a/code/src/actors/anubis.c +++ b/code/src/actors/anubis.c @@ -2,7 +2,7 @@ #include "anubis.h" #include "enemy_souls.h" -#define EnAnubice_Update ((ActorFunc)0x246E58) +#define EnAnubice_Update ((ActorFunc)GAME_ADDR(0x246E58)) void EnAnubice_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnAnubice* this = (EnAnubice*)thisx; diff --git a/code/src/actors/bean_plant.c b/code/src/actors/bean_plant.c index e352dd2b..461f6684 100644 --- a/code/src/actors/bean_plant.c +++ b/code/src/actors/bean_plant.c @@ -1,15 +1,13 @@ #include "bean_plant.h" #include "multiplayer.h" -#define ObjBean_Init_addr 0x1E12B0 -#define ObjBean_Init ((ActorFunc)ObjBean_Init_addr) +#define ObjBean_Init ((ActorFunc)GAME_ADDR(0x1E12B0)) -#define ObjBean_Update_addr 0x214BEC -#define ObjBean_Update ((ActorFunc)ObjBean_Update_addr) +#define ObjBean_Update ((ActorFunc)GAME_ADDR(0x214BEC)) -#define ObjBean_UnplantedWait (void*)0x15E154 -#define ObjBean_StallGrowth (void*)0x143684 -#define ObjBean_GrowSprout (void*)0x1436C4 +#define ObjBean_UnplantedWait (void*)GAME_ADDR(0x15E154) +#define ObjBean_StallGrowth (void*)GAME_ADDR(0x143684) +#define ObjBean_GrowSprout (void*)GAME_ADDR(0x1436C4) PosRot lastBeanPlant_Home; s16 lastBeanPlant_Params; diff --git a/code/src/actors/boulder_red.c b/code/src/actors/boulder_red.c index a2f1b26a..e9ceb605 100644 --- a/code/src/actors/boulder_red.c +++ b/code/src/actors/boulder_red.c @@ -1,8 +1,7 @@ #include "boulder_red.h" #include "multiplayer.h" -#define ObjHamishi_Update_addr 0x26FD24 -#define ObjHamishi_Update ((ActorFunc)ObjHamishi_Update_addr) +#define ObjHamishi_Update ((ActorFunc)GAME_ADDR(0x26FD24)) void ObjHamishi_rUpdate(ObjHamishi* thisx, GlobalContext* globalCtx) { s16 prevHitCount = thisx->hit_count; diff --git a/code/src/actors/business_scrubs.c b/code/src/actors/business_scrubs.c index c6d0b6e4..5e3e9324 100644 --- a/code/src/actors/business_scrubs.c +++ b/code/src/actors/business_scrubs.c @@ -2,11 +2,9 @@ #include "settings.h" #include "multiplayer.h" -#define EnDns_Update_addr 0x1D67CC -#define EnDns_Update ((ActorFunc)EnDns_Update_addr) +#define EnDns_Update ((ActorFunc)GAME_ADDR(0x1D67CC)) -#define EnShopnuts_Init_addr 0x22ED2C -#define EnShopnuts_Init ((ActorFunc)EnShopnuts_Init_addr) +#define EnShopnuts_Init ((ActorFunc)GAME_ADDR(0x22ED2C)) u32 EnDns_rPurchaseableCheck(EnDns* scrub); void EnDns_rSetRupeesAndFlags(EnDns* scrub); @@ -27,8 +25,7 @@ static const DnsItemEntry Scrub_A = { 40, 1, 0x79, EnDns_rPurchaseableCheck, EnD const DnsItemEntry* rScrubTable[] = { &Scrub_0, &Scrub_1, &Scrub_2, &Scrub_3, &Scrub_4, &Scrub_5, &Scrub_6, &Scrub_7, &Scrub_8, &Scrub_9, &Scrub_A }; -#define Vanilla_DnsItemEntries_addr 0x522384 -#define VanillaScrubTable ((DnsItemEntry**)Vanilla_DnsItemEntries_addr) +#define VanillaScrubTable ((DnsItemEntry**)GAME_ADDR(0x522384)) s16 rScrubRandomItemPrices[11] = { 0 }; @@ -105,16 +102,15 @@ void EnShopnuts_rInit(Actor* thisx, GlobalContext* globalCtx) { EnShopnuts_Init(&scrub->actor, globalCtx); } -#define EnDns_Talk (void*)0x161960 -#define FUN_00161828 (void*)0x161828 -#define FUN_003CE92C (void*)0x3CE92C -#define FUN_00100434 (void*)0x100434 -#define EnDns_SetupBurrow (void*)0x3C3C04 -#define EnDns_Burrow (void*)0x3CEA64 +#define EnDns_Talk (void*)GAME_ADDR(0x161960) +#define FUN_00161828 (void*)GAME_ADDR(0x161828) +#define FUN_003CE92C (void*)GAME_ADDR(0x3CE92C) +#define FUN_00100434 (void*)GAME_ADDR(0x100434) +#define EnDns_SetupBurrow (void*)GAME_ADDR(0x3C3C04) +#define EnDns_Burrow (void*)GAME_ADDR(0x3CEA64) typedef u32 (*EnDns_ChangeAnim_proc)(EnDns* globalCtx, u8 arg1); -#define EnDns_ChangeAnim_addr 0x37693C -#define EnDns_ChangeAnim ((EnDns_ChangeAnim_proc)EnDns_ChangeAnim_addr) +#define EnDns_ChangeAnim ((EnDns_ChangeAnim_proc)GAME_ADDR(0x37693C)) void EnDns_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnDns* scrub = (EnDns*)thisx; diff --git a/code/src/actors/carpenter.c b/code/src/actors/carpenter.c index cd0ef0f6..d70be950 100644 --- a/code/src/actors/carpenter.c +++ b/code/src/actors/carpenter.c @@ -5,12 +5,11 @@ void EnToryo_SetTradedSawFlag(void) { gSaveContext.itemGetInf[3] |= 0x4; } -#define EnDaiku_Update_addr 0x20F1A8 -#define EnDaiku_Update ((ActorFunc)EnDaiku_Update_addr) +#define EnDaiku_Update ((ActorFunc)GAME_ADDR(0x20F1A8)) -#define EnDaiku_WaitFreedom (void*)0x182FF0 -#define EnDaiku_InitEscape (void*)0x25A8E4 -#define EnDaiku_EscapeRotate (void*)0x2754E4 +#define EnDaiku_WaitFreedom (void*)GAME_ADDR(0x182FF0) +#define EnDaiku_InitEscape (void*)GAME_ADDR(0x25A8E4) +#define EnDaiku_EscapeRotate (void*)GAME_ADDR(0x2754E4) void EnDaiku_rUpdate(EnDaiku* thisx, GlobalContext* globalCtx) { void* prev_action_fn = thisx->action_fn; diff --git a/code/src/actors/checkable_spot.c b/code/src/actors/checkable_spot.c index 16e4eba3..929ea0fd 100644 --- a/code/src/actors/checkable_spot.c +++ b/code/src/actors/checkable_spot.c @@ -3,11 +3,9 @@ #include "savefile.h" #include "settings.h" -#define EnWonderTalk_Update_addr 0x3731F4 -#define EnWonderTalk_Update ((ActorFunc)EnWonderTalk_Update_addr) +#define EnWonderTalk_Update ((ActorFunc)GAME_ADDR(0x3731F4)) -#define EnWonderTalk2_Update_addr 0x3794EC -#define EnWonderTalk2_Update ((ActorFunc)EnWonderTalk2_Update_addr) +#define EnWonderTalk2_Update ((ActorFunc)GAME_ADDR(0x3794EC)) void EnWonderTalk_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnWonderTalk* this = (EnWonderTalk*)thisx; diff --git a/code/src/actors/chest.c b/code/src/actors/chest.c index 3c2c6285..de6c0b99 100644 --- a/code/src/actors/chest.c +++ b/code/src/actors/chest.c @@ -10,11 +10,9 @@ #include "objects.h" #include "custom_models.h" -#define EnBox_Init_addr 0x1899EC -#define EnBox_Init ((ActorFunc)EnBox_Init_addr) +#define EnBox_Init ((ActorFunc)GAME_ADDR(0x1899EC)) -#define EnBox_Update_addr 0x1D5B70 -#define EnBox_Update ((ActorFunc)EnBox_Update_addr) +#define EnBox_Update ((ActorFunc)GAME_ADDR(0x1D5B70)) static Actor* sLastTrapChest = 0; static Actor* sBomb = 0; diff --git a/code/src/actors/chest_minigame.c b/code/src/actors/chest_minigame.c index 6c896138..23159e25 100644 --- a/code/src/actors/chest_minigame.c +++ b/code/src/actors/chest_minigame.c @@ -2,13 +2,11 @@ #include "settings.h" #include "chest_minigame.h" -#define EnTakaraMan_Init_addr 0x26DEB8 -#define EnTakaraMan_Init ((ActorFunc)EnTakaraMan_Init_addr) +#define EnTakaraMan_Init ((ActorFunc)GAME_ADDR(0x26DEB8)) -#define EnChanger_Init_addr 0x20EC50 -#define EnChanger_Init ((ActorFunc)EnChanger_Init_addr) +#define EnChanger_Init ((ActorFunc)GAME_ADDR(0x20EC50)) -#define sLoserGetItemIds ((s32*)0x521774) +#define sLoserGetItemIds ((s32*)GAME_ADDR(0x521774)) void EnTakaraMan_rInit(Actor* thisx, GlobalContext* globalCtx) { if (gSettingsContext.shuffleChestMinigame) { diff --git a/code/src/actors/collapsing_castle.c b/code/src/actors/collapsing_castle.c index b34bcffe..6be07d68 100644 --- a/code/src/actors/collapsing_castle.c +++ b/code/src/actors/collapsing_castle.c @@ -1,8 +1,7 @@ #include "z3D/z3D.h" #include "collapsing_castle.h" -#define DemoGt_Update_addr 0x12E1C4 -#define DemoGt_Update ((ActorFunc)DemoGt_Update_addr) +#define DemoGt_Update ((ActorFunc)GAME_ADDR(0x12E1C4)) void DemoGt_rUpdate(Actor* thisx, GlobalContext* globalCtx) { DemoGt_Update(thisx, globalCtx); diff --git a/code/src/actors/collapsing_platform.c b/code/src/actors/collapsing_platform.c index ce5dbb5d..e196cb74 100644 --- a/code/src/actors/collapsing_platform.c +++ b/code/src/actors/collapsing_platform.c @@ -1,12 +1,11 @@ #include "collapsing_platform.h" #include "multiplayer.h" -#define ObjLift_Update_addr 0x2159DC -#define ObjLift_Update ((ActorFunc)ObjLift_Update_addr) +#define ObjLift_Update ((ActorFunc)GAME_ADDR(0x2159DC)) -#define ObjLift_Wait (void*)0x3C05B0 -#define ObjLift_Shake (void*)0x110E98 -#define ObjLift_Fall (void*)0x3BB7BC +#define ObjLift_Wait (void*)GAME_ADDR(0x3C05B0) +#define ObjLift_Shake (void*)GAME_ADDR(0x110E98) +#define ObjLift_Fall (void*)GAME_ADDR(0x3BB7BC) void ObjLift_rUpdate(ObjLift* thisx, GlobalContext* globalCtx) { void* prev_action_fn = thisx->action_fn; diff --git a/code/src/actors/cow.c b/code/src/actors/cow.c index a3f24709..232995ba 100644 --- a/code/src/actors/cow.c +++ b/code/src/actors/cow.c @@ -3,11 +3,9 @@ #include "entrance.h" #include "cow.h" -#define EnCow_Init_addr 0x189FD4 -#define EnCow_Init ((ActorFunc)EnCow_Init_addr) +#define EnCow_Init ((ActorFunc)GAME_ADDR(0x189FD4)) -#define EnCow_Destroy_addr 0x18A3E4 -#define EnCow_Destroy ((ActorFunc)EnCow_Destroy_addr) +#define EnCow_Destroy ((ActorFunc)GAME_ADDR(0x18A3E4)) static s32 sNumCows = 0; diff --git a/code/src/actors/dampe.c b/code/src/actors/dampe.c index b377ec2b..cb6eaf26 100644 --- a/code/src/actors/dampe.c +++ b/code/src/actors/dampe.c @@ -1,7 +1,6 @@ #include "dampe.h" -#define EnTk_Update_addr 0x1BC088 -#define EnTk_Update ((ActorFunc)EnTk_Update_addr) +#define EnTk_Update ((ActorFunc)GAME_ADDR(0x1BC088)) void EnTk_rUpdate(Actor* thisx, GlobalContext* globalCtx) { // Custom collectible flag for the heart piece diff --git a/code/src/actors/deku_scrubs.c b/code/src/actors/deku_scrubs.c index c955fe44..2dcbb94e 100644 --- a/code/src/actors/deku_scrubs.c +++ b/code/src/actors/deku_scrubs.c @@ -1,11 +1,10 @@ #include "deku_scrubs.h" -#define EnDntNomal_Update_addr 0x280510 -#define EnDntNomal_Update ((ActorFunc)EnDntNomal_Update_addr) +#define EnDntNomal_Update ((ActorFunc)GAME_ADDR(0x280510)) -#define EnDntNomal_SetupTargetWalk ((ActorFunc)0x21CED4) -#define EnDntNomal_SetupTargetGivePrize ((ActorFunc)0x2394CC) -#define EnDntNomal_SetupTargetUnburrow ((ActorFunc)0x21CCFC) +#define EnDntNomal_SetupTargetWalk ((ActorFunc)GAME_ADDR(0x21CED4)) +#define EnDntNomal_SetupTargetGivePrize ((ActorFunc)GAME_ADDR(0x2394CC)) +#define EnDntNomal_SetupTargetUnburrow ((ActorFunc)GAME_ADDR(0x21CCFC)) void EnDntNomal_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnDntNomal* this = (EnDntNomal*)thisx; diff --git a/code/src/actors/deku_tree_mouth.c b/code/src/actors/deku_tree_mouth.c index c87bc0e9..d36d6a53 100644 --- a/code/src/actors/deku_tree_mouth.c +++ b/code/src/actors/deku_tree_mouth.c @@ -2,8 +2,7 @@ #include "settings.h" #include "z3D/z3D.h" -#define BgTreemouth_Init_addr 0x2412B4 -#define BgTreemouth_Init ((ActorFunc)BgTreemouth_Init_addr) +#define BgTreemouth_Init ((ActorFunc)GAME_ADDR(0x2412B4)) void BgTreemouth_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/demo_effect.c b/code/src/actors/demo_effect.c index 3d1507b4..f0b8b496 100644 --- a/code/src/actors/demo_effect.c +++ b/code/src/actors/demo_effect.c @@ -2,14 +2,11 @@ #include "z3D/actors/z_demo_effect.h" #include "models.h" -#define DemoEffect_Init_addr 0x22345C -#define DemoEffect_Init ((ActorFunc)DemoEffect_Init_addr) +#define DemoEffect_Init ((ActorFunc)GAME_ADDR(0x22345C)) -#define DemoEffect_Destroy_addr 0x2245B8 -#define DemoEffect_Destroy ((ActorFunc)DemoEffect_Destroy_addr) +#define DemoEffect_Destroy ((ActorFunc)GAME_ADDR(0x2245B8)) -#define DemoEffect_Update_addr 0x262C58 -#define DemoEffect_Update ((ActorFunc)DemoEffect_Update_addr) +#define DemoEffect_Update ((ActorFunc)GAME_ADDR(0x262C58)) #define THIS ((DemoEffect*)thisx) diff --git a/code/src/actors/demo_kankyo.c b/code/src/actors/demo_kankyo.c index 421fd9ed..80c34963 100644 --- a/code/src/actors/demo_kankyo.c +++ b/code/src/actors/demo_kankyo.c @@ -4,8 +4,7 @@ #include "entrance.h" #include "grotto.h" -#define DemoKankyo_Update_addr 0x262EA4 -#define DemoKankyo_Update ((ActorFunc)DemoKankyo_Update_addr) +#define DemoKankyo_Update ((ActorFunc)GAME_ADDR(0x262EA4)) #define CsTimer (globalCtx->csCtx.frames) diff --git a/code/src/actors/dodongos.c b/code/src/actors/dodongos.c index 4bb9e24c..eb93c8dd 100644 --- a/code/src/actors/dodongos.c +++ b/code/src/actors/dodongos.c @@ -2,8 +2,8 @@ #include "dodongos.h" #include "enemy_souls.h" -#define EnDodongo_Idle ((EnDodongoActionFunc)0x3E4FE8) -#define EnDodojr_JumpAttackBounce ((EnDodojrActionFunc)0x3D069C) +#define EnDodongo_Idle ((EnDodongoActionFunc)GAME_ADDR(0x3E4FE8)) +#define EnDodojr_JumpAttackBounce ((EnDodojrActionFunc)GAME_ADDR(0x3D069C)) s32 Dodongos_AfterSwallowBomb_Normal(EnDodongo* this) { if (!EnemySouls_CheckSoulForActor(&this->base)) { diff --git a/code/src/actors/door.c b/code/src/actors/door.c index 2deace0b..5b2d5e20 100644 --- a/code/src/actors/door.c +++ b/code/src/actors/door.c @@ -18,11 +18,10 @@ void Door_CheckToDeleteCustomModels(Actor* door) { // EnDoor -#define EnDoor_Update_addr 0x1F53C8 -#define EnDoor_Update ((ActorFunc)EnDoor_Update_addr) +#define EnDoor_Update ((ActorFunc)GAME_ADDR(0x1F53C8)) -#define EnDoor_Idle (void*)0x3F1B28 -#define EnDoor_Open (void*)0x3EC04C +#define EnDoor_Idle (void*)GAME_ADDR(0x3F1B28) +#define EnDoor_Open (void*)GAME_ADDR(0x3EC04C) void EnDoor_Unlocking(EnDoor* thisx, GlobalContext* globalCtx); void EnDoor_rUpdate(EnDoor* thisx, GlobalContext* globalCtx) { @@ -55,8 +54,7 @@ void EnDoor_Unlocking(EnDoor* thisx, GlobalContext* globalCtx) { // DoorShutter -#define DoorShutter_Init_addr 0x2453E0 -#define DoorShutter_Init ((ActorFunc)DoorShutter_Init_addr) +#define DoorShutter_Init ((ActorFunc)GAME_ADDR(0x2453E0)) void DoorShutter_rInit(Actor* thisx, GlobalContext* globalCtx) { // In Treasure Chest Shop when its chests are shuffled, @@ -67,11 +65,11 @@ void DoorShutter_rInit(Actor* thisx, GlobalContext* globalCtx) { DoorShutter_Init(thisx, globalCtx); } -#define DoorShutter_Update_addr 0x27E6E0 -#define DoorShutter_Update ((ActorFunc)DoorShutter_Update_addr) +#define DoorShutter_Update_addr +#define DoorShutter_Update ((ActorFunc)GAME_ADDR(0x27E6E0)) -#define DoorShutter_SlidingDoor_Idle (void*)0x3F4A3C -#define DoorShutter_SlidingDoor_Open (void*)0x3EEE7C +#define DoorShutter_SlidingDoor_Idle (void*)GAME_ADDR(0x3F4A3C) +#define DoorShutter_SlidingDoor_Open (void*)GAME_ADDR(0x3EEE7C) void DoorShutter_Unlocking(DoorShutter* thisx, GlobalContext* globalCtx); void DoorShutter_rUpdate(DoorShutter* thisx, GlobalContext* globalCtx) { @@ -113,11 +111,10 @@ void DoorShutter_Unlocking(DoorShutter* thisx, GlobalContext* globalCtx) { // DoorGerudo -#define DoorGerudo_Update_addr 0x263118 -#define DoorGerudo_Update ((ActorFunc)DoorGerudo_Update_addr) +#define DoorGerudo_Update ((ActorFunc)GAME_ADDR(0x263118)) -#define DoorGerudo_Idle (void*)0x3F3FA0 -#define DoorGerudo_Unlocking (void*)0x3EEE38 +#define DoorGerudo_Idle (void*)GAME_ADDR(0x3F3FA0) +#define DoorGerudo_Unlocking (void*)GAME_ADDR(0x3EEE38) void DoorGerudo_rUpdate(DoorGerudo* thisx, GlobalContext* globalCtx) { void* prev_action_fn = thisx->action_fn; diff --git a/code/src/actors/drawbridge.c b/code/src/actors/drawbridge.c index 14c62d77..2361b483 100644 --- a/code/src/actors/drawbridge.c +++ b/code/src/actors/drawbridge.c @@ -1,8 +1,7 @@ #include "z3D/z3D.h" #include "drawbridge.h" -#define BgSpot00Hanebasi_Update_addr 0x38B390 -#define BgSpot00Hanebasi_Update ((ActorFunc)BgSpot00Hanebasi_Update_addr) +#define BgSpot00Hanebasi_Update ((ActorFunc)GAME_ADDR(0x38B390)) void BgSpot00Hanebasi_rUpdate(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/en_ex_item.c b/code/src/actors/en_ex_item.c index 487d7c72..c18f8df8 100644 --- a/code/src/actors/en_ex_item.c +++ b/code/src/actors/en_ex_item.c @@ -2,11 +2,9 @@ #include "z3D/actors/z_en_ex_item.h" #include "models.h" -#define EnExItem_Init_addr 0x20FC50 -#define EnExItem_Init ((ActorFunc)EnExItem_Init_addr) +#define EnExItem_Init ((ActorFunc)GAME_ADDR(0x20FC50)) -#define EnExItem_Destroy_addr 0x20FDE0 -#define EnExItem_Destroy ((ActorFunc)EnExItem_Destroy_addr) +#define EnExItem_Destroy ((ActorFunc)GAME_ADDR(0x20FDE0)) #define THIS ((EnExItem*)thisx) diff --git a/code/src/actors/flying_traps.c b/code/src/actors/flying_traps.c index e17d97c0..39c0d5a6 100644 --- a/code/src/actors/flying_traps.c +++ b/code/src/actors/flying_traps.c @@ -2,8 +2,8 @@ #include "flying_traps.h" #include "enemy_souls.h" -#define EnYukabyun_Levitate ((EnYukabyun_ActionFunc)0x3B9E3C) -#define EnTuboTrap_WaitForProximity ((EnTuboTrap_ActionFunc)0x3E6F88) +#define EnYukabyun_Levitate ((EnYukabyun_ActionFunc)GAME_ADDR(0x3B9E3C)) +#define EnTuboTrap_WaitForProximity ((EnTuboTrap_ActionFunc)GAME_ADDR(0x3E6F88)) s32 FlyingTraps_Tile_OnImpact(EnYukabyun* this) { if (!EnemySouls_CheckSoulForActor(&this->base)) { diff --git a/code/src/actors/ganondorf_organ.c b/code/src/actors/ganondorf_organ.c index 9d4b99b8..d507d5b5 100644 --- a/code/src/actors/ganondorf_organ.c +++ b/code/src/actors/ganondorf_organ.c @@ -1,7 +1,6 @@ #include "z3D/z3D.h" -#define EnGanonOrgan_Init_addr 0x280E0C -#define EnGanonOrgan_Init ((ActorFunc)EnGanonOrgan_Init_addr) +#define EnGanonOrgan_Init ((ActorFunc)GAME_ADDR(0x280E0C)) void EnGanonOrgan_rInit(Actor* organ, GlobalContext* globalCtx) { gSaveContext.eventChkInf[12] &= ~0x80; diff --git a/code/src/actors/gerudos.c b/code/src/actors/gerudos.c index eefcb6ea..7f010490 100644 --- a/code/src/actors/gerudos.c +++ b/code/src/actors/gerudos.c @@ -3,14 +3,11 @@ #include "gerudos.h" -#define EnGe1_Init_addr 0x18B218 -#define EnGe1_Init ((ActorFunc)EnGe1_Init_addr) +#define EnGe1_Init ((ActorFunc)GAME_ADDR(0x18B218)) -#define EnGe1_Update_addr 0x1D742C -#define EnGe1_Update ((ActorFunc)EnGe1_Update_addr) +#define EnGe1_Update ((ActorFunc)GAME_ADDR(0x1D742C)) -#define EnGe1_TalkAfterGame_Archery_addr 0x12A5C8 -#define EnGe1_TalkAfterGame_Archery ((ActorFunc)EnGe1_TalkAfterGame_Archery_addr) +#define EnGe1_TalkAfterGame_Archery ((ActorFunc)GAME_ADDR(0x12A5C8)) void EnGe1_rInit(Actor* thisx, GlobalContext* globalCtx) { EnGe1* self = (EnGe1*)thisx; diff --git a/code/src/actors/gorons.c b/code/src/actors/gorons.c index ed259145..e3cecb0a 100644 --- a/code/src/actors/gorons.c +++ b/code/src/actors/gorons.c @@ -4,7 +4,7 @@ #include "gorons.h" -#define EnGo2_SetGetItem ((EnGo2_ActionFunc)0x133EBC) +#define EnGo2_SetGetItem ((EnGo2_ActionFunc)GAME_ADDR(0x133EBC)) void EnGo2_rBiggoronSetTextId(EnGo2* self) { Player* player = PLAYER; diff --git a/code/src/actors/gossip_stone.c b/code/src/actors/gossip_stone.c index 78a0428e..dc766eae 100644 --- a/code/src/actors/gossip_stone.c +++ b/code/src/actors/gossip_stone.c @@ -1,8 +1,7 @@ #include "gossip_stone.h" #include "z3D/z3D.h" -#define EnGs_Init_addr 0x16461C -#define EnGs_Init ((ActorFunc)EnGs_Init_addr) +#define EnGs_Init ((ActorFunc)GAME_ADDR(0x16461C)) void EnGs_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/graveyard_objects.c b/code/src/actors/graveyard_objects.c index a395483b..6cb583cf 100644 --- a/code/src/actors/graveyard_objects.c +++ b/code/src/actors/graveyard_objects.c @@ -3,10 +3,9 @@ #define CsTimer (gGlobalContext->csCtx.frames) -#define BgSpot02Objects_Update_addr 0x3831AC -#define BgSpot02Objects_Update ((ActorFunc)BgSpot02Objects_Update_addr) +#define BgSpot02Objects_Update ((ActorFunc)GAME_ADDR(0x3831AC)) -#define BgSpot02Objects_Explode (void*)0x205EDC +#define BgSpot02Objects_Explode (void*)GAME_ADDR(0x205EDC) void BgSpot02Objects_rUpdate(Actor* thisx, GlobalContext* globalCtx) { BgSpot02Objects_Update(thisx, globalCtx); diff --git a/code/src/actors/grog.c b/code/src/actors/grog.c index 5871cacc..05d0ba38 100644 --- a/code/src/actors/grog.c +++ b/code/src/actors/grog.c @@ -3,7 +3,7 @@ #include "grog.h" -#define EnHs_ActionAfterTradeCojiro ((EnHs_ActionFunc)0x3B02C0) +#define EnHs_ActionAfterTradeCojiro ((EnHs_ActionFunc)GAME_ADDR(0x3B02C0)) void EnHs_CheckForShouldDespawn(EnHs* self) { if ((gSettingsContext.shuffleAdultTradeQuest == SHUFFLEADULTTRADEQUEST_ON) && diff --git a/code/src/actors/gtg_gate.c b/code/src/actors/gtg_gate.c index a716044e..488a6392 100644 --- a/code/src/actors/gtg_gate.c +++ b/code/src/actors/gtg_gate.c @@ -1,11 +1,9 @@ #include "gtg_gate.h" #include "settings.h" -#define BgSpot12Saku_Update_addr 0x29E030 -#define BgSpot12Saku_Update ((ActorFunc)BgSpot12Saku_Update_addr) +#define BgSpot12Saku_Update ((ActorFunc)GAME_ADDR(0x29E030)) -#define BgSpot12Saku_Init_addr 0x27AD6C -#define BgSpot12Saku_Init ((ActorFunc)BgSpot12Saku_Init_addr) +#define BgSpot12Saku_Init ((ActorFunc)GAME_ADDR(0x27AD6C)) void BgSpot12Saku_rUpdate(Actor* thisx, GlobalContext* globalCtx) { // If ER is on, when the guard opens the GtG gate its permanent flag will be set. diff --git a/code/src/actors/heart_container.c b/code/src/actors/heart_container.c index 0baf7fc3..0f1af662 100644 --- a/code/src/actors/heart_container.c +++ b/code/src/actors/heart_container.c @@ -2,17 +2,13 @@ #include "z3D/actors/z_item_b_heart.h" #include "models.h" -#define ItemBHeart_Init_addr 0x25375C -#define ItemBHeart_Init ((ActorFunc)ItemBHeart_Init_addr) +#define ItemBHeart_Init ((ActorFunc)GAME_ADDR(0x25375C)) -#define ItemBHeart_Destroy_addr 0x2537D4 -#define ItemBHeart_Destroy ((ActorFunc)ItemBHeart_Destroy_addr) +#define ItemBHeart_Destroy ((ActorFunc)GAME_ADDR(0x2537D4)) -#define ItemBHeart_Update_addr 0x285C18 -#define ItemBHeart_Update ((ActorFunc)ItemBHeart_Update_addr) +#define ItemBHeart_Update ((ActorFunc)GAME_ADDR(0x285C18)) -#define ItemBHeart_Draw_addr 0x285BEC -#define ItemBHeart_Draw ((ActorFunc)ItemBHeart_Draw_addr) +#define ItemBHeart_Draw ((ActorFunc)GAME_ADDR(0x285BEC)) #define THIS ((ItemBHeart*)thisx) diff --git a/code/src/actors/hookshot.c b/code/src/actors/hookshot.c index 989d0027..b7378c20 100644 --- a/code/src/actors/hookshot.c +++ b/code/src/actors/hookshot.c @@ -2,10 +2,9 @@ #include "hookshot.h" #include "settings.h" -#define ArmsHook_Init_addr 0x1EBF84 -#define ArmsHook_Init ((ActorFunc)ArmsHook_Init_addr) +#define ArmsHook_Init ((ActorFunc)GAME_ADDR(0x1EBF84)) -#define HookshotRotation (f32*)0x4C257C +#define HookshotRotation (f32*)GAME_ADDR(0x4C257C) void ArmsHook_rInit(Actor* thisx, GlobalContext* globalCtx) { ArmsHook_Init(thisx, globalCtx); diff --git a/code/src/actors/item00.c b/code/src/actors/item00.c index 0f818cd5..0fd1b7ea 100644 --- a/code/src/actors/item00.c +++ b/code/src/actors/item00.c @@ -3,17 +3,13 @@ #include "models.h" #include "settings.h" -#define EnItem00_Init_addr 0x1F69B4 -#define EnItem00_Init ((ActorFunc)EnItem00_Init_addr) +#define EnItem00_Init ((ActorFunc)GAME_ADDR(0x1F69B4)) -#define EnItem00_Destroy_addr 0x1F706C -#define EnItem00_Destroy ((ActorFunc)EnItem00_Destroy_addr) +#define EnItem00_Destroy ((ActorFunc)GAME_ADDR(0x1F706C)) -#define EnItem00_Update_addr 0x22B71C -#define EnItem00_Update ((ActorFunc)EnItem00_Update_addr) +#define EnItem00_Update ((ActorFunc)GAME_ADDR(0x22B71C)) -#define EnItem00_Draw_addr 0x22B6C0 -#define EnItem00_Draw ((ActorFunc)EnItem00_Draw_addr) +#define EnItem00_Draw ((ActorFunc)GAME_ADDR(0x22B6C0)) #define THIS ((EnItem00*)thisx) diff --git a/code/src/actors/item_etcetera.c b/code/src/actors/item_etcetera.c index a1eb7936..d628016a 100644 --- a/code/src/actors/item_etcetera.c +++ b/code/src/actors/item_etcetera.c @@ -3,17 +3,13 @@ #include "models.h" #include "settings.h" -#define ItemEtcetera_Init_addr 0x273F28 -#define ItemEtcetera_Init ((ActorFunc)ItemEtcetera_Init_addr) +#define ItemEtcetera_Init ((ActorFunc)GAME_ADDR(0x273F28)) -#define ItemEtcetera_Destroy_addr 0x2740BC -#define ItemEtcetera_Destroy ((ActorFunc)ItemEtcetera_Destroy_addr) +#define ItemEtcetera_Destroy ((ActorFunc)GAME_ADDR(0x2740BC)) -#define ItemEtcetera_Update_addr 0x298D88 -#define ItemEtcetera_Update ((ActorFunc)ItemEtcetera_Update_addr) +#define ItemEtcetera_Update ((ActorFunc)GAME_ADDR(0x298D88)) -#define ItemEtcetera_Draw_addr 0x11707C -#define ItemEtcetera_Draw ((ActorFunc)ItemEtcetera_Draw_addr) +#define ItemEtcetera_Draw ((ActorFunc)GAME_ADDR(0x11707C)) #define THIS ((ItemEtcetera*)thisx) diff --git a/code/src/actors/jabu.c b/code/src/actors/jabu.c index 9011c2e4..317b8e1b 100644 --- a/code/src/actors/jabu.c +++ b/code/src/actors/jabu.c @@ -3,8 +3,7 @@ #include "entrance.h" #include "grotto.h" -#define BgBdanSwitch_Init_addr 0x276508 -#define BgBdanSwitch_Init ((ActorFunc)BgBdanSwitch_Init_addr) +#define BgBdanSwitch_Init ((ActorFunc)GAME_ADDR(0x276508)) void Jabu_SkipOpeningCutscene(void) { gGlobalContext->nextEntranceIndex = Entrance_OverrideNextIndex(0x0028); diff --git a/code/src/actors/king_zora.c b/code/src/actors/king_zora.c index 093dbff1..d0c1d2bb 100644 --- a/code/src/actors/king_zora.c +++ b/code/src/actors/king_zora.c @@ -3,8 +3,7 @@ #include "king_zora.h" #include "common.h" -#define EnKz_Update_addr 0x1B66F8 -#define EnKz_Update ((ActorFunc)EnKz_Update_addr) +#define EnKz_Update ((ActorFunc)GAME_ADDR(0x1B66F8)) u32 EnKz_CheckMovedFlag(void) { if ((gSaveContext.eventChkInf[3] & 0x8) || diff --git a/code/src/actors/lake_hylia_objects.c b/code/src/actors/lake_hylia_objects.c index 04d86f0f..42792bac 100644 --- a/code/src/actors/lake_hylia_objects.c +++ b/code/src/actors/lake_hylia_objects.c @@ -2,11 +2,9 @@ #include "lake_hylia_objects.h" #include "objects.h" -#define BgSpot06Objects_Update_addr 0x3833F8 -#define BgSpot06Objects_Update ((ActorFunc)BgSpot06Objects_Update_addr) +#define BgSpot06Objects_Update ((ActorFunc)GAME_ADDR(0x3833F8)) -#define BgSpot06Objects_Destroy_addr 0x2AD1E4 -#define BgSpot06Objects_Destroy ((ActorFunc)BgSpot06Objects_Destroy_addr) +#define BgSpot06Objects_Destroy ((ActorFunc)GAME_ADDR(0x2AD1E4)) static u8 actionCounter = 0; // used to perform some actions on subsequent frames static s8 waterMovement = 0; // to be used when implementing moving water plane diff --git a/code/src/actors/liftable_rock.c b/code/src/actors/liftable_rock.c index da10cee9..70d6aa03 100644 --- a/code/src/actors/liftable_rock.c +++ b/code/src/actors/liftable_rock.c @@ -2,13 +2,11 @@ #include "settings.h" #include "multiplayer.h" -#define EnIshi_Init_addr 0x1B5460 -#define EnIshi_Init ((ActorFunc)EnIshi_Init_addr) +#define EnIshi_Init ((ActorFunc)GAME_ADDR(0x1B5460)) -#define EnIshi_Update_addr 0x1F69AC -#define EnIshi_Update ((ActorFunc)EnIshi_Update_addr) +#define EnIshi_Update ((ActorFunc)GAME_ADDR(0x1F69AC)) -#define EnIshi_LiftedUp (void*)0x3CBAC4 +#define EnIshi_LiftedUp (void*)GAME_ADDR(0x3CBAC4) void EnIshi_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/link_puppet.c b/code/src/actors/link_puppet.c index b8c274ca..95d60b29 100644 --- a/code/src/actors/link_puppet.c +++ b/code/src/actors/link_puppet.c @@ -46,7 +46,7 @@ static ColliderCylinderInit EnLinkPupper_ColliderCylinderInit = { typedef void (*SkelAnime_InitLink_proc)(SkelAnime* skelAnime, ZARInfo* zarInfo, GlobalContext* globalCtx, void* cmbMan, void* param_5, u32 animation, s32 limbBufCount, void* jointTable, void* morphTable); -#define SkelAnime_InitLink ((SkelAnime_InitLink_proc)0x3413EC) +#define SkelAnime_InitLink ((SkelAnime_InitLink_proc)GAME_ADDR(0x3413EC)) // When posing the model by copying the joint table, the model for some reason gets raised about 12 units. static const f32 childOffsetY = 12.5f; @@ -92,7 +92,7 @@ void EnLinkPuppet_Init(EnLinkPuppet* this, GlobalContext* globalCtx) { } typedef void (*SkelAnime_Free2_proc)(SkelAnime* anime); -#define SkelAnime_Free2 ((SkelAnime_Free2_proc)0x350BE0) +#define SkelAnime_Free2 ((SkelAnime_Free2_proc)GAME_ADDR(0x350BE0)) void EnLinkPuppet_Destroy(EnLinkPuppet* this, GlobalContext* globalCtx) { SkelAnime_Free2(&this->skelAnime); @@ -141,7 +141,7 @@ void EnLinkPuppet_Update(EnLinkPuppet* this, GlobalContext* globalCtx) { } } -#define Vec3f_PlayerFeet_unk ((Vec3f*)0x53CACC) +#define Vec3f_PlayerFeet_unk ((Vec3f*)GAME_ADDR(0x53CACC)) void EnLinkPuppet_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, nn_math_MTX34* mtx, EnLinkPuppet* this) { if (limbIndex != 0x15) { Actor_SetFeetPos((Actor*)this, mtx, limbIndex, 5, &Vec3f_PlayerFeet_unk[gSaveContext.linkAge], 8, @@ -151,14 +151,7 @@ void EnLinkPuppet_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, nn_math_ typedef void (*SkelAnime_DrawOpa_proc)(SkelAnime* skelAnime, nn_math_MTX34* modelMtx, void* overrideLimbDraw, void* postLimbDraw, Actor* param_5, u32 param_6); -#define SkelAnime_DrawOpa ((SkelAnime_DrawOpa_proc)0x35E240) - -typedef void (*EffectSsDeadDb_Spawn_proc)(GlobalContext* globalCtx, Vec3f* position, Vec3f* velocity, - Vec3f* acceleration, s16 scale, s16 scale_step, s16 prim_r, s16 prim_g, - s16 prim_b, s16 prim_a, s16 env_r, s16 env_g, s16 env_b, s16 unused, - s32 frame_duration, s16 play_sound); -#define EffectSsDeadDb_Spawn_addr 0x3642F4 -#define EffectSsDeadDb_Spawn ((EffectSsDeadDb_Spawn_proc)EffectSsDeadDb_Spawn_addr) +#define SkelAnime_DrawOpa ((SkelAnime_DrawOpa_proc)GAME_ADDR(0x35E240)) void EnLinkPuppet_Draw(EnLinkPuppet* this, GlobalContext* globalCtx) { // Check how many Link puppets already exist before this one. diff --git a/code/src/actors/malon.c b/code/src/actors/malon.c index 51c6e760..393f01ee 100644 --- a/code/src/actors/malon.c +++ b/code/src/actors/malon.c @@ -1,7 +1,6 @@ #include "malon.h" -#define EnMa1_Init_addr 0x18C334 -#define EnMa1_Init ((ActorFunc)EnMa1_Init_addr) +#define EnMa1_Init ((ActorFunc)GAME_ADDR(0x18C334)) void EnMa1_rInit(Actor* thisx, GlobalContext* globalCtx) { if (gSaveContext.eventChkInf[0x1] & 0x0010) { // If Talon has fled the castle... diff --git a/code/src/actors/nabooru.c b/code/src/actors/nabooru.c index d9d4a98b..0185457c 100644 --- a/code/src/actors/nabooru.c +++ b/code/src/actors/nabooru.c @@ -1,8 +1,7 @@ #include "z3D/z3D.h" #include "nabooru.h" -#define EnNb_Draw_addr 0x1B7FBC -#define EnNb_Draw ((ActorFunc)EnNb_Draw_addr) +#define EnNb_Draw ((ActorFunc)GAME_ADDR(0x1B7FBC)) void EnNb_rDraw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/obj_switch.c b/code/src/actors/obj_switch.c index 468490e9..4ee1c8a4 100644 --- a/code/src/actors/obj_switch.c +++ b/code/src/actors/obj_switch.c @@ -2,8 +2,7 @@ #include "obj_switch.h" #include "settings.h" -#define ObjSwitch_Init_addr 0x215A14 -#define ObjSwitch_Init ((ActorFunc)ObjSwitch_Init_addr) +#define ObjSwitch_Init ((ActorFunc)GAME_ADDR(0x215A14)) void ObjSwitch_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/ocarina.c b/code/src/actors/ocarina.c index 1bf9c203..92290246 100644 --- a/code/src/actors/ocarina.c +++ b/code/src/actors/ocarina.c @@ -2,14 +2,11 @@ #include "z3D/actors/z_item_ocarina.h" #include "models.h" -#define ItemOcarina_Init_addr 0x253818 -#define ItemOcarina_Init ((ActorFunc)ItemOcarina_Init_addr) +#define ItemOcarina_Init ((ActorFunc)GAME_ADDR(0x253818)) -#define ItemOcarina_Destroy_addr 0x253A1C -#define ItemOcarina_Destroy ((ActorFunc)ItemOcarina_Destroy_addr) +#define ItemOcarina_Destroy ((ActorFunc)GAME_ADDR(0x253A1C)) -#define ItemOcarina_Draw_addr 0x285D48 -#define ItemOcarina_Draw ((ActorFunc)ItemOcarina_Draw_addr) +#define ItemOcarina_Draw ((ActorFunc)GAME_ADDR(0x285D48)) #define THIS ((ItemOcarina*)thisx) diff --git a/code/src/actors/owl.c b/code/src/actors/owl.c index 71b635d2..2ac1c9cc 100644 --- a/code/src/actors/owl.c +++ b/code/src/actors/owl.c @@ -1,11 +1,9 @@ #include "z3D/z3D.h" #include "settings.h" -#define EnOwl_Init_Addr 0x18DB28 -#define EnOwl_Init ((ActorFunc)EnOwl_Init_Addr) +#define EnOwl_Init ((ActorFunc)GAME_ADDR(0x18DB28)) -#define EnOwl_Update_Addr 0x1DCB60 -#define EnOwl_Update ((ActorFunc)EnOwl_Update_Addr) +#define EnOwl_Update ((ActorFunc)GAME_ADDR(0x1DCB60)) static u8 shortcutActivated = 0xFF; diff --git a/code/src/actors/player.c b/code/src/actors/player.c index 6ce7958a..147457f4 100644 --- a/code/src/actors/player.c +++ b/code/src/actors/player.c @@ -12,22 +12,18 @@ #include "colors.h" #include "common.h" -#define PlayerActor_Init_addr 0x191844 -#define PlayerActor_Init ((ActorFunc)PlayerActor_Init_addr) +#define PlayerActor_Init ((ActorFunc)GAME_ADDR(0x191844)) -#define PlayerActor_Update_addr 0x1E1B54 -#define PlayerActor_Update ((ActorFunc)PlayerActor_Update_addr) +#define PlayerActor_Update ((ActorFunc)GAME_ADDR(0x1E1B54)) -#define PlayerActor_Destroy_addr 0x19262C -#define PlayerActor_Destroy ((ActorFunc)PlayerActor_Destroy_addr) +#define PlayerActor_Destroy ((ActorFunc)GAME_ADDR(0x19262C)) -#define PlayerActor_Draw_addr 0x4BF618 -#define PlayerActor_Draw ((ActorFunc)PlayerActor_Draw_addr) +#define PlayerActor_Draw ((ActorFunc)GAME_ADDR(0x4BF618)) -#define Hookshot_ActorInit ((ActorInit*)0x5108E8) +#define Hookshot_ActorInit ((ActorInit*)GAME_ADDR(0x5108E8)) -#define PlayerDListGroup_EmptySheathAdult ((void*)0x53C4D8) -#define PlayerDListGroup_EmptySheathChildWithHylianShield ((void*)0x53C4DC) +#define PlayerDListGroup_EmptySheathAdult ((void*)GAME_ADDR(0x53C4D8)) +#define PlayerDListGroup_EmptySheathChildWithHylianShield ((void*)GAME_ADDR(0x53C4DC)) #define OBJECT_LINK_OPENING 0x19F diff --git a/code/src/actors/pushblock.c b/code/src/actors/pushblock.c index 1a839fcb..7d17383c 100644 --- a/code/src/actors/pushblock.c +++ b/code/src/actors/pushblock.c @@ -1,8 +1,7 @@ #include "pushblock.h" #include "multiplayer.h" -#define ObjOshihiki_Update_addr 0x286520 -#define ObjOshihiki_Update ((ActorFunc)ObjOshihiki_Update_addr) +#define ObjOshihiki_Update ((ActorFunc)GAME_ADDR(0x286520)) void ObjOshihiki_rUpdate(Actor* thisx, GlobalContext* globalCtx) { Vec3f prevPos = thisx->world.pos; @@ -15,8 +14,7 @@ void ObjOshihiki_rUpdate(Actor* thisx, GlobalContext* globalCtx) { } } -#define BgSpot15Rrbox_Update_addr 0x2AD484 -#define BgSpot15Rrbox_Update ((ActorFunc)BgSpot15Rrbox_Update_addr) +#define BgSpot15Rrbox_Update ((ActorFunc)GAME_ADDR(0x2AD484)) void BgSpot15Rrbox_rUpdate(Actor* thisx, GlobalContext* globalCtx) { Vec3f prevPos = thisx->world.pos; diff --git a/code/src/actors/red_ice.c b/code/src/actors/red_ice.c index b286c841..9a8ef7d6 100644 --- a/code/src/actors/red_ice.c +++ b/code/src/actors/red_ice.c @@ -6,7 +6,7 @@ #define ACTOR_EN_ARROW 0x16 #define ARROW_ICE 4 -#define BgIceShelter_Melt ((BgIceShelterActionFunc)0x3F5F00) +#define BgIceShelter_Melt ((BgIceShelterActionFunc)GAME_ADDR(0x3F5F00)) #define NA_SE_EV_ICE_MELT 0x10001F9 void RedIce_CheckIceArrow(Collider* at, Collider* ac) { diff --git a/code/src/actors/rupee_trap.c b/code/src/actors/rupee_trap.c index 1b01195e..d07c8d33 100644 --- a/code/src/actors/rupee_trap.c +++ b/code/src/actors/rupee_trap.c @@ -1,8 +1,7 @@ #include "z3D/z3D.h" #include "settings.h" -#define EnExRuppy_Update_addr 0x2689B8 -#define EnExRuppy_Update ((ActorFunc)EnExRuppy_Update_addr) +#define EnExRuppy_Update ((ActorFunc)GAME_ADDR(0x2689B8)) void EnExRuppy_rUpdate(Actor* thisx, GlobalContext* globalCtx) { if (thisx->params == 0x2 && thisx->xzDistToPlayer < 30.0f) { diff --git a/code/src/actors/shabom.h b/code/src/actors/shabom.h index bb5db67b..b6b48795 100644 --- a/code/src/actors/shabom.h +++ b/code/src/actors/shabom.h @@ -6,9 +6,9 @@ struct EnBubble; typedef void (*EnBubbleActionFunc)(struct EnBubble*, GlobalContext*); -#define EnBubble_Update ((ActorFunc)0x228F24) -#define EnBubble_Draw ((ActorFunc)0X228CB4) -#define EnBubble_Disappear ((EnBubbleActionFunc)0x3B5190) +#define EnBubble_Update ((ActorFunc)GAME_ADDR(0x228F24)) +#define EnBubble_Draw ((ActorFunc)GAME_ADDR(0x228CB4)) +#define EnBubble_Disappear ((EnBubbleActionFunc)GAME_ADDR(0x3B5190)) // void EnBubble_rUpdate(Actor* thisx, GlobalContext* globalCtx); diff --git a/code/src/actors/shadow_ship.c b/code/src/actors/shadow_ship.c index d4451390..4f0539c9 100644 --- a/code/src/actors/shadow_ship.c +++ b/code/src/actors/shadow_ship.c @@ -9,7 +9,7 @@ typedef struct { ActorFunc action_fn; } EnTest; -#define EnTest_Wait (ActorFunc)0x39D8CC +#define EnTest_Wait ((ActorFunc)GAME_ADDR(0x39D8CC)) u8 ShadowShip_HasActiveStalfos(void) { for (Actor* actor = gGlobalContext->actorCtx.actorList[ACTORTYPE_ENEMY].first; actor != 0; actor = actor->next) { diff --git a/code/src/actors/shooting_gallery_man.c b/code/src/actors/shooting_gallery_man.c index 0d8ec551..4fcbede3 100644 --- a/code/src/actors/shooting_gallery_man.c +++ b/code/src/actors/shooting_gallery_man.c @@ -2,11 +2,9 @@ #include "entrance.h" #include "settings.h" -#define EnSyatekiMan_Init_addr 0x283F94 -#define EnSyatekiMan_Init ((ActorFunc)EnSyatekiMan_Init_addr) +#define EnSyatekiMan_Init ((ActorFunc)GAME_ADDR(0x283F94)) -#define EnSyatekiMan_Update_addr 0x2A60BC -#define EnSyatekiMan_Update ((ActorFunc)EnSyatekiMan_Update_addr) +#define EnSyatekiMan_Update ((ActorFunc)GAME_ADDR(0x2A60BC)) void EnSyatekiMan_rInit(Actor* thisx, GlobalContext* globalCtx) { // If child is in the adult shooting gallery or adult in the child shooting gallery, then despawn the shooting diff --git a/code/src/actors/shops.c b/code/src/actors/shops.c index 6bd5ab99..9188dd74 100644 --- a/code/src/actors/shops.c +++ b/code/src/actors/shops.c @@ -32,10 +32,10 @@ s32 Shop_CheckCanBuyBombchus(void) { s32 numShopItemsLoaded = 0; // Used to determine params. Reset this to 0 in ossan_destroy or smth -#define EnGirlA_Init ((ActorFunc)0x1D7F20) -#define EnGirlA_Draw ((ActorFunc)0x210188) +#define EnGirlA_Init ((ActorFunc)GAME_ADDR(0x1D7F20)) +#define EnGirlA_Draw ((ActorFunc)GAME_ADDR(0x210188)) -#define EnGirlA_InitializeItemAction ((EnGirlAActionFunc)0x14D5C8) +#define EnGirlA_InitializeItemAction ((EnGirlAActionFunc)GAME_ADDR(0x14D5C8)) void ShopsanityItem_Draw(Actor* itemx, GlobalContext* globalCtx); diff --git a/code/src/actors/shops.h b/code/src/actors/shops.h index 6cf0fa30..9fd7938b 100644 --- a/code/src/actors/shops.h +++ b/code/src/actors/shops.h @@ -140,7 +140,7 @@ typedef struct { /* 0x24 */ Vec3f modelPositionOffsets; } ShopItemEntry; // size 0x30 -#define EnGirlA_ShopItemEntries ((ShopItemEntry*)0x524F50) +#define EnGirlA_ShopItemEntries ((ShopItemEntry*)GAME_ADDR(0x524F50)) void ShopsanityItem_Init(Actor* itemx, GlobalContext* globalCtx); void ShopsanityItem_SellOut(Actor* itemx, u16 index); // Used for multiplayer diff --git a/code/src/actors/skulltula.c b/code/src/actors/skulltula.c index 0064d89b..05e8d40e 100644 --- a/code/src/actors/skulltula.c +++ b/code/src/actors/skulltula.c @@ -4,13 +4,11 @@ #include "common.h" #include "objects.h" -#define EnSw_Init_addr 0x1691C8 -#define EnSw_Init ((ActorFunc)EnSw_Init_addr) +#define EnSw_Init ((ActorFunc)GAME_ADDR(0x1691C8)) -#define EnSw_Update_addr 0x1BB110 -#define EnSw_Update ((ActorFunc)EnSw_Update_addr) +#define EnSw_Update ((ActorFunc)GAME_ADDR(0x1BB110)) -#define EnSw_GoldSkulltulaDeath (void*)0x3B91BC +#define EnSw_GoldSkulltulaDeath (void*)GAME_ADDR(0x3B91BC) const GsLocOverride rGsLocOverrides[100] = { 0 }; const GsLocOverride* gsSpawnQueue[10] = { 0 }; @@ -253,8 +251,7 @@ void EnSw_rUpdate(Actor* thisx, GlobalContext* globalCtx) { } typedef void (*FUN_00375B70_proc)(GlobalContext* globalCtx, Actor* actor); -#define FUN_00375B70_addr 0x375B70 -#define FUN_00375B70 ((FUN_00375B70_proc)FUN_00375B70_addr) +#define FUN_00375B70 ((FUN_00375B70_proc)GAME_ADDR(0x375B70)) void EnSw_Kill(EnSw* thisx, GlobalContext* globalCtx) { if (thisx->action_fn == EnSw_GoldSkulltulaDeath || (thisx->base.params & 0x4000 && !gSaveContext.nightFlag)) { diff --git a/code/src/actors/skulltula_people.c b/code/src/actors/skulltula_people.c index af794db3..a5f2af15 100644 --- a/code/src/actors/skulltula_people.c +++ b/code/src/actors/skulltula_people.c @@ -1,7 +1,6 @@ #include "settings.h" -#define EnSsh_Update_addr 0x1DF0A4 -#define EnSsh_Update ((ActorFunc)EnSsh_Update_addr) +#define EnSsh_Update ((ActorFunc)GAME_ADDR(0x1DF0A4)) void EnSsh_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnSsh_Update(thisx, globalCtx); diff --git a/code/src/actors/title_screen.c b/code/src/actors/title_screen.c index bbd026b8..6fa2db1a 100644 --- a/code/src/actors/title_screen.c +++ b/code/src/actors/title_screen.c @@ -3,8 +3,7 @@ #include "objects.h" #include "title_screen.h" -#define EnMag_Init_addr 0x18CBB8 -#define EnMag_Init ((ActorFunc)EnMag_Init_addr) +#define EnMag_Init ((ActorFunc)GAME_ADDR(0x18CBB8)) u8 missingRomfsAlert = 0; s16 romfsAlertFrames = 0; diff --git a/code/src/actors/token.c b/code/src/actors/token.c index b40a7bfc..bd35fbf7 100644 --- a/code/src/actors/token.c +++ b/code/src/actors/token.c @@ -2,21 +2,17 @@ #include "z3D/actors/z_en_si.h" #include "models.h" -#define EnSi_Init_addr 0x168A90 -#define EnSi_Init ((ActorFunc)EnSi_Init_addr) +#define EnSi_Init ((ActorFunc)GAME_ADDR(0x168A90)) -#define EnSi_Destroy_addr 0x168C3C -#define EnSi_Destroy ((ActorFunc)EnSi_Destroy_addr) +#define EnSi_Destroy ((ActorFunc)GAME_ADDR(0x168C3C)) -#define EnSi_Update_addr 0x1BA0C8 -#define EnSi_Update ((ActorFunc)EnSi_Update_addr) +#define EnSi_Update ((ActorFunc)GAME_ADDR(0x1BA0C8)) -#define EnSi_Draw_addr 0x1BA050 -#define EnSi_Draw ((ActorFunc)EnSi_Draw_addr) +#define EnSi_Draw ((ActorFunc)GAME_ADDR(0x1BA050)) #define THIS ((EnSi*)thisx) -#define EnSi_DestroyAfterText (void*)0x3D0544 +#define EnSi_DestroyAfterText (void*)GAME_ADDR(0x3D0544) void EnSi_rInit(Actor* thisx, GlobalContext* globalCtx) { EnSi* token = THIS; diff --git a/code/src/actors/twinrova.c b/code/src/actors/twinrova.c index fef189b3..2dfb95cb 100644 --- a/code/src/actors/twinrova.c +++ b/code/src/actors/twinrova.c @@ -1,19 +1,15 @@ #include "z3D/z3D.h" #include "twinrova.h" -#define Boss_Tw_Init_addr 0x1A7E18 -#define Boss_Tw_Init ((ActorFunc)Boss_Tw_Init_addr) +#define Boss_Tw_Init ((ActorFunc)GAME_ADDR(0x1A7E18)) -#define Boss_Tw_Update_addr 0x1EF880 -#define Boss_Tw_Update ((ActorFunc)Boss_Tw_Update_addr) +#define Boss_Tw_Update ((ActorFunc)GAME_ADDR(0x1EF880)) -#define Boss_Tw_Draw_addr 0x1EEDF0 -#define Boss_Tw_Draw ((ActorFunc)Boss_Tw_Draw_addr) +#define Boss_Tw_Draw ((ActorFunc)GAME_ADDR(0x1EEDF0)) -#define Boss_Tw_Destroy_addr 0x1A88E8 -#define Boss_Tw_Destroy ((ActorFunc)Boss_Tw_Destroy_addr) +#define Boss_Tw_Destroy ((ActorFunc)GAME_ADDR(0x1A88E8)) -#define PlayActorMusic ((void (*)(u8 unk, u32 music))0x36EC40) +#define PlayActorMusic ((void (*)(u8 unk, u32 music))GAME_ADDR(0x36EC40)) #define BOSS_BATTLE_BGM 0x1000589 diff --git a/code/src/actors/web.c b/code/src/actors/web.c index 3e84d899..31081a86 100644 --- a/code/src/actors/web.c +++ b/code/src/actors/web.c @@ -1,14 +1,13 @@ #include "web.h" #include "multiplayer.h" -#define BgYdanSp_Update_addr 0x241EF8 -#define BgYdanSp_Update ((ActorFunc)BgYdanSp_Update_addr) +#define BgYdanSp_Update ((ActorFunc)GAME_ADDR(0x241EF8)) -#define BgYdanSp_FloorWebIdle (void*)0x19A8EC -#define BgYdanSp_WallWebIdle (void*)0x181C88 -#define BgYdanSp_BurnFloorWeb (void*)0x19A52C -#define BgYdanSp_BurnWallWeb (void*)0x181878 -#define BgYdanSp_FloorWebBreaking (void*)0x1E8438 +#define BgYdanSp_FloorWebIdle (void*)GAME_ADDR(0x19A8EC) +#define BgYdanSp_WallWebIdle (void*)GAME_ADDR(0x181C88) +#define BgYdanSp_BurnFloorWeb (void*)GAME_ADDR(0x19A52C) +#define BgYdanSp_BurnWallWeb (void*)GAME_ADDR(0x181878) +#define BgYdanSp_FloorWebBreaking (void*)GAME_ADDR(0x1E8438) void BgYdanSp_rUpdate(BgYdanSp* thisx, GlobalContext* globalCtx) { void* prev_action_fn = thisx->action_fn; diff --git a/code/src/actors/well_stone.c b/code/src/actors/well_stone.c index 4cadd494..5c4e22e2 100644 --- a/code/src/actors/well_stone.c +++ b/code/src/actors/well_stone.c @@ -4,8 +4,7 @@ // This actor is the stone blocking bottom of the well as adult Link. This is // different from the stone blocking child Link from getting into the well // early during the day before the well water has been drained. -#define BgSpot01Idosoko_Init_addr 0x2AC7C8 -#define BgSpot01Idosoko_Init ((ActorFunc)BgSpot01Idosoko_Init_addr) +#define BgSpot01Idosoko_Init ((ActorFunc)GAME_ADDR(0x2AC7C8)) void BgSpot01Idosoko_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/well_water.c b/code/src/actors/well_water.c index 3726f821..21709a59 100644 --- a/code/src/actors/well_water.c +++ b/code/src/actors/well_water.c @@ -2,8 +2,7 @@ #include "settings.h" // This actor is the water that blocks getting into Bottom of the Well as child -#define BgSpot01Idomizu_Init_addr 0x2AC704 -#define BgSpot01Idomizu_Init ((ActorFunc)BgSpot01Idomizu_Init_addr) +#define BgSpot01Idomizu_Init ((ActorFunc)GAME_ADDR(0x2AC704)) void BgSpot01Idomizu_rInit(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/actors/windmill_man.c b/code/src/actors/windmill_man.c index d9e6d310..fa3ef241 100644 --- a/code/src/actors/windmill_man.c +++ b/code/src/actors/windmill_man.c @@ -3,8 +3,7 @@ #define CsTimer (gGlobalContext->csCtx.frames) -#define EnFu_Update_addr 0x1B1328 -#define EnFu_Update ((ActorFunc)EnFu_Update_addr) +#define EnFu_Update ((ActorFunc)GAME_ADDR(0x1B1328)) void EnFu_rUpdate(Actor* thisx, GlobalContext* globalCtx) { EnFu_Update(thisx, globalCtx); diff --git a/code/src/arrow.c b/code/src/arrow.c index 0ab08c8b..6f1b4773 100644 --- a/code/src/arrow.c +++ b/code/src/arrow.c @@ -4,11 +4,11 @@ #include "settings.h" typedef s32 (*NockArrowFunc)(Player* player, GlobalContext* globalCtx); -#define NockArrow ((NockArrowFunc)0x33603C) +#define NockArrow ((NockArrowFunc)GAME_ADDR(0x33603C)) typedef void (*PlayAnimFunc)(void* p1, void* p2, s32 anim); // I'm not quite sure what these params are -#define LinkAnimation_PlayOnce ((PlayAnimFunc)0x3604F0) +#define LinkAnimation_PlayOnce ((PlayAnimFunc)GAME_ADDR(0x3604F0)) typedef void (*MagicResetFunc)(GlobalContext* globalCtx); -#define Magic_Reset ((MagicResetFunc)0x34708C) +#define Magic_Reset ((MagicResetFunc)GAME_ADDR(0x34708C)) static const u8 arrowsSlots[] = { SLOT_BOW, SLOT_ARROW_FIRE, SLOT_ARROW_ICE, SLOT_ARROW_LIGHT }; static const u8 arrowsItems[] = { ITEM_BOW, ITEM_ARROW_FIRE, ITEM_ARROW_ICE, ITEM_ARROW_LIGHT }; diff --git a/code/src/boss_challenge.c b/code/src/boss_challenge.c index e48409d2..09e84481 100644 --- a/code/src/boss_challenge.c +++ b/code/src/boss_challenge.c @@ -2,7 +2,7 @@ #include "multiplayer.h" #define STONES_MEDALLIONS_BITMASK 0x001C003F -#define bossChallengeData ((void*)0x5C3F58) +#define bossChallengeData ((void*)GAME_ADDR(0x5C3F58)) #define bossVictories ((u32*)(bossChallengeData + 0x1C)) static u32 ownedStonesMedallions = 0; diff --git a/code/src/camera.c b/code/src/camera.c index 3e24f5e3..a9f82185 100644 --- a/code/src/camera.c +++ b/code/src/camera.c @@ -5,7 +5,7 @@ #include "savefile.h" #include "settings.h" -#define GyroDrawHUDIcon *(u8*)0x4FC648 +#define GyroDrawHUDIcon (*(u8*)GAME_ADDR(0x4FC648)) s16 pitch = 0, yaw = 0; f32 dist = 0; diff --git a/code/src/effects.c b/code/src/effects.c index d9e293fb..75bd086a 100644 --- a/code/src/effects.c +++ b/code/src/effects.c @@ -31,7 +31,7 @@ typedef struct { /* 0x283 */ u8 unkDrawMode2; } EffectBlure; // size = ?? -#define EffectBlure_Update ((void (*)(EffectBlure*))0x227000) +#define EffectBlure_Update ((void (*)(EffectBlure*))GAME_ADDR(0x227000)) // This function is called when a new effect element tries to spawn but there's no space left. // The vanilla game simply fails to spawn the new element, but with the randomizer extended duration setting, diff --git a/code/src/entrance.c b/code/src/entrance.c index f2e4ed08..5f794deb 100644 --- a/code/src/entrance.c +++ b/code/src/entrance.c @@ -10,13 +10,12 @@ typedef void (*SetNextEntrance_proc)(struct GlobalContext* globalCtx, s16 entranceIndex, u32 sceneLoadFlag, u32 transition); -#define SetNextEntrance_addr 0x3716F0 -#define SetNextEntrance ((SetNextEntrance_proc)SetNextEntrance_addr) +#define SetNextEntrance_addr +#define SetNextEntrance ((SetNextEntrance_proc)GAME_ADDR(0x3716F0)) -#define dynamicExitList_addr 0x53C094 #define dynamicExitList \ - ((s16*)dynamicExitList_addr) // = { 0x045B, 0x0482, 0x0340, 0x044B, 0x02A2, 0x0201, 0x03B8, 0x04EE, 0x03C0, 0x0463, - // 0x01CD, 0x0394, 0x0340, 0x057C } + ((s16*)GAME_ADDR(0x53C094)) // = { 0x045B, 0x0482, 0x0340, 0x044B, 0x02A2, 0x0201, 0x03B8, 0x04EE, 0x03C0, 0x0463, + // 0x01CD, 0x0394, 0x0340, 0x057C } // Warp Song indices array : 0x53C33C = { 0x0600, 0x04F6, 0x0604, 0x01F1, 0x0568, 0x05F4 } diff --git a/code/src/fairy.c b/code/src/fairy.c index 0c5ec07f..1341850b 100644 --- a/code/src/fairy.c +++ b/code/src/fairy.c @@ -4,7 +4,7 @@ #include "objects.h" #include "common.h" -#define NAVI_COLORS_ARRAY ((Color_RGBA8*)0x50C998) +#define NAVI_COLORS_ARRAY ((Color_RGBA8*)GAME_ADDR(0x50C998)) #define NAVI_CYCLE_FRAMES_OUTER 18 #define NAVI_CYCLE_FRAMES_INNER 21 diff --git a/code/src/fog.c b/code/src/fog.c index 96a2b4ce..f330379f 100644 --- a/code/src/fog.c +++ b/code/src/fog.c @@ -3,8 +3,7 @@ #include "z3D/z3D.h" -#define z3D_Fog_State_addr 0x531EB4 -#define z3D_Fog_State (*(u8*)z3D_Fog_State_addr) +#define z3D_Fog_State (*(u8*)GAME_ADDR(0x531EB4)) // Override glitchy fog state when going through Market Entrance -> Hyrule Field // exit during entrance randomizer diff --git a/code/src/hints.c b/code/src/hints.c index f84230b4..63b87986 100644 --- a/code/src/hints.c +++ b/code/src/hints.c @@ -6,11 +6,11 @@ #define SCENE_YDAN_BOSS 17 -#define Player_GetMaskFunc_addr 0x36EF98 -u8 (*Player_GetMask)(GlobalContext*) = (void*)Player_GetMaskFunc_addr; +typedef u8 (*Player_GetMask_proc)(GlobalContext* globalCtx); +#define Player_GetMask ((Player_GetMask_proc)GAME_ADDR(0x36EF98)) -#define ElfMessage_GetSariaText_addr 0x31C698 -u16 (*ElfMessage_GetSariaText)(GlobalContext*) = (void*)ElfMessage_GetSariaText_addr; +typedef u16 (*ElfMessage_GetSariaText_proc)(GlobalContext* globalCtx); +#define ElfMessage_GetSariaText ((ElfMessage_GetSariaText_proc)GAME_ADDR(0x31C698)) u16 sSariasSongHintTextIds[MAX_SARIAS_SONG_HINTS] = { 0x0A00 }; s32 sNumSariasSongHints = 1; diff --git a/code/src/icetrap.c b/code/src/icetrap.c index bbbbbf65..4089be9c 100644 --- a/code/src/icetrap.c +++ b/code/src/icetrap.c @@ -5,9 +5,9 @@ #include "common.h" #include "input.h" -#define TimerFrameCounter *(s16*)0x539D8A // Used to decrease the timer every 30 frames -#define ControlStick_X *(float*)0x5655C0 -#define ControlStick_Y *(float*)0x5655C4 +#define TimerFrameCounter *(s16*)GAME_ADDR(0x539D8A) // Used to decrease the timer every 30 frames +#define ControlStick_X *(float*)GAME_ADDR(0x5655C0) +#define ControlStick_Y *(float*)GAME_ADDR(0x5655C4) static u8 pendingFreezes = 0; static u8 cooldown = 0; diff --git a/code/src/item_effect.c b/code/src/item_effect.c index 16953744..853c016a 100644 --- a/code/src/item_effect.c +++ b/code/src/item_effect.c @@ -160,8 +160,7 @@ void ItemEffect_TriforcePiece(SaveContext* saveCtx, s16 arg1, s16 arg2) { // With the No Ammo Drops option on, when the player gets an ammo upgrade, // the ammo count increases by 10 instead of being set to the maximum typedef void (*Inventory_ChangeUpgrade_proc)(u32 upgrade, u32 value); -#define Inventory_ChangeUpgrade_addr 0x33C730 -#define Inventory_ChangeUpgrade ((Inventory_ChangeUpgrade_proc)Inventory_ChangeUpgrade_addr) +#define Inventory_ChangeUpgrade ((Inventory_ChangeUpgrade_proc)GAME_ADDR(0x33C730)) void ItemEffect_GiveUpgrade(SaveContext* saveCtx, s16 arg1, s16 arg2) { Inventory_ChangeUpgrade(arg2, arg1); diff --git a/code/src/menus.c b/code/src/menus.c index 1c2d3153..7e7a5d2f 100644 --- a/code/src/menus.c +++ b/code/src/menus.c @@ -6,26 +6,26 @@ #include "dungeon_rewards.h" #include "item_override.h" -#define gItemsMenuSpritesManager (*(MenuSpriteManager**)0x506734) -#define gBowMenuSpritesManager (*(MenuSpriteManager**)0x506738) -#define gItemsMenuGlowSpritesManager (*(MenuSpriteManager**)0x50673C) -#define gMenuSpritesManager_506740 (*(MenuSpriteManager**)0x506740) -#define gDungeonMapMenuSpritesManager (*(MenuSpriteManager**)0x506CD0) -#define gGearMenuSpritesManager (*(MenuSpriteManager**)0x50447C) +#define gItemsMenuSpritesManager (*(MenuSpriteManager**)GAME_ADDR(0x506734)) +#define gBowMenuSpritesManager (*(MenuSpriteManager**)GAME_ADDR(0x506738)) +#define gItemsMenuGlowSpritesManager (*(MenuSpriteManager**)GAME_ADDR(0x50673C)) +#define gMenuSpritesManager_506740 (*(MenuSpriteManager**)GAME_ADDR(0x506740)) +#define gDungeonMapMenuSpritesManager (*(MenuSpriteManager**)GAME_ADDR(0x506CD0)) +#define gGearMenuSpritesManager (*(MenuSpriteManager**)GAME_ADDR(0x50447C)) -#define gItemsMenuSelectedSlot (*(s32*)0x506748) -#define gGearMenuSelectedSlot (*(s32*)0x50448C) +#define gItemsMenuSelectedSlot (*(s32*)GAME_ADDR(0x506748)) +#define gGearMenuSelectedSlot (*(s32*)GAME_ADDR(0x50448C)) typedef void (*MenuSpritesManager_RegisterItemSprite_proc)(MenuSpriteManager* menuMan, s32 spriteId, s32 itemId); -#define MenuSpritesManager_RegisterItemSprite ((MenuSpritesManager_RegisterItemSprite_proc)0x2F8D74) +#define MenuSpritesManager_RegisterItemSprite ((MenuSpritesManager_RegisterItemSprite_proc)GAME_ADDR(0x2F8D74)) typedef void (*MenuSpritesManager_SetSpriteAt_proc)(MenuSpriteManager* menuMan, s32 spriteId, s32 x, s32 y, s32 width, s32 height); -#define MenuSpritesManager_SetSpriteAt ((MenuSpritesManager_SetSpriteAt_proc)0x2F8D40) +#define MenuSpritesManager_SetSpriteAt ((MenuSpritesManager_SetSpriteAt_proc)GAME_ADDR(0x2F8D40)) typedef void (*MenuSpritesManager_OffsetSpriteAt_proc)(MenuSpriteManager* menuMan, s32 spriteId, s32 x, s32 y, s32 width, s32 height, s32 xOffset, s32 yOffset); -#define MenuSpritesManager_OffsetSpriteAt ((MenuSpritesManager_OffsetSpriteAt_proc)0x2EB3D8) +#define MenuSpritesManager_OffsetSpriteAt ((MenuSpritesManager_OffsetSpriteAt_proc)GAME_ADDR(0x2EB3D8)) void ItemsMenu_Draw(void) { s32 selectedItemSlot; diff --git a/code/src/message.c b/code/src/message.c index b2315e7b..b5315a75 100644 --- a/code/src/message.c +++ b/code/src/message.c @@ -12,12 +12,10 @@ volatile const u32 numCustomMessageEntries; volatile const MessageEntry* ptrCustomMessageEntries; typedef const MessageEntry* (*Message_GetEntry_proc)(void* param_1, u32 textId); -#define Message_GetEntry_addr 0x2DF4C4 -#define Message_GetEntry ((Message_GetEntry_proc)Message_GetEntry_addr) +#define Message_GetEntry ((Message_GetEntry_proc)GAME_ADDR(0x2DF4C4)) typedef const char* (*Message_GetText_proc)(void* param_1, u32 offset); -#define Message_GetText_addr 0x2DF4B0 -#define Message_GetText ((Message_GetText_proc)Message_GetText_addr) +#define Message_GetText ((Message_GetText_proc)GAME_ADDR(0x2DF4B0)) const MessageEntry* Message_GetCustomEntry(void* param_1, u32 textId) { s32 start; diff --git a/code/src/message.h b/code/src/message.h index abf2db55..38d7a736 100644 --- a/code/src/message.h +++ b/code/src/message.h @@ -105,12 +105,12 @@ typedef struct UnkTextControlData { } UnkTextControlData; typedef void (*Message_UnkControlCodeHandler_proc)(void* textObj, UnkTextControlData** data); -#define Message_UnkControlCodeHandler ((Message_UnkControlCodeHandler_proc)0x306318) +#define Message_UnkControlCodeHandler ((Message_UnkControlCodeHandler_proc)GAME_ADDR(0x306318)) typedef char* (*Message_CheckForControlCodes_proc)(void* data, char* nextChars); -#define Message_CheckForControlCodes ((Message_CheckForControlCodes_proc)0x4C08C0) +#define Message_CheckForControlCodes ((Message_CheckForControlCodes_proc)GAME_ADDR(0x4C08C0)) typedef void (*Message_SetInstantText_proc)(void* textObj); -#define Message_SetInstantText ((Message_SetInstantText_proc)0x40B608) +#define Message_SetInstantText ((Message_SetInstantText_proc)GAME_ADDR(0x40B608)) #endif //_MESSAGE_H_ diff --git a/code/src/models.c b/code/src/models.c index 0b9ea5fa..b4ad8233 100644 --- a/code/src/models.c +++ b/code/src/models.c @@ -9,22 +9,17 @@ #include typedef void (*SkeletonAnimationModel_MatrixCopy_proc)(SkeletonAnimationModel* glModel, nn_math_MTX34* mtx); -#define SkeletonAnimationModel_MatrixCopy_addr 0x3721E0 -#define SkeletonAnimationModel_MatrixCopy \ - ((SkeletonAnimationModel_MatrixCopy_proc)SkeletonAnimationModel_MatrixCopy_addr) +#define SkeletonAnimationModel_MatrixCopy ((SkeletonAnimationModel_MatrixCopy_proc)GAME_ADDR(0x3721E0)) typedef void (*SkeletonAnimationModel_Draw_proc)(SkeletonAnimationModel* glModel, s32 param_2); -#define SkeletonAnimationModel_Draw_addr 0x372170 -#define SkeletonAnimationModel_Draw ((SkeletonAnimationModel_Draw_proc)SkeletonAnimationModel_Draw_addr) +#define SkeletonAnimationModel_Draw ((SkeletonAnimationModel_Draw_proc)GAME_ADDR(0x372170)) typedef void (*SkeletonAnimationModel_SpawnAt_proc)(Actor* actor, GlobalContext* globalCtx, SkeletonAnimationModel** glModel, s32 objModelIdx); -#define SkeletonAnimationModel_SpawnAt_addr 0x372F38 -#define SkeletonAnimationModel_SpawnAt ((SkeletonAnimationModel_SpawnAt_proc)SkeletonAnimationModel_SpawnAt_addr) +#define SkeletonAnimationModel_SpawnAt ((SkeletonAnimationModel_SpawnAt_proc)GAME_ADDR(0x372F38)) typedef void (*Actor_SetModelMatrix_proc)(f32 x, f32 y, f32 z, nn_math_MTX34* mtx, ActorShape* shape); -#define Actor_SetModelMatrix_addr 0x3679D0 -#define Actor_SetModelMatrix ((Actor_SetModelMatrix_proc)Actor_SetModelMatrix_addr) +#define Actor_SetModelMatrix ((Actor_SetModelMatrix_proc)GAME_ADDR(0x3679D0)) #define LOADEDMODELS_MAX 16 Model ModelContext[LOADEDMODELS_MAX] = { 0 }; diff --git a/code/src/models.h b/code/src/models.h index 2ca3faed..a0f4740b 100644 --- a/code/src/models.h +++ b/code/src/models.h @@ -25,15 +25,12 @@ void Model_SetAnim(SkeletonAnimationModel* model, s16 objectId, u32 objectAnimId typedef SkeletonAnimationModel* (*SkeletonAnimationModel_Spawn_proc)(Actor* actor, GlobalContext* globalCtx, s16 objId, s32 objModelIdX); -#define SkeletonAnimationModel_Spawn_addr 0x36A924 -#define SkeletonAnimationModel_Spawn ((SkeletonAnimationModel_Spawn_proc)SkeletonAnimationModel_Spawn_addr) +#define SkeletonAnimationModel_Spawn ((SkeletonAnimationModel_Spawn_proc)GAME_ADDR(0x36A924)) typedef void (*SkeletonAnimationModel_SetMesh_proc)(SkeletonAnimationModel* glModel, s32 mesh); -#define SkeletonAnimationModel_SetMesh_addr 0x369178 -#define SkeletonAnimationModel_SetMesh ((SkeletonAnimationModel_SetMesh_proc)SkeletonAnimationModel_SetMesh_addr) +#define SkeletonAnimationModel_SetMesh ((SkeletonAnimationModel_SetMesh_proc)GAME_ADDR(0x369178)) typedef void (*DeleteModel_At_proc)(SkeletonAnimationModel** model); -#define DeleteModel_At_addr 0x357248 -#define DeleteModel_At ((DeleteModel_At_proc)DeleteModel_At_addr) +#define DeleteModel_At ((DeleteModel_At_proc)GAME_ADDR(0x357248)) #endif //_MODELS_H_ diff --git a/code/src/objects.h b/code/src/objects.h index ee1a57e1..bb48dd51 100644 --- a/code/src/objects.h +++ b/code/src/objects.h @@ -5,37 +5,25 @@ typedef s32 (*Object_proc)(ObjectContext* objectCtx, s16 objectId); -#define Object_Spawn_addr 0x32E21C -#define Object_Spawn ((Object_proc)Object_Spawn_addr) +#define Object_Spawn ((Object_proc)GAME_ADDR(0x32E21C)) -#define Object_GetIndex_addr 0x363C10 -#define Object_GetIndex ((Object_proc)Object_GetIndex_addr) +#define Object_GetIndex ((Object_proc)GAME_ADDR(0x363C10)) -#define Object_IsLoaded_addr 0x373074 -#define Object_IsLoaded ((Object_proc)Object_IsLoaded_addr) // For Object_IsLoaded, second param is bankIndex +#define Object_IsLoaded ((Object_proc)GAME_ADDR(0x373074)) // For Object_IsLoaded, second param is bankIndex typedef void (*Object_UpdateBank_proc)(ObjectContext* objectCtx); -#define Object_UpdateBank_addr 0x2E4EA0 -#define Object_UpdateBank ((Object_UpdateBank_proc)Object_UpdateBank_addr) +#define Object_UpdateBank ((Object_UpdateBank_proc)GAME_ADDR(0x2E4EA0)) typedef void (*Object_Clear_proc)(GlobalContext* globalCtx, ObjectContext* objectCtx); -#ifdef Version_EUR - #define Object_Clear_addr 0x45FDC0 -#else - #define Object_Clear_addr 0x45FDA0 -#endif -#define Object_Clear ((Object_Clear_proc)Object_Clear_addr) +#define Object_Clear ((Object_Clear_proc)GAME_ADDR(0x45FDA0)) typedef void* (*ZAR_Get_proc)(ZARInfo* zarInfo, u32 index); -#define ZAR_GetCMBByIndex_addr 0x358EF8 -#define ZAR_GetCMBByIndex ((ZAR_Get_proc)ZAR_GetCMBByIndex_addr) +#define ZAR_GetCMBByIndex ((ZAR_Get_proc)GAME_ADDR(0x358EF8)) -#define ZAR_GetCMABByIndex_addr 0x372F0C -#define ZAR_GetCMABByIndex ((ZAR_Get_proc)ZAR_GetCMABByIndex_addr) +#define ZAR_GetCMABByIndex ((ZAR_Get_proc)GAME_ADDR(0x372F0C)) typedef void (*TexAnim_Spawn_proc)(void*, void*); -#define TexAnim_Spawn_addr 0x372D94 -#define TexAnim_Spawn ((TexAnim_Spawn_proc)TexAnim_Spawn_addr) +#define TexAnim_Spawn ((TexAnim_Spawn_proc)GAME_ADDR(0x372D94)) typedef ObjectContext ExtendedObjectContext; diff --git a/code/src/ocarina_notes.h b/code/src/ocarina_notes.h index 02cf7a3b..ebb20873 100644 --- a/code/src/ocarina_notes.h +++ b/code/src/ocarina_notes.h @@ -60,7 +60,7 @@ enum OcarinaSprites { OCS_YELLOW_MARKER_5, }; // max 0x6C -#define OcarinaUIStruct (*((void**)0x5093EC)) +#define OcarinaUIStruct (*((void**)GAME_ADDR(0x5093EC))) s32 OcarinaNotes_IsButtonOwned(OcarinaNoteButton button); void OcarinaNotes_RegisterButtonOwned(OcarinaNoteButton button); diff --git a/code/src/oot_malloc.h b/code/src/oot_malloc.h index f0da9816..e7dd462c 100644 --- a/code/src/oot_malloc.h +++ b/code/src/oot_malloc.h @@ -2,13 +2,12 @@ #define _OOT_MALLOC_H_ #include "3ds/types.h" +#include "z3D/z3D.h" typedef void* (*SystemArena_Malloc_proc)(u32 size); -#define SystemArena_Malloc_addr 0x35010C -#define SystemArena_Malloc ((SystemArena_Malloc_proc)SystemArena_Malloc_addr) +#define SystemArena_Malloc ((SystemArena_Malloc_proc)GAME_ADDR(0x35010C)) typedef void (*SystemArena_Free_proc)(void* ptr); -#define SystemArena_Free_addr 0x34FC6C -#define SystemArena_Free ((SystemArena_Free_proc)SystemArena_Free_addr) +#define SystemArena_Free ((SystemArena_Free_proc)GAME_ADDR(0x34FC6C)) #endif //_OOT_MALLOC_H_ diff --git a/code/src/permadeath.c b/code/src/permadeath.c index 4a8b7502..facd4499 100644 --- a/code/src/permadeath.c +++ b/code/src/permadeath.c @@ -8,12 +8,7 @@ u8 Permadeath_GetOption(void) { } typedef void (*SaveFile_Delete_proc)(u8 fileNum); -#ifdef Version_EUR - #define SaveFile_Delete_addr 0x446FE4 -#else - #define SaveFile_Delete_addr 0x446FC4 -#endif -#define SaveFile_Delete ((SaveFile_Delete_proc)SaveFile_Delete_addr) +#define SaveFile_Delete ((SaveFile_Delete_proc)GAME_ADDR(0x446FC4)) void Permadeath_DeleteSave(void) { if (!Permadeath_GetOption()) { diff --git a/code/src/savefile.c b/code/src/savefile.c index b2328055..5d205de1 100644 --- a/code/src/savefile.c +++ b/code/src/savefile.c @@ -634,8 +634,7 @@ void SaveFile_BorrowMask(s16 SI_ItemId) { } typedef s32 (*Inventory_ReplaceItem_proc)(GlobalContext* globalCtx, u16 oldItem, u16 newItem); -#define Inventory_ReplaceItem_addr 0x316CEC -#define Inventory_ReplaceItem ((Inventory_ReplaceItem_proc)Inventory_ReplaceItem_addr) +#define Inventory_ReplaceItem ((Inventory_ReplaceItem_proc)GAME_ADDR(0x316CEC)) u32 SaveFile_CheckForWeirdEggHatch(void) { // Force the egg into the child trade slot so that it can hatch diff --git a/code/src/songs_visual_effects.c b/code/src/songs_visual_effects.c index 13cc5b76..8ab31bb5 100644 --- a/code/src/songs_visual_effects.c +++ b/code/src/songs_visual_effects.c @@ -4,26 +4,19 @@ #include "icetrap.h" #include "savefile.h" -#define OceffWipe_Update_addr 0x256158 -#define OceffWipe_Update ((ActorFunc)OceffWipe_Update_addr) +#define OceffWipe_Update ((ActorFunc)GAME_ADDR(0x256158)) -#define OceffWipe2_Update_addr 0x2714B8 -#define OceffWipe2_Update ((ActorFunc)OceffWipe2_Update_addr) +#define OceffWipe2_Update ((ActorFunc)GAME_ADDR(0x2714B8)) -#define OceffWipe3_Update_addr 0x27181C -#define OceffWipe3_Update ((ActorFunc)OceffWipe3_Update_addr) +#define OceffWipe3_Update ((ActorFunc)GAME_ADDR(0x27181C)) -#define OceffWipe4_Update_addr 0x271C10 -#define OceffWipe4_Update ((ActorFunc)OceffWipe4_Update_addr) +#define OceffWipe4_Update ((ActorFunc)GAME_ADDR(0x271C10)) -#define OceffSpot_Update_addr 0x255BDC -#define OceffSpot_Update ((ActorFunc)OceffSpot_Update_addr) +#define OceffSpot_Update ((ActorFunc)GAME_ADDR(0x255BDC)) -#define OceffSpot_End_addr 0x10FBD0 -#define OceffSpot_End ((ActorFunc)OceffSpot_End_addr) +#define OceffSpot_End ((ActorFunc)GAME_ADDR(0x10FBD0)) -#define OceffStorm_Update_addr 0x27112C -#define OceffStorm_Update ((ActorFunc)OceffStorm_Update_addr) +#define OceffStorm_Update ((ActorFunc)GAME_ADDR(0x27112C)) // Zelda's Lullaby, Song of Time void OceffWipe_rUpdate(Actor* thisx, GlobalContext* globalCtx) { diff --git a/code/src/spin_attack.c b/code/src/spin_attack.c index 4d89fdd3..05fcce54 100644 --- a/code/src/spin_attack.c +++ b/code/src/spin_attack.c @@ -1,8 +1,7 @@ #include "spin_attack.h" #include "icetrap.h" -#define EnMThunder_Init_addr 0x24C910 -#define EnMThunder_Init ((ActorFunc)EnMThunder_Init_addr) +#define EnMThunder_Init ((ActorFunc)GAME_ADDR(0x24C910)) void EnMThunder_rInit(Actor* thisx, GlobalContext* globalCtx) { if (IceTrap_ActiveCurse != ICETRAP_CURSE_SWORD) {