From ec0a080956fd0277f776273b9bfe284f58014498 Mon Sep 17 00:00:00 2001 From: Sarge-117 Date: Tue, 12 Jul 2022 22:08:25 -0700 Subject: [PATCH] Rando: Minor feature - quest item fanfares In rando, when we find a special quest item somewhere (e.g. a medallion, stone, or song), play that item's unique fanfare instead of the default "get item" fanfare Closes HarbourMasters/Shipwright#716 --- .../actors/ovl_player_actor/z_player.c | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 1973a09a4..4e1b054df 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -12675,6 +12675,33 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) { else { temp1 = temp2 = (this->getItemId == GI_HEART_PIECE) ? NA_BGM_SMALL_ITEM_GET : NA_BGM_ITEM_GET | 0x900; } + + // In Rando, if we get special quest items (medallions/stones/songs), play their respective unique fanfares + // instead of the default "get item" fanfare + if (gSaveContext.n64ddFlag) { + // If the item we're getting is a medallion, play the "get a medallion" fanfare + if ((this->getItemId == GI_MEDALLION_FOREST) || (this->getItemId == GI_MEDALLION_FIRE) || + (this->getItemId == GI_MEDALLION_WATER) || (this->getItemId == GI_MEDALLION_SHADOW) || + (this->getItemId == GI_MEDALLION_SPIRIT) || (this->getItemId == GI_MEDALLION_LIGHT)) { + temp1 = NA_BGM_MEDALLION_GET | 0x900; + } + // If it's a Spiritual Stone, play the "get a spiritual stone" fanfare + if ((this->getItemId == GI_STONE_KOKIRI) || (this->getItemId == GI_STONE_GORON) || + (this->getItemId == GI_STONE_ZORA)) { + temp1 = NA_BGM_SPIRITUAL_STONE | 0x900; + } + // If the item we're getting is a song, play the "learned a song" fanfare + if ((this->getItemId == GI_SONG_OF_STORMS) || (this->getItemId == GI_SERENADE_OF_WATER) || + (this->getItemId == GI_EPONAS_SONG) || (this->getItemId == GI_SARIAS_SONG) || + (this->getItemId == GI_SUNS_SONG) || (this->getItemId == GI_SONG_OF_TIME) || + (this->getItemId == GI_PRELUDE_OF_LIGHT) || (this->getItemId == GI_MINUET_OF_FOREST) || + (this->getItemId == GI_BOLERO_OF_FIRE) || (this->getItemId == GI_NOCTURNE_OF_SHADOW) || + (this->getItemId == GI_REQUIEM_OF_SPIRIT) || (this->getItemId == GI_PRELUDE_OF_LIGHT)) { + temp1 = NA_BGM_OCA_FAIRY_GET | 0x900; + } + } + // *************************************************************************************** + Audio_PlayFanfare(temp1); } }