Fix entrance sound in grottos to not be ganondorf's loud breathing. Also give sound to collectible fairies

This commit is contained in:
Demur Rumed 2025-06-08 20:54:15 +00:00
commit aef147de20
2 changed files with 24 additions and 10 deletions

View file

@ -15,11 +15,12 @@ extern "C" {
#include "overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h" #include "overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h"
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h" #include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
#include "overlays/actors/ovl_En_Karebaba/z_en_karebaba.h" #include "overlays/actors/ovl_En_Karebaba/z_en_karebaba.h"
#include "overlays/actors/ovl_En_Ba/z_en_ba.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h" #include "overlays/actors/ovl_En_Box/z_en_box.h"
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h" #include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
#include "overlays/actors/ovl_En_Dog/z_en_dog.h" #include "overlays/actors/ovl_En_Dog/z_en_dog.h"
#include "overlays/actors/ovl_En_Door/z_en_door.h" #include "overlays/actors/ovl_En_Door/z_en_door.h"
#include "overlays/actors/ovl_En_Ba/z_en_ba.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "overlays/actors/ovl_En_Fz/z_en_fz.h" #include "overlays/actors/ovl_En_Fz/z_en_fz.h"
#include "overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h" #include "overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h"
#include "overlays/actors/ovl_En_Eiyer/z_en_eiyer.h" #include "overlays/actors/ovl_En_Eiyer/z_en_eiyer.h"
@ -147,7 +148,7 @@ void accessible_area_change(AccessibleActor* actor) {
actor->policy.ydist = 2000; actor->policy.ydist = 2000;
if (actor->yDistToPlayer > 500.0 && actor->sceneIndex != SCENE_DEATH_MOUNTAIN_TRAIL && if (actor->yDistToPlayer > 500.0 && actor->sceneIndex != SCENE_DEATH_MOUNTAIN_TRAIL &&
actor->play->sceneNum != SCENE_HYRULE_FIELD && actor->play->sceneNum != 82) { actor->play->sceneNum != SCENE_HYRULE_FIELD && actor->play->sceneNum != SCENE_KAKARIKO_VILLAGE) {
return; return;
} }
@ -184,7 +185,7 @@ void accessible_area_change(AccessibleActor* actor) {
} }
} }
} else if (actor->sceneIndex == SCENE_BOTTOM_OF_THE_WELL) { } else if (actor->sceneIndex == SCENE_BOTTOM_OF_THE_WELL) {
if (!(((gSaveContext.eventChkInf[6]) >> (7)) & 1)) if (!Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO))
return; return;
} else { } else {
actor->policy.ydist = 500; actor->policy.ydist = 500;
@ -219,6 +220,9 @@ void accessible_area_change(AccessibleActor* actor) {
// kokiri forest and lost woods // kokiri forest and lost woods
} else if (actor->play->sceneNum >= SCENE_DEKU_TREE_BOSS && actor->play->sceneNum <= SCENE_GANONDORF_BOSS) { } else if (actor->play->sceneNum >= SCENE_DEKU_TREE_BOSS && actor->play->sceneNum <= SCENE_GANONDORF_BOSS) {
return; // dont check for entrances while in boss rooms return; // dont check for entrances while in boss rooms
} else if (actor->play->sceneNum == SCENE_GROTTOS || actor->play->sceneNum == SCENE_FAIRYS_FOUNTAIN) {
actor->policy.volume = 0.1;
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_WARP_HOLE, false);
} else if (actor->sceneIndex == SCENE_HYRULE_FIELD) { } else if (actor->sceneIndex == SCENE_HYRULE_FIELD) {
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_HORSE_RUN_LEVEL, false); ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_HORSE_RUN_LEVEL, false);
} else if (actor->sceneIndex <= SCENE_GERUDO_TRAINING_GROUND) { } else if (actor->sceneIndex <= SCENE_GERUDO_TRAINING_GROUND) {
@ -249,7 +253,7 @@ void accessible_area_change(AccessibleActor* actor) {
} else if (actor->sceneIndex == SCENE_LAKE_HYLIA) { } else if (actor->sceneIndex == SCENE_LAKE_HYLIA) {
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_WATER_WALL, false); ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_WATER_WALL, false);
} else if (actor->sceneIndex == SCENE_GERUDO_VALLEY || actor->sceneIndex == SCENE_GERUDOS_FORTRESS) { } else if (actor->sceneIndex == SCENE_GERUDO_VALLEY || actor->sceneIndex == SCENE_GERUDOS_FORTRESS) {
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EN_GERUDOFT_BREATH, false); ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_PL_CRAWL_SAND, false);
} else if (actor->sceneIndex == SCENE_DESERT_COLOSSUS || actor->sceneIndex == SCENE_HAUNTED_WASTELAND) { } else if (actor->sceneIndex == SCENE_DESERT_COLOSSUS || actor->sceneIndex == SCENE_HAUNTED_WASTELAND) {
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_SAND_STORM, false); ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_SAND_STORM, false);
} else if (actor->sceneIndex == SCENE_OUTSIDE_GANONS_CASTLE || actor->sceneIndex == SCENE_HYRULE_CASTLE) { } else if (actor->sceneIndex == SCENE_OUTSIDE_GANONS_CASTLE || actor->sceneIndex == SCENE_HYRULE_CASTLE) {
@ -684,6 +688,16 @@ void ActorAccessibility_InitActors() {
policy.n = 40; policy.n = 40;
policy.pitch = 1.4; policy.pitch = 1.4;
ActorAccessibility_AddSupportedActor(ACTOR_EN_ITEM00, policy); ActorAccessibility_AddSupportedActor(ACTOR_EN_ITEM00, policy);
ActorAccessibility_InitPolicy(&policy, "Collectible", [](AccessibleActor* actor) {
if (actor->actor->category == ACTORCAT_ITEMACTION) {
s16 params = actor->actor->params;
if (params == FAIRY_HEAL || params == FAIRY_HEAL_TIMED || params == FAIRY_HEAL_BIG) {
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_BUTTERFRY_TO_FAIRY, false);
}
}
});
policy.n = 40;
ActorAccessibility_AddSupportedActor(ACTOR_EN_ELF, policy);
ActorAccessibility_InitPolicy(&policy, "big poe spawn", NA_SE_EN_PO_BIG_GET); ActorAccessibility_InitPolicy(&policy, "big poe spawn", NA_SE_EN_PO_BIG_GET);
policy.distance = 1500; policy.distance = 1500;

View file

@ -593,9 +593,11 @@ void ActorAccessibility_PolyToVirtualActor(PlayState* play, CollisionPoly* poly,
if (actor == NULL) if (actor == NULL)
return; return;
if (va == VA_AREA_CHANGE) { if (va == VA_AREA_CHANGE) {
actor->sceneIndex = SurfaceType_GetSceneExitIndex(&play->colCtx, poly, BGCHECK_SCENE); if (play->sceneNum != SCENE_GROTTOS && play->sceneNum != SCENE_FAIRYS_FOUNTAIN) {
s16 nextEntranceIndex = play->setupExitList[actor->sceneIndex - 1]; u32 sceneIndex = SurfaceType_GetSceneExitIndex(&play->colCtx, poly, BGCHECK_SCENE);
actor->sceneIndex = gEntranceTable[nextEntranceIndex].scene; s16 nextEntranceIndex = play->setupExitList[sceneIndex - 1];
actor->sceneIndex = gEntranceTable[nextEntranceIndex].scene;
}
} }
} }
@ -603,9 +605,7 @@ void ActorAccessibility_AnnounceRoomNumber(PlayState* play) {
std::stringstream ss; std::stringstream ss;
ss << "Room" << (int)play->roomCtx.curRoom.num; ss << "Room" << (int)play->roomCtx.curRoom.num;
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) if (Flags_GetClear(play, play->roomCtx.curRoom.num))
ss << ", completed." << std::endl; ss << " completed" << std::endl;
else
ss << "." << std::endl;
SpeechSynthesizer::Instance->Speak(ss.str().c_str(), GetLanguageCode()); SpeechSynthesizer::Instance->Speak(ss.str().c_str(), GetLanguageCode());
} }