From 1b533174741ad8246b03fbb30d07f3738a99f746 Mon Sep 17 00:00:00 2001 From: JordanLongstaff Date: Sat, 16 Nov 2024 08:32:37 -0500 Subject: [PATCH] Suggested changes --- include/z64save.h | 5 ++--- src/code/z_demo.c | 4 ++-- src/code/z_scene_table.c | 4 ++-- src/code/z_sram.c | 2 +- src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 2 +- src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c | 4 ++-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/z64save.h b/include/z64save.h index 90a362a47a..72a69e6656 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -468,7 +468,7 @@ typedef enum LinkAge { #define EVENTCHKINF_COMPLAINED_ABOUT_MIDO 0x03 #define EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD 0x04 #define EVENTCHKINF_DEKU_TREE_OPENED_MOUTH 0x05 -#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD 0x07 +#define EVENTCHKINF_DEKU_TREE_DEAD 0x07 #define EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP 0x09 #define EVENTCHKINF_PLAYED_SARIAS_SONG_FOR_MIDO_AS_ADULT 0x0A #define EVENTCHKINF_0B 0x0B @@ -482,7 +482,6 @@ typedef enum LinkAge { #define EVENTCHKINF_TALKED_TO_CHILD_MALON_AT_RANCH 0x15 #define EVENTCHKINF_CAN_LEARN_EPONAS_SONG 0x16 #define EVENTCHKINF_EPONA_OBTAINED 0x18 -#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD 0x19 #define EVENTCHKINF_RENTED_HORSE_FROM_INGO 0x1B #define EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH 0x1C #define EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB 0x1D @@ -615,7 +614,7 @@ typedef enum LinkAge { #define EVENTCHKINF_NABOORU_ORDERED_TO_FIGHT_BY_TWINROVA 0xC0 #define EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE 0xC1 #define EVENTCHKINF_DISPELLED_GANONS_TOWER_BARRIER 0xC3 -#define EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS 0xC4 +#define EVENTCHKINF_RECEIVED_LIGHT_ARROWS 0xC4 #define EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL 0xC5 #define EVENTCHKINF_SPOKE_TO_DEKU_TREE_SPROUT 0xC6 #define EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO 0xC7 diff --git a/src/code/z_demo.c b/src/code/z_demo.c index f87bd08d3c..4d1e73a3e3 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -2409,9 +2409,9 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) { gSaveContext.save.entranceIndex = ENTR_LOST_WOODS_0; gSaveContext.save.cutsceneIndex = 0xFFF0; } else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) && - LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) && + LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RECEIVED_LIGHT_ARROWS) && (gEntranceTable[((void)0, gSaveContext.save.entranceIndex)].sceneId == SCENE_TEMPLE_OF_TIME)) { - Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS); + Flags_SetEventChkInf(EVENTCHKINF_RECEIVED_LIGHT_ARROWS); gSaveContext.save.entranceIndex = ENTR_TEMPLE_OF_TIME_0; gSaveContext.save.cutsceneIndex = 0xFFF8; } else if (!Flags_GetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO) && diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index 7029edd497..64dfb89b7a 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -1192,9 +1192,9 @@ void Scene_DrawConfigKokiriForest(PlayState* play) { spA0 = play->roomCtx.drawParams[0] + 500; } else if ( #if OOT_VERSION < PAL_1_0 - !IS_CUTSCENE_LAYER && GET_EVENTCHKINF(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) + !IS_CUTSCENE_LAYER && GET_EVENTCHKINF(EVENTCHKINF_DEKU_TREE_DEAD) #else - (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) && GET_EVENTCHKINF(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) + (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) && GET_EVENTCHKINF(EVENTCHKINF_DEKU_TREE_DEAD) #endif ) { spA0 = 2150; diff --git a/src/code/z_sram.c b/src/code/z_sram.c index 7bc6e37371..032879c2b9 100644 --- a/src/code/z_sram.c +++ b/src/code/z_sram.c @@ -328,7 +328,7 @@ void Sram_InitDebugSave(void) { gSaveContext.save.info.infTable[0] |= 0x5009; gSaveContext.save.info.eventChkInf[0] |= 0x123F; SET_EVENTCHKINF(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE); - SET_EVENTCHKINF(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS); + SET_EVENTCHKINF(EVENTCHKINF_RECEIVED_LIGHT_ARROWS); if (LINK_AGE_IN_YEARS == YEARS_CHILD) { gSaveContext.save.info.equips.buttonItems[0] = ITEM_SWORD_KOKIRI; diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index defd493b4c..f85150a873 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -242,7 +242,7 @@ void BgTreemouth_Draw(Actor* thisx, PlayState* play) { if (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) #endif { - if (GET_EVENTCHKINF(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD)) { + if (GET_EVENTCHKINF(EVENTCHKINF_DEKU_TREE_DEAD)) { alpha = 2150; } } else { // needed to match diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 293b731977..d328d31228 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -503,8 +503,8 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) { gSaveContext.nextCutsceneIndex = 0; } } else if (play->sceneId == SCENE_DEKU_TREE_BOSS) { - if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD)) { - Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD); + if (!Flags_GetEventChkInf(EVENTCHKINF_DEKU_TREE_DEAD)) { + Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_DEAD); Flags_SetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP); Item_Give(play, ITEM_KOKIRI_EMERALD); play->nextEntranceIndex = ENTR_KOKIRI_FOREST_0;