diff --git a/soh/src/code/code_800EC960.c b/soh/src/code/code_800EC960.c index 7e346c3846..0909ebf198 100644 --- a/soh/src/code/code_800EC960.c +++ b/soh/src/code/code_800EC960.c @@ -1246,7 +1246,7 @@ void Audio_StepFreqLerp(FreqLerp* lerp); void func_800F56A8(void); void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId); s32 Audio_SetGanonDistVol(u8 targetVol); -void Audio_PlayFanfare_Rando(ItemID getItemId); +void Audio_PlayFanfare_Rando(GetItemEntry getItem); // Function originally not called, so repurposing for DPad input void func_800EC960(u8 dpad) { diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index f73107110e..61ce4330bf 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -21,6 +21,7 @@ void func_80AFB950(EnSi* this, GlobalContext* globalCtx); s32 textId = 0xB4; s32 giveItemId = ITEM_SKULL_TOKEN; s32 getItemId; +GetItemEntry getItem; static ColliderCylinderInit sCylinderInit = { { @@ -98,7 +99,7 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) { this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER; if (gSaveContext.n64ddFlag) { - GetItemEntry getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); getItemId = getItem.getItemId; if (getItem.getItemId == RG_ICE_TRAP) { player->pendingIceTrap = true; @@ -123,7 +124,7 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { - Audio_PlayFanfare_Rando(getItemId); + Audio_PlayFanfare_Rando(getItem); } else { Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); } @@ -146,7 +147,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { if (gSaveContext.n64ddFlag) { - GetItemEntry getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); getItemId = getItem.getItemId; if (getItemId == RG_ICE_TRAP) { player->pendingIceTrap = true; @@ -167,7 +168,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { } Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { - Audio_PlayFanfare_Rando(getItemId); + Audio_PlayFanfare_Rando(getItem); } else { Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); } @@ -205,7 +206,7 @@ void EnSi_Draw(Actor* thisx, GlobalContext* globalCtx) { if (!gSaveContext.n64ddFlag) { GetItem_Draw(globalCtx, GID_SKULL_TOKEN_2); } else { - GetItemEntry getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); + getItem = Randomizer_GetRandomizedItem(GI_SKULL_TOKEN, this->actor.id, this->actor.params, globalCtx->sceneNum); EnItem00_CustomItemsParticles(&this->actor, globalCtx, getItem); if (getItem.itemId != ITEM_SKULL_TOKEN) { f32 mtxScale = 1.5f; 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 71c79cdba0..ee13eb8bf5 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -12581,7 +12581,7 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) { // Use this if we do have a getItemEntry if (giEntry.modIndex == MOD_NONE) { if (gSaveContext.n64ddFlag) { - Audio_PlayFanfare_Rando(this->getItemId); + Audio_PlayFanfare_Rando(giEntry); } else if (((giEntry.itemId >= ITEM_RUPEE_GREEN) && (giEntry.itemId <= ITEM_RUPEE_RED)) || ((giEntry.itemId >= ITEM_RUPEE_PURPLE) && (giEntry.itemId <= ITEM_RUPEE_GOLD)) || (giEntry.itemId == ITEM_HEART)) { @@ -12599,7 +12599,7 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) { } } else if (giEntry.modIndex == MOD_RANDOMIZER) { if (gSaveContext.n64ddFlag) { - Audio_PlayFanfare_Rando(this->getItemId); + Audio_PlayFanfare_Rando(giEntry); } else if (giEntry.itemId == RG_DOUBLE_DEFENSE || giEntry.itemId == RG_MAGIC_SINGLE || giEntry.itemId == RG_MAGIC_DOUBLE) { Audio_PlayFanfare(NA_BGM_HEART_GET | 0x900);