Merge branch 'develop' into waterfall-always-open

This commit is contained in:
JordanLongstaff 2024-11-09 14:22:21 -05:00
commit 30f9c7057a
214 changed files with 1924 additions and 1469 deletions

View File

@ -980,9 +980,9 @@ f32 Math_SmoothStepToDegF(f32* pValue, f32 target, f32 fraction, f32 step, f32 m
s16 Math_SmoothStepToS(s16* pValue, s16 target, s16 scale, s16 step, s16 minStep);
void Math_ApproachS(s16* pValue, s16 target, s16 scale, s16 step);
void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src);
void func_80078884(u16 sfxId);
void func_800788CC(u16 sfxId);
void func_80078914(Vec3f* arg0, u16 sfxId);
void Sfx_PlaySfxCentered(u16 sfxId);
void Sfx_PlaySfxCentered2(u16 sfxId);
void Sfx_PlaySfxAtPos(Vec3f* arg0, u16 sfxId);
s16 getHealthMeterXOffset();
s16 getHealthMeterYOffset();
void HealthMeter_Init(PlayState* play);

View File

@ -158,9 +158,9 @@ extern "C"
extern char D_80133398[];
extern SoundBankEntry* gSoundBanks[7];
extern u8 gSfxChannelLayout;
extern Vec3f D_801333D4;
extern f32 D_801333E0;
extern s8 D_801333E8;
extern Vec3f gSfxDefaultPos;
extern f32 gSfxDefaultFreqAndVolScale;
extern s8 gSfxDefaultReverb;
extern u8 D_801333F0;
extern u8 gAudioSfxSwapOff;
extern u8 D_80133408;

View File

@ -14,7 +14,7 @@ void SkipDekuTreeIntro_Register() {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
BgTreemouth* treeMouth = va_arg(args, BgTreemouth*);
Flags_SetEventChkInf(EVENTCHKINF_DEKU_TREE_OPENED_MOUTH);
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgTreemouth_SetupAction(treeMouth, func_808BC6F8);
*should = false;
}

View File

@ -1174,7 +1174,7 @@ void ActorViewerWindow::DrawElement() {
Actor_Spawn(&gPlayState->actorCtx, gPlayState, newActor.id, newActor.pos.x, newActor.pos.y,
newActor.pos.z, newActor.rot.x, newActor.rot.y, newActor.rot.z, newActor.params, 0);
} else {
func_80078884(NA_SE_SY_ERROR);
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
}
}
@ -1187,7 +1187,7 @@ void ActorViewerWindow::DrawElement() {
newActor.pos.y, newActor.pos.z, newActor.rot.x, newActor.rot.y,
newActor.rot.z, newActor.params);
} else {
func_80078884(NA_SE_SY_ERROR);
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
}
}
}

View File

@ -341,7 +341,7 @@ void GameInteractor::RawAction::UpdateActor(void* refActor) {
}
void GameInteractor::RawAction::TeleportPlayer(int32_t nextEntrance) {
Audio_PlaySoundGeneral(NA_SE_EN_GANON_LAUGH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_GANON_LAUGH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gPlayState->nextEntranceIndex = nextEntrance;
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
gPlayState->transitionType = TRANS_TYPE_FADE_BLACK;

View File

@ -215,12 +215,12 @@ namespace Rando {
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
pauseCtx->cursorSpecialPos = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) {
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
pauseCtx->cursorSpecialPos = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -230,7 +230,7 @@ namespace Rando {
if (shouldScroll) {
entry->SetYOffset(yOffset);
yOffset += 18;
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Matrix_Push();
entry->Draw(play, &mEntryDl);

View File

@ -1068,7 +1068,7 @@ void RegisterAltTrapTypes() {
eventTimer = 3;
break;
case ADD_SPEED_TRAP:
Audio_PlaySoundGeneral(NA_SE_VO_KZ_MOVE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_VO_KZ_MOVE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
GameInteractor::State::RunSpeedModifier = -2;
statusTimer = 200;
Overlay_DisplayText(10, "Speed Decreased!");
@ -1077,7 +1077,7 @@ void RegisterAltTrapTypes() {
eventTimer = 3;
break;
case ADD_VOID_TRAP:
Audio_PlaySoundGeneral(NA_SE_EN_GANON_LAUGH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_GANON_LAUGH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
eventTimer = 3;
break;
case ADD_AMMO_TRAP:
@ -1117,7 +1117,7 @@ void RegisterAltTrapTypes() {
AMMO(ITEM_BOW) = AMMO(ITEM_BOW) * 0.5;
AMMO(ITEM_BOMB) = AMMO(ITEM_BOMB) * 0.5;
AMMO(ITEM_BOMBCHU) = AMMO(ITEM_BOMBCHU) * 0.5;
Audio_PlaySoundGeneral(NA_SE_VO_FR_SMILE_0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_VO_FR_SMILE_0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break;
case ADD_TELEPORT_TRAP: {
int entrance;

View File

@ -211,6 +211,14 @@ bool Here(const RandomizerRegion region, ConditionFn condition) {
return areaTable[region].Here(condition);
}
bool MQSpiritSharedStatueRoom(const RandomizerRegion region, ConditionFn condition, bool anyAge) {
return areaTable[region].MQSpiritShared(condition, false, anyAge);
}
bool MQSpiritSharedBrokenWallRoom(const RandomizerRegion region, ConditionFn condition, bool anyAge) {
return areaTable[region].MQSpiritShared(condition, true, anyAge);
}
bool CanPlantBean(const RandomizerRegion region) {
return areaTable[region].CanPlantBeanCheck();
}
@ -256,7 +264,7 @@ void RegionTable_Init() {
LOCATION(RC_SARIA_SONG_HINT, logic->CanUse(RG_SARIAS_SONG)),
}, {
//Exits
Entrance(RR_ROOT_EXITS, {[]{return true;}})
Entrance(RR_ROOT_EXITS, {[]{return true;}}),
});
areaTable[RR_ROOT_EXITS] = Region("Root Exits", "", {RA_LINKS_POCKET}, NO_DAY_NIGHT_CYCLE, {}, {}, {

View File

@ -18,54 +18,54 @@ extern std::shared_ptr<Rando::Logic> logic;
class EventAccess {
public:
explicit EventAccess(bool* event_, std::vector<ConditionFn> conditions_met_)
: event(event_) {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
explicit EventAccess(bool* event_, std::vector<ConditionFn> conditions_met_)
: event(event_) {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
}
bool ConditionsMet() const {
auto ctx = Rando::Context::GetInstance();
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_NO_LOGIC) || ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA)) {
return true;
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHLESS)) {
return conditions_met[0]();
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHED)) {
if (conditions_met[0]()) {
return true;
} else if (conditions_met[1] != NULL) {
return conditions_met[1]();
}
}
return false;
bool ConditionsMet() const {
auto ctx = Rando::Context::GetInstance();
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_NO_LOGIC) || ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA)) {
return true;
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHLESS)) {
return conditions_met[0]();
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHED)) {
if (conditions_met[0]()) {
return true;
} else if (conditions_met[1] != NULL) {
return conditions_met[1]();
}
}
return false;
}
bool CheckConditionAtAgeTime(bool& age, bool& time) {
bool CheckConditionAtAgeTime(bool& age, bool& time) {
logic->IsChild = false;
logic->IsAdult = false;
logic->AtDay = false;
logic->AtNight = false;
logic->IsChild = false;
logic->IsAdult = false;
logic->AtDay = false;
logic->AtNight = false;
time = true;
age = true;
time = true;
age = true;
return ConditionsMet();
}
return ConditionsMet();
}
void EventOccurred() {
*event = true;
}
void EventOccurred() {
*event = true;
}
bool GetEvent() const {
return *event;
}
bool GetEvent() const {
return *event;
}
private:
bool* event;
std::vector<ConditionFn> conditions_met;
bool* event;
std::vector<ConditionFn> conditions_met;
};
std::string CleanCheckConditionString(std::string condition);
@ -76,49 +76,49 @@ std::string CleanCheckConditionString(std::string condition);
class LocationAccess {
public:
explicit LocationAccess(RandomizerCheck location_, std::vector<ConditionFn> conditions_met_)
: location(location_), condition_str("") {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
explicit LocationAccess(RandomizerCheck location_, std::vector<ConditionFn> conditions_met_)
: location(location_), condition_str("") {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
}
explicit LocationAccess(RandomizerCheck location_, std::vector<ConditionFn> conditions_met_, std::string condition_str_)
: location(location_), condition_str(condition_str_) {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
explicit LocationAccess(RandomizerCheck location_, std::vector<ConditionFn> conditions_met_, std::string condition_str_)
: location(location_), condition_str(condition_str_) {
conditions_met.resize(2);
for (size_t i = 0; i < conditions_met_.size(); i++) {
conditions_met[i] = conditions_met_[i];
}
}
bool GetConditionsMet() const {
auto ctx = Rando::Context::GetInstance();
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_NO_LOGIC) || ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA)) {
return true;
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHLESS)) {
return conditions_met[0]();
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHED)) {
if (conditions_met[0]()) {
return true;
} else if (conditions_met[1] != NULL) {
return conditions_met[1]();
}
}
return false;
bool GetConditionsMet() const {
auto ctx = Rando::Context::GetInstance();
if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_NO_LOGIC) || ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_VANILLA)) {
return true;
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHLESS)) {
return conditions_met[0]();
} else if (ctx->GetOption(RSK_LOGIC_RULES).Is(RO_LOGIC_GLITCHED)) {
if (conditions_met[0]()) {
return true;
} else if (conditions_met[1] != NULL) {
return conditions_met[1]();
}
}
return false;
}
bool CheckConditionAtAgeTime(bool& age, bool& time) const;
bool CheckConditionAtAgeTime(bool& age, bool& time) const;
bool ConditionsMet() const;
bool ConditionsMet() const;
RandomizerCheck GetLocation() const {
return location;
}
RandomizerCheck GetLocation() const {
return location;
}
std::string GetConditionStr() const {
return condition_str;
}
std::string GetConditionStr() const {
return condition_str;
}
protected:
RandomizerCheck location;
@ -138,127 +138,199 @@ namespace Rando {
class Region {
public:
Region();
Region(std::string regionName_, std::string scene_, std::set<RandomizerArea> areas,
Region();
Region(std::string regionName_, std::string scene_, std::set<RandomizerArea> areas,
bool timePass_,
std::vector<EventAccess> events_,
std::vector<LocationAccess> locations_,
std::list<Rando::Entrance> exits_);
~Region();
~Region();
std::string regionName;
std::string scene;
std::set<RandomizerArea> areas;
bool timePass;
std::vector<EventAccess> events;
std::vector<LocationAccess> locations;
std::list<Rando::Entrance> exits;
std::list<Rando::Entrance*> entrances;
//^ The above exits are now stored in a list instead of a vector because
//the entrance randomization algorithm plays around with pointers to these
//entrances a lot. By putting the entrances in a list, we don't have to
//worry about a vector potentially reallocating itself and invalidating all our
//entrance pointers.
std::string regionName;
std::string scene;
std::set<RandomizerArea> areas;
bool timePass;
std::vector<EventAccess> events;
std::vector<LocationAccess> locations;
std::list<Rando::Entrance> exits;
std::list<Rando::Entrance*> entrances;
//^ The above exits are now stored in a list instead of a vector because
//the entrance randomization algorithm plays around with pointers to these
//entrances a lot. By putting the entrances in a list, we don't have to
//worry about a vector potentially reallocating itself and invalidating all our
//entrance pointers.
bool childDay = false;
bool childNight = false;
bool adultDay = false;
bool adultNight = false;
bool addedToPool = false;;
bool childDay = false;
bool childNight = false;
bool adultDay = false;
bool adultNight = false;
bool addedToPool = false;;
void ApplyTimePass();
void ApplyTimePass();
bool UpdateEvents();
bool UpdateEvents();
void AddExit(RandomizerRegion parentKey, RandomizerRegion newExitKey, ConditionFn condition);
void AddExit(RandomizerRegion parentKey, RandomizerRegion newExitKey, ConditionFn condition);
void RemoveExit(Rando::Entrance* exitToRemove);
void RemoveExit(Rando::Entrance* exitToRemove);
void SetAsPrimary(RandomizerRegion exitToBePrimary);
void SetAsPrimary(RandomizerRegion exitToBePrimary);
Rando::Entrance* GetExit(RandomizerRegion exit);
Rando::Entrance* GetExit(RandomizerRegion exit);
bool Child() const {
return childDay || childNight;
bool Child() const {
return childDay || childNight;
}
bool Adult() const {
return adultDay || adultNight;
}
bool BothAgesCheck() const {
return Child() && Adult();
}
bool HasAccess() const {
return Child() || Adult();
}
bool AllAccess() const {
return childDay && childNight && adultDay && adultNight;
}
//Check to see if an exit can be access as both ages at both times of day
bool CheckAllAccess(RandomizerRegion exitKey);
std::set<RandomizerArea> GetAllAreas() const{
return areas;
}
RandomizerArea GetFirstArea() const{
if (areas.empty()){
assert(false);
return RA_NONE;
} else {
return *areas.begin();
}
}
bool Adult() const {
return adultDay || adultNight;
}
void ReplaceAreas(std::set<RandomizerArea> newAreas) {
areas = newAreas;
}
bool BothAgesCheck() const {
return Child() && Adult();
}
//Here checks conditional access based on whether or not both ages have
//access to this area. For example: if there are rocks that block a path
//which both child and adult can access, adult having hammer can give
//both child and adult access to the path.
bool Here(ConditionFn condition) {
bool HasAccess() const {
return Child() || Adult();
}
//store current age variables
bool pastAdult = logic->IsAdult;
bool pastChild = logic->IsChild;
bool AllAccess() const {
return childDay && childNight && adultDay && adultNight;
}
//set age access as this areas ages
logic->IsChild = Child();
logic->IsAdult = Adult();
//Check to see if an exit can be access as both ages at both times of day
bool CheckAllAccess(RandomizerRegion exitKey);
//heck condition as well as having at least child or adult access
bool hereVal = condition() && (logic->IsAdult || logic->IsChild);
std::set<RandomizerArea> GetAllAreas() const{
return areas;
}
//set back age variables
logic->IsChild = pastChild;
logic->IsAdult = pastAdult;
RandomizerArea GetFirstArea() const{
if (areas.empty()){
assert(false);
return RA_NONE;
} else {
return *areas.begin();
}
}
return hereVal;
}
void ReplaceAreas(std::set<RandomizerArea> newAreas) {
areas = newAreas;
}
bool CanPlantBeanCheck() const;
bool AllAccountedFor() const;
//Here checks conditional access based on whether or not both ages have
//access to this area. For example: if there are rocks that block a path
//which both child and adult can access, adult having hammer can give
//both child and adult access to the path.
bool Here(ConditionFn condition) {
void ResetVariables();
void printAgeTimeAccess() const {
auto message = "Child Day: " + std::to_string(childDay) + "\t"
"Child Night: " + std::to_string(childNight) + "\t"
"Adult Day: " + std::to_string(adultDay) + "\t"
"Adult Night: " + std::to_string(adultNight);
}
/*This logic covers checks that exist in the shared areas of MQ spirit from a glitchless standpoint.
This room has Quantum logic that I am currently handling with this function, however this is NOT suitable for glitch logic as it relies on specific ages
In this chunk there are 3 possibilities for passing a check, but first I have to talk about parallel universes.
In MQ Spirit key logic, we mostly care about 2 possibilities for how the player can spend keys, creating 2 Parralel universes
In the first universe, the player did not enter spirit as adult until after climbing as child, thus child spends keys linearly, only needing 2 to reach statue room.
In the second universe, the player went in as adult, possibly out of logic, and started wasting the keys to lock child out.
These Universes converge when the player has 7 keys (meaning adult can no longer lock child out) and adult is known to be able to reach Statue room. This creates "Certain Access", which is tracked seperatly for each age.
Child Certain Access is simple, if we have 7 keys and child access, it's Certain Access.
Adult Certain Access is also simple, adult is not key locked, so if they make it to a location, it's Certain Access.
Things get complicated when we handle the overlap of the 2 universes,
though an important detail is that if we have Certain Access as either age, we don't need to checked the overlap because overlap logic is strictly stricter than either Certain Access.
In order to track the first universe, the logic allows technical child access with the minimum number of keys, and then checks in this function for if we have 7 keys to determine if that is Certain or not.
This is for technical reasons, as areas with no access at all will simply not be checked.
Normally we would need to do similar shenanigans to track the second universe, however adult must have go through statue room to waste keys,
so can go back there and get new keys for Child to use if they do, and the navigation logic for shared MQ spirit from Statue Room is very simple for Adult.
Additionally, we don't need to know if adult can actually reach spirit temple or climb to statue room, because if the player can't do that, then universe 2 can't happen anyway,
and if the player does so out of logic, they can do it again, as the only consumable used sets a permanent flag.
The Adult Navigation logic is as such:
- Broken Wall room is 6 key locked, because if the player tries to spend 6 keys in a way that would block adults access, they would have to give child access instead.
- The child side hammer switch for the time travelling chest is 7 key locked for adult
- Reaching gauntlets hand is 7 key locked
- Going back into big block room is complex, but the only check there is child only so not a concern
- Everything else is possible with basic adult movement, or is impossible for child to reach glitchlessly
Anything 7 key locked does not need to be checked as shared, as all child access is Certain and because of this workaround we don't need to fake Adult access, meaning that is also Certain.
All of this combined means that when checking if adult can reach a location in universe 2, we only have to ask if it is a 6 key locked location or not.
Knowing all of this this, we can confirm things are logical in 3 different ways:
- If we have Adult Access, we know it is Certain Access, so they can get checks alone.
- If we have 7 keys, child has Certain Access as we know they cannot be locked out, so can get checks alone, otherwise we check the logical overlap
- If Child and Adult can get the check (ignoring actual adult access to the location), and the location is either not 6 key locked or we have 6 keys, we can get the check with the overlap*/
bool MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAge = false) {
//if we have Certain Access as child, we can check anyAge and if true, resolve a condition with Here as if adult is here it's also Certain Access
if (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)){
if (anyAge){
return Here(condition);
}
return condition();
//else, if we are here as adult, we have Certain Access from that and don't need special handling for checking adult
} else if (Adult() && logic->IsAdult){
return condition();
//if we do not have Certain Access, we need to check the overlap by seeing if we are both here as child and meet the adult universe's access condition
//We only need to do it as child, as only child access matters for this check, as adult access is assumed based on keys
} else if (Child() && logic->IsChild && (!IsBrokenWall || logic->SmallKeys(RR_SPIRIT_TEMPLE, 6))) {
bool result = false;
//store current age variables
bool pastAdult = logic->IsAdult;
bool pastChild = logic->IsChild;
//set age access as this areas ages
logic->IsChild = Child();
logic->IsAdult = Adult();
//heck condition as well as having at least child or adult access
bool hereVal = condition() && (logic->IsAdult || logic->IsChild);
//First check if the check is possible as child
logic->IsChild = true;
logic->IsAdult = false;
result = condition();
//If so, check again as adult. both have to be true for result to be true
if (result) {
logic->IsChild = false;
logic->IsAdult = true;
result = condition();
}
//set back age variables
logic->IsChild = pastChild;
logic->IsAdult = pastAdult;
return hereVal;
}
bool CanPlantBeanCheck() const;
bool AllAccountedFor() const;
void ResetVariables();
void printAgeTimeAccess() const {
auto message = "Child Day: " + std::to_string(childDay) + "\t"
"Child Night: " + std::to_string(childNight) + "\t"
"Adult Day: " + std::to_string(adultDay) + "\t"
"Adult Night: " + std::to_string(adultNight);
return result;
}
return false;
}
};
extern std::array<Region, RR_MAX> areaTable;
extern std::vector<EventAccess> grottoEvents;
bool Here(const RandomizerRegion region, ConditionFn condition); //RANDOTODO make a less stupid way to check own at either age than self referncing with this
bool MQSpiritSharedStatueRoom(const RandomizerRegion region, ConditionFn condition, bool anyAge = false);
bool MQSpiritSharedBrokenWallRoom(const RandomizerRegion region, ConditionFn condition, bool anyAge = false);
bool CanPlantBean(const RandomizerRegion region);
bool BothAges(const RandomizerRegion region);
bool ChildCanAccess(const RandomizerRegion region);

View File

@ -32,7 +32,7 @@ void RegionTable_Init_GanonsCastle() {
Entrance(RR_GANONS_CASTLE_SHADOW_TRIAL, {[]{return true;}}),
Entrance(RR_GANONS_CASTLE_SPIRIT_TRIAL, {[]{return true;}}),
Entrance(RR_GANONS_CASTLE_LIGHT_TRIAL, {[]{return logic->CanUse(RG_GOLDEN_GAUNTLETS);}}),
Entrance(RR_GANONS_CASTLE_TOWER, {[]{return (logic->ForestTrialClear || ctx->GetTrial(TK_FOREST_TRIAL)->IsSkipped()) &&
Entrance(RR_GANONS_TOWER_FLOOR_1, {[]{return (logic->ForestTrialClear || ctx->GetTrial(TK_FOREST_TRIAL)->IsSkipped()) &&
(logic->FireTrialClear || ctx->GetTrial(TK_FIRE_TRIAL)->IsSkipped()) &&
(logic->WaterTrialClear || ctx->GetTrial(TK_WATER_TRIAL)->IsSkipped()) &&
(logic->ShadowTrialClear || ctx->GetTrial(TK_SHADOW_TRIAL)->IsSkipped()) &&
@ -111,13 +111,6 @@ void RegionTable_Init_GanonsCastle() {
}, {});
}
areaTable[RR_GANONS_CASTLE_TOWER] = Region("Ganon's Castle Tower", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_GANONS_TOWER_BOSS_KEY_CHEST, logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_MASTER_SWORD) || logic->CanUse(RG_BIGGORON_SWORD)),
LOCATION(RC_GANONDORF_HINT, logic->HasItem(RG_GANONS_CASTLE_BOSS_KEY) && (logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_MASTER_SWORD) || logic->CanUse(RG_BIGGORON_SWORD))),
LOCATION(RC_GANON, logic->HasBossSoul(RG_GANON_SOUL) && logic->HasItem(RG_GANONS_CASTLE_BOSS_KEY) && logic->CanUse(RG_LIGHT_ARROWS) && logic->CanUse(RG_MASTER_SWORD)),
}, {});
/*---------------------------
| MASTER QUEST DUNGEON |
---------------------------*/
@ -142,7 +135,7 @@ void RegionTable_Init_GanonsCastle() {
Entrance(RR_GANONS_CASTLE_MQ_SPIRIT_TRIAL_CHAIRS_ROOM, {[]{return true;}}),
Entrance(RR_GANONS_CASTLE_MQ_LIGHT_TRIAL_DINOLFOS_ROOM, {[]{return Here(RR_GANONS_CASTLE_MQ_MAIN, []{return logic->CanUse(RG_GOLDEN_GAUNTLETS);});}}),
//RANDOTODO could we just set these events automatically based on the setting?
Entrance(RR_GANONS_CASTLE_TOWER, {[]{return (logic->ForestTrialClear || ctx->GetTrial(TK_FOREST_TRIAL)->IsSkipped()) &&
Entrance(RR_GANONS_TOWER_FLOOR_1, {[]{return (logic->ForestTrialClear || ctx->GetTrial(TK_FOREST_TRIAL)->IsSkipped()) &&
(logic->FireTrialClear || ctx->GetTrial(TK_FIRE_TRIAL)->IsSkipped()) &&
(logic->WaterTrialClear || ctx->GetTrial(TK_WATER_TRIAL)->IsSkipped()) &&
(logic->ShadowTrialClear || ctx->GetTrial(TK_SHADOW_TRIAL)->IsSkipped()) &&
@ -376,4 +369,53 @@ void RegionTable_Init_GanonsCastle() {
EventAccess(&logic->LightTrialClear, {[]{return logic->CanUse(RG_LIGHT_ARROWS);}}),
}, {}, {});
}
/*--------------------------
| TOWER AND ESCAPE |
---------------------------*/
areaTable[RR_GANONS_TOWER_FLOOR_1] = Region("Ganon's Tower Floor 1", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_GANONS_CASTLE_LOBBY, {[]{return Here(RR_GANONS_TOWER_FLOOR_1, []{return logic->CanKillEnemy(RE_DINOLFOS, ED_CLOSE, true, 2);});}}),
Entrance(RR_GANONS_TOWER_FLOOR_2, {[]{return Here(RR_GANONS_TOWER_FLOOR_1, []{return logic->CanKillEnemy(RE_DINOLFOS, ED_CLOSE, true, 2);});}}),
});
areaTable[RR_GANONS_TOWER_FLOOR_2] = Region("Ganon's Tower Floor 2", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_GANONS_TOWER_BOSS_KEY_CHEST, logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 2)),
}, {
//Exits
Entrance(RR_GANONS_TOWER_FLOOR_1, {[]{return Here(RR_GANONS_TOWER_FLOOR_2, []{return logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 2);});}}),
Entrance(RR_GANONS_TOWER_FLOOR_3, {[]{return Here(RR_GANONS_TOWER_FLOOR_2, []{return logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 2);});}}),
});
areaTable[RR_GANONS_TOWER_FLOOR_3] = Region("Ganon's Tower Floor 3", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_GANONS_TOWER_FLOOR_2, {[]{return Here(RR_GANONS_TOWER_FLOOR_3, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE, ED_CLOSE, true, 2);});}}),
Entrance(RR_GANONS_TOWER_GANONDORF_LAIR, {[]{return Here(RR_GANONS_TOWER_FLOOR_3, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE, ED_CLOSE, true, 2);}) && logic->HasItem(RG_GANONS_CASTLE_BOSS_KEY);}}),
});
areaTable[RR_GANONS_TOWER_GANONDORF_LAIR] = Region("Ganondorf's Lair", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_GANONDORF_HINT, logic->HasBossSoul(RG_GANON_SOUL)),
//18 pots
}, {
//Exits
Entrance(RR_GANONS_CASTLE_ESCAPE, {[]{return logic->CanKillEnemy(RE_GANONDORF);}}),
});
areaTable[RR_GANONS_CASTLE_ESCAPE] = Region("Ganon's Castle Escape", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
//10 pots
}, {
//Exits
//temporary
Entrance(RR_GANONS_CASTLE_GANON_ARENA, {[]{return true;}}),
//real logic once we figure out how to deal with castle escape skip
//Entrance(RR_GANONS_CASTLE_GANON_ARENA, {[]{return logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 2, true);}}),
});
areaTable[RR_GANONS_CASTLE_GANON_ARENA] = Region("Ganon's Arena", "Ganons Castle", {RA_GANONS_CASTLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_GANON, logic->CanKillEnemy(RE_GANON)),
}, {});
}

View File

@ -209,7 +209,7 @@ void RegionTable_Init_GerudoTrainingGrounds() {
areaTable[RR_GERUDO_TRAINING_GROUNDS_MQ_STATUE_ROOM] = Region("Gerudo Training Grounds MQ Statue ROom", "Gerudo Training Grounds", {RA_GERUDO_TRAINING_GROUND}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_GERUDO_TRAINING_GROUND_MQ_EYE_STATUE_CHEST, logic->CanUse(RG_FAIRY_BOW)),
LOCATION(RC_GERUDO_TRAINING_GROUND_MQ_EYE_STATUE_CHEST, logic->CanUse(RG_FAIRY_BOW)),
}, {
//Exits
Entrance(RR_GERUDO_TRAINING_GROUNDS_MQ_STATUE_ROOM_LEDGE, {[]{return logic->CanUse(RG_LONGSHOT);}}),
@ -220,7 +220,7 @@ void RegionTable_Init_GerudoTrainingGrounds() {
//Locations
//implies logic->CanKillEnemy(RE_TORCH_SLUG)
LOCATION(RC_GERUDO_TRAINING_GROUND_MQ_SECOND_IRON_KNUCKLE_CHEST, logic->CanKillEnemy(RE_IRON_KNUCKLE)),
LOCATION(RC_GERUDO_TRAINING_GROUND_MQ_FLAME_CIRCLE_CHEST, logic->CanHitSwitch(ED_BOOMERANG)),
LOCATION(RC_GERUDO_TRAINING_GROUND_MQ_FLAME_CIRCLE_CHEST, logic->CanHitSwitch(ED_BOMB_THROW)),
}, {
//Exits
Entrance(RR_GERUDO_TRAINING_GROUNDS_MQ_STATUE_ROOM, {[]{return Here(RR_GERUDO_TRAINING_GROUNDS_MQ_TORCH_SLUG_ROOM, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE);});}}),

View File

@ -10,8 +10,8 @@ void RegionTable_Init_SpiritTemple() {
---------------------------*/
areaTable[RR_SPIRIT_TEMPLE_ENTRYWAY] = Region("Spirit Temple Entryway", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_LOBBY, {[]{return ctx->GetDungeon(SPIRIT_TEMPLE)->IsVanilla();}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, {[]{return ctx->GetDungeon(SPIRIT_TEMPLE)->IsMQ();}}),
Entrance(RR_SPIRIT_TEMPLE_LOBBY, {[]{return ctx->GetDungeon(SPIRIT_TEMPLE)->IsVanilla();}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, {[]{return ctx->GetDungeon(SPIRIT_TEMPLE)->IsMQ();}}),
Entrance(RR_DESERT_COLOSSUS_OUTSIDE_TEMPLE, {[]{return true;}}),
});
@ -137,102 +137,340 @@ void RegionTable_Init_SpiritTemple() {
if (ctx->GetDungeon(SPIRIT_TEMPLE)->IsMQ()) {
areaTable[RR_SPIRIT_TEMPLE_MQ_LOBBY] = Region("Spirit Temple MQ Lobby", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_FRONT_LEFT_CHEST, true),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_BACK_LEFT_CHEST, Here(RR_SPIRIT_TEMPLE_MQ_LOBBY, []{return logic->BlastOrSmash();}) && ((logic->IsChild && logic->CanUse(RG_FAIRY_SLINGSHOT)) || (logic->IsAdult && logic->CanUse(RG_FAIRY_BOW)))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_BACK_RIGHT_CHEST, logic->CanUse(RG_BOMBCHU_5) || (logic->IsAdult && (logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_HOOKSHOT))) || (logic->IsChild && (logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_BOOMERANG)))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_FRONT_LEFT_CHEST, true),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_BACK_LEFT_CHEST, Here(RR_SPIRIT_TEMPLE_MQ_LOBBY, []{return logic->BlastOrSmash();}) && logic->CanHitEyeTargets()),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_BACK_RIGHT_CHEST, logic->CanHitSwitch(ED_BOOMERANG)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_FRONT_RIGHT_CHEST, logic->Spirit1FSilverRupees),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_ENTRYWAY, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_CHILD, {[]{return logic->IsChild;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_ADULT, {[]{return logic->CanUse(RG_BOMBCHU_5) && logic->IsAdult && logic->CanUse(RG_LONGSHOT) && logic->CanUse(RG_SILVER_GAUNTLETS);}}),
Entrance(RR_SPIRIT_TEMPLE_ENTRYWAY, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_WEST, {[]{return logic->IsChild;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_SOUTH, {[]{return logic->CanUse(RG_LONGSHOT) && logic->CanUse(RG_BOMBCHU_5);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_CHILD] = Region("Spirit Temple MQ Child", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
areaTable[RR_SPIRIT_TEMPLE_MQ_1F_WEST] = Region("Spirit Temple MQ 1F West", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&logic->FairyPot, {[]{return logic->FairyPot || (logic->CanUse(RG_KOKIRI_SWORD) && logic->CanUse(RG_BOMBCHU_5) && logic->CanUse(RG_FAIRY_SLINGSHOT));}}),
//not technically a rusted switch, but a boulder through a wall, but is part of the same trick on N64
EventAccess(&logic->MQSpiritCrawlBoulder, {[]{return logic->CanUse(RG_BOMBCHU_5) || (ctx->GetTrickOption(RT_RUSTED_SWITCHES) && logic->CanUse(RG_MEGATON_HAMMER));}}),
}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_HAMMER_SWITCH_CHEST, Here(RR_SPIRIT_TEMPLE_MQ_ADULT, []{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanUse(RG_MEGATON_HAMMER);})),
LOCATION(RC_SPIRIT_TEMPLE_MQ_MAP_ROOM_ENEMY_CHEST, logic->CanUse(RG_KOKIRI_SWORD) && logic->CanUse(RG_BOMBCHU_5) && logic->CanUse(RG_FAIRY_SLINGSHOT) && logic->CanUse(RG_DINS_FIRE)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_MAP_CHEST, logic->CanUse(RG_KOKIRI_SWORD) || logic->CanUse(RG_BOMB_BAG)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_SILVER_BLOCK_HALLWAY_CHEST, logic->CanUse(RG_BOMBCHU_5) && logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanUse(RG_FAIRY_SLINGSHOT) && (logic->CanUse(RG_DINS_FIRE) || (Here(RR_SPIRIT_TEMPLE_MQ_ADULT, []{return logic->IsAdult && (logic->CanUse(RG_FIRE_ARROWS) || (ctx->GetTrickOption(RT_SPIRIT_MQ_FROZEN_EYE) && logic->CanUse(RG_FAIRY_BOW) && logic->CanUse(RG_SONG_OF_TIME)));})))),
//Trick: logic->CanUse(RG_BOMBCHU_5) && logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanUse(RG_FAIRY_SLINGSHOT) && (logic->CanUse(RG_DINS_FIRE) || (SPIRIT_TEMPLE_MQ_ADULT.Adult() && logic->IsAdult && (logic->CanUse(RG_FIRE_ARROWS) || (LogicSpiritMQFrozenEye && logic->CanUse(RG_FAIRY_BOW) && logic->CanUse(RG_SONG_OF_TIME)))))
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_HAMMER_SWITCH_CHEST, logic->MQSpiritTimeTravelChest),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SHARED, {[]{return logic->CanUse(RG_BOMBCHU_5) && logic->SmallKeys(RR_SPIRIT_TEMPLE, 2);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_SOUTH, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_1F_WEST, []{return logic->CanKillEnemy(RE_TORCH_SLUG);});}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_SOUTH, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_1F_WEST, []{return logic->CanKillEnemy(RE_TORCH_SLUG);});}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_WEST_1F_RUSTED_SWITCH, {[]{return logic->IsChild && logic->MQSpiritCrawlBoulder;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_ADULT] = Region("Spirit Temple MQ Adult", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
areaTable[RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_SOUTH] = Region("Spirit Temple MQ 1F Gibdo Room South", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_WEST, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_NORTH, {[]{return logic->CanUse(RG_BOMBCHU_5) && logic->CanHitEyeTargets();}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_TURNTABLE_ROOM, {[]{return logic->CanUse(RG_BOMBCHU_5) && logic->CanHitEyeTargets() && logic->CanKillEnemy(RE_GIBDO);}}),
});
// Room to store the 2 pots in to handle glitch logic going backwards around the loop later
areaTable[RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_NORTH] = Region("Spirit Temple MQ Gibdo Room North", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {});
areaTable[RR_SPIRIT_TEMPLE_MQ_TURNTABLE_ROOM] = Region("Spirit Temple Turntable Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
//For non-fairy pot items, you can also get them with rang without killing the stalfos
EventAccess(&logic->FairyPot, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_TURNTABLE_ROOM, []{return logic->CanKillEnemy(RE_STALFOS);});}}),
}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_NORTH, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_NORTH, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_TURNTABLE_ROOM, []{return logic->CanKillEnemy(RE_STALFOS);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_NORTH] = Region("Spirit Temple MQ Map Room North", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&logic->MQSpiritMapRoomEnemies, {[]{return logic->CanKillEnemy(RE_ANUBIS) && logic->CanKillEnemy(RE_KEESE);}}),
}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_CLIMB_SOUTH_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_STATUE_ROOM_LULLABY_CHEST, logic->CanUse(RG_ZELDAS_LULLABY) && (logic->CanJumpslashExceptHammer() || logic->CanUse(RG_HOVER_BOOTS))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_STATUE_ROOM_INVISIBLE_CHEST, (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_BEAMOS_ROOM_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 5)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHEST_SWITCH_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 5) && logic->CanUse(RG_SONG_OF_TIME)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_BOSS_KEY_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 5) && logic->CanUse(RG_SONG_OF_TIME) && (logic->CanUse(RG_MIRROR_SHIELD) || (ctx->GetOption(RSK_SUNLIGHT_ARROWS) && logic->CanUse(RG_LIGHT_ARROWS)))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_NINE_THRONES_ROOM_WEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_NINE_THRONES_ROOM_NORTH, logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_MAP_ROOM_ENEMY_CHEST, logic->MQSpiritMapRoomEnemies),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_LOWER_ADULT, {[]{return logic->CanUse(RG_MIRROR_SHIELD) && logic->IsAdult && (logic->CanUse(RG_FIRE_ARROWS) || (ctx->GetTrickOption(RT_SPIRIT_MQ_LOWER_ADULT) && logic->CanUse(RG_DINS_FIRE) && logic->CanUse(RG_FAIRY_BOW)));}}),
//Trick: logic->CanUse(RG_MIRROR_SHIELD) && logic->IsAdult && (logic->CanUse(RG_FIRE_ARROWS) || (LogicSpiritMQLowerAdult && logic->CanUse(RG_DINS_FIRE) && logic->CanUse(RG_FAIRY_BOW)))
Entrance(RR_SPIRIT_TEMPLE_MQ_SHARED, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BOSS_AREA, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 6) && logic->CanUse(RG_ZELDAS_LULLABY) && logic->CanUse(RG_MEGATON_HAMMER);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 5) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanJumpslashExceptHammer() && (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH));}}),
//Stalfos room blocks you in with fire until you kill the stalfos, which won't spawn from behind the fire
Entrance(RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_SOUTH, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_SHARED] = Region("Spirit Temple MQ Shared", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
areaTable[RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_SOUTH] = Region("Spirit Temple MQ Map Room South", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
//You can lure the keese over by aggroing them with dins if you use it as close to the torch keese as possible, but it's a trick as it's not intuitive and basically never comes up
EventAccess(&logic->MQSpiritMapRoomEnemies, {[]{return logic->CanKillEnemy(RE_ANUBIS) && logic->CanKillEnemy(RE_KEESE, ED_BOOMERANG);}}),
}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_CLIMB_NORTH_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 6)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_COMPASS_CHEST, (logic->IsChild && logic->CanUse(RG_FAIRY_SLINGSHOT) && logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)) || (logic->IsAdult && logic->CanUse(RG_FAIRY_BOW)) || (logic->CanUse(RG_FAIRY_BOW) && logic->CanUse(RG_FAIRY_SLINGSHOT))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM_CHEST, logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_SOT) || logic->IsAdult),
//Trick: logic->CanUse(RG_SONG_OF_TIME) || LogicSpiritMQSunBlockSoT || logic->IsAdult
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_SUN_BLOCK_ROOM, (ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_GS) && logic->CanUse(RG_BOOMERANG) && (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_SOT))) || logic->IsAdult),
//Trick: (LogicSpiritMQSunBlockGS && logic->CanUse(RG_BOOMERANG) && (logic->CanUse(RG_SONG_OF_TIME) || LogicSpiritMQSunBlockSoT)) || logic->IsAdult
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND, {[]{return (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_SOT) || logic->IsAdult)) || (logic->SmallKeys(RR_SPIRIT_TEMPLE, 4) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanJumpslashExceptHammer() && (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)));}}),
//Trick: (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && (logic->CanUse(RG_SONG_OF_TIME) || LogicSpiritMQSunBlockSoT || logic->IsAdult)) || (logic->SmallKeys(RR_SPIRIT_TEMPLE, 4) && logic->CanUse(RG_SONG_OF_TIME) && (LogicLensSpiritMQ || logic->CanUse(RG_LENS_OF_TRUTH)))
Entrance(RR_DESERT_COLOSSUS, {[]{return (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_SOT) || logic->IsAdult)) || (logic->SmallKeys(RR_SPIRIT_TEMPLE, 4) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanJumpslashExceptHammer() && (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)) && logic->IsAdult);}}),
//Trick: (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && (logic->CanUse(RG_SONG_OF_TIME) || LogicSpiritMQSunBlockSoT || logic->IsAdult)) || (logic->SmallKeys(RR_SPIRIT_TEMPLE, 4) && logic->CanUse(RG_SONG_OF_TIME) && (LogicLensSpiritMQ || logic->CanUse(RG_LENS_OF_TRUTH)) && logic->IsAdult)
});
areaTable[RR_SPIRIT_TEMPLE_MQ_LOWER_ADULT] = Region("Spirit Temple MQ Lower Adult", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_LEEVER_ROOM_CHEST, true),
LOCATION(RC_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM_CHEST, logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanUse(RG_MEGATON_HAMMER) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanUse(RG_EPONAS_SONG) && logic->CanUse(RG_SUNS_SONG)
&& logic->CanUse(RG_SONG_OF_STORMS) && logic->CanUse(RG_ZELDAS_LULLABY)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_ENTRANCE_FRONT_RIGHT_CHEST, logic->CanUse(RG_MEGATON_HAMMER)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_LEEVER_ROOM, true),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_SYMPHONY_ROOM, logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanUse(RG_MEGATON_HAMMER) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanUse(RG_EPONAS_SONG) && logic->CanUse(RG_SUNS_SONG)
&& logic->CanUse(RG_SONG_OF_STORMS) && logic->CanUse(RG_ZELDAS_LULLABY)),
}, {});
areaTable[RR_SPIRIT_TEMPLE_MQ_BOSS_AREA] = Region("Spirit Temple MQ Boss Region", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_MIRROR_PUZZLE_INVISIBLE_CHEST, ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_MAP_CHEST, true),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD, {[]{return logic->CanUse(RG_MIRROR_SHIELD) && logic->CanUse(RG_HOOKSHOT);}}),
//The bridge is a temp flag, so not a way to cross south to north in logic
Entrance(RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_NORTH, {[]{return logic->CanUse(RG_HOOKSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_WEST, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD] =
Region("Spirit Temple MQ Inside Statue Head", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {},
{
// Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SHARED, { [] { return true; } }),
Entrance(RR_SPIRIT_TEMPLE_BOSS_ENTRYWAY, { [] { return logic->HasItem(RG_SPIRIT_TEMPLE_BOSS_KEY); } }),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_WEST_1F_RUSTED_SWITCH] = Region("Spirit Temple MQ West 1F Rusted Switch", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&logic->MQSpiritTimeTravelChest, {[]{return logic->CanUse(RG_MEGATON_HAMMER);}}),
EventAccess(&logic->MQSpiritCrawlBoulder, {[]{return logic->CanUse(RG_BOMBCHU_5) || (ctx->GetTrickOption(RT_RUSTED_SWITCHES) && logic->CanUse(RG_MEGATON_HAMMER));}}),
}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_WEST, {[]{return logic->IsChild && logic->MQSpiritCrawlBoulder;}}),
//This tracks possible child access, if adult has not entered STATUE_ROOM. Certain Child Access is checked for separately as 7 Keys
Entrance(RR_SPIRIT_TEMPLE_MQ_UNDER_LIKE_LIKE, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 1);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND] = Region("Spirit Temple MQ Mirror Shield Hand", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//THIS REGION NEEDS MQSpiritSharedBrokenWallRoom WHEN ADDING THE POT
areaTable[RR_SPIRIT_TEMPLE_MQ_UNDER_LIKE_LIKE] = Region("Spirit Temple MQ Under Like Like", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
//This covers adult access only, as child arrives here from the other side of this door
Entrance(RR_SPIRIT_TEMPLE_MQ_WEST_1F_RUSTED_SWITCH, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BROKEN_WALL_ROOM, {[]{return logic->CanHitSwitch();}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BROKEN_WALL_ROOM] = Region("Spirit Temple MQ Broken Wall Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, true),
}, {});
//Implies CanKillEnemy(RE_LIKE_LIKE)
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_CLIMB_NORTH_CHEST, MQSpiritSharedBrokenWallRoom(RR_SPIRIT_TEMPLE_MQ_BROKEN_WALL_ROOM, []{return logic->CanKillEnemy(RE_BEAMOS);})),
//Sunlights only temp spawn this chest, which is unintuitive/a bug.
//chest is only reachable as adult glitchlessly, so we can skip the shared in favour of IsAdult as adult access is always Certain
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHILD_CLIMB_SOUTH_CHEST, logic->IsAdult && logic->HasExplosives() && (ctx->GetOption(RSK_SUNLIGHT_ARROWS) && logic->CanUse(RG_LIGHT_ARROWS)) && logic->CanUse(RG_HOOKSHOT)),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_UNDER_LIKE_LIKE, {[]{return logic->CanHitSwitch();}}),
//This exit only governs child possible access, adult access starts on the other side so never checks this
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 2);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM] = Region("Spirit Temple MQ Statue Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_COMPASS_CHEST, MQSpiritSharedStatueRoom(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, []{return logic->CanHitEyeTargets();})),
}, {
//Exits
//we check possible adult access directly in MQSpiritSharedBrokenWallRoom, so this exit only covers Certain Access
Entrance(RR_SPIRIT_TEMPLE_MQ_BROKEN_WALL_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
//We can use Here instead of Shared here because adult will never need to rely on child access to reach this room, and adult access is Certain
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, []{return logic->HasFireSource() || (ctx->GetTrickOption(RT_SPIRIT_MQ_FROZEN_EYE) && logic->CanUse(RG_FAIRY_BOW) && logic->CanUse(RG_SONG_OF_TIME));});}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM, {[]{return logic->IsAdult || ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_SOT) || logic->CanUse(RG_SONG_OF_TIME);}}),
//explicit adult check here is a precaution against possible child logic leaking, child with a hookshot can do this
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM_EAST, {[]{return logic->IsAdult && logic->CanUse(RG_HOOKSHOT);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM] = Region("Spirit Temple MQ Sun Block Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
//We don't need Shared here because If we are checking as child, universe 2 adult access needs nothing so it always passes, and if we are checking as adult, it is Certain Access
LOCATION(RC_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM_CHEST, true),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_SUN_BLOCK_ROOM, MQSpiritSharedStatueRoom(RR_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM, []{return logic->CanUse(RG_HOOKSHOT) || (ctx->GetTrickOption(RT_SPIRIT_MQ_SUN_BLOCK_GS) && logic->CanUse(RG_BOOMERANG));})),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, {[]{return true;}}),
//This door causes the Universes to merge as it requires 7 keys for both ages
Entrance(RR_SPIRIT_TEMPLE_MQ_WEST_IRON_KNUCKLE, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_WEST_IRON_KNUCKLE] = Region("Spirit Temple MQ East Iron Knuckle", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND, {[]{return logic->CanKillEnemy(RE_IRON_KNUCKLE);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND] = Region("Spirit Temple MQ Silver Gauntlets Hand", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_SILVER_GAUNTLETS_CHEST, true),
}, {});
}, {
//Exits
//If it is ever relevent for 1 age to spawn the mirror shield chest for the other can longshot across, it needs an eventAccess
Entrance(RR_SPIRIT_TEMPLE_MQ_WEST_IRON_KNUCKLE, {[]{return true;}}),
Entrance(RR_DESERT_COLOSSUS, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_SOUTH] = Region("Spirit Temple MQ Block Room South", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, {[]{return true;}}),
//The block here is unusual in that it is a permanent flag, but reset anyway as child. This is because there's a check that would be blocked off by pushing them otherwise
//It may be worth considering making this always temp in future so adult doesn't have the same issue
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH, {[]{return logic->IsChild ? logic->CanUse(RG_SILVER_GAUNTLETS) : Here(RR_SPIRIT_TEMPLE_MQ_LOBBY, []{return logic->CanUse(RG_SILVER_GAUNTLETS);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH] = Region("Spirit Temple MQ Block Room North", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
//Does not need to be shared as it's hard child locked, because adult pushing the block is a permanent flag that blocks the eye target and cannot be undone
LOCATION(RC_SPIRIT_TEMPLE_MQ_SILVER_BLOCK_HALLWAY_CHEST, logic->IsChild && logic->SmallKeys(RR_SPIRIT_TEMPLE, 7) && logic->CanHitEyeTargets()),
}, {
//Exits
//if going to RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_SOUTH from here is ever relevant, there needs to be an event to handle the block
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM_EAST] = Region("Spirit Temple MQ Statue Room East", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_STATUE_ROOM_LULLABY_CHEST, logic->CanUse(RG_HOOKSHOT) & logic->CanUse(RG_ZELDAS_LULLABY) && (logic->CanJumpslash() || logic->CanUse(RG_HOVER_BOOTS))),
LOCATION(RC_SPIRIT_TEMPLE_MQ_STATUE_ROOM_INVISIBLE_CHEST, (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)) && (logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_HOVER_BOOTS))),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, {[]{return true;}}),
//!QUANTUM LOGIC!
//We only need 4 keys, access to Shield hand and longshot to reach Gauntlets hand, as if we waste the 5th key we have given ourselves Gauntlets hand access through child climb
//This exit handles that possibility as cleanly as possible without quantum logic, but will not survive glitch logic
//logic->CanKillEnemy(RE_FLOORMASTER) is implied
Entrance(RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 4) &&
logic->CanAvoidEnemy(RE_BEAMOS, true, 4) && logic->CanUse(RG_SONG_OF_TIME) &&
logic->CanJumpslash() &&
(ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)) &&
logic->CanKillEnemy(RE_IRON_KNUCKLE) &&
logic->CanUse(RG_LONGSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_FOUR_BEAMOS_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 5) && logic->CanUse(RG_HOOKSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_2F, {[]{return logic->CanUse(RG_FIRE_ARROWS) || (ctx->GetTrickOption(RT_SPIRIT_MQ_LOWER_ADULT) && logic->CanUse(RG_DINS_FIRE));}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_2F] = Region("Spirit Temple MQ Three Suns Room 2F", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
//implies logic->CanKillEnemy(RE_WALLMASTER). If we have lights, we can kill stalfos and wallmasters with bow
EventAccess(&logic->MQSpirit3SunsEnemies, {[]{return (logic->CanUse(RG_MIRROR_SHIELD) && logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 2)) ||
(ctx->GetOption(RSK_SUNLIGHT_ARROWS) && logic->CanUse(RG_LIGHT_ARROWS));}}),
}, {}, {
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM_EAST, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_1F, {[]{return logic->MQSpirit3SunsEnemies;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_1F] = Region("Spirit Temple MQ Three Suns Room 1F", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
Entrance(RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_2F, {[]{return logic->MQSpirit3SunsEnemies;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_EAST, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_1F_EAST] = Region("Spirit Temple MQ 1F East", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
//Assumes RR_SPIRIT_TEMPLE_MQ_LOBBY access
EventAccess(&logic->Spirit1FSilverRupees, {[]{return logic->CanUse(RG_MEGATON_HAMMER);}}),
}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, {[]{return logic->CanUse(RG_MEGATON_HAMMER);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_1F, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_LEEVER_ROOM, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_LEEVER_ROOM] = Region("Spirit Temple MQ Leever Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_LEEVER_ROOM_CHEST, logic->CanKillEnemy(RE_PURPLE_LEEVER) && logic->CanUse(RG_HOOKSHOT)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_LEEVER_ROOM, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG)),
}, {
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_EAST, {[]{return logic->CanUse(RG_ZELDAS_LULLABY);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM] = Region("Spirit Temple MQ Symphony Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_1F_EAST, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
//Implies CanPassEnemy(RE_MOBLIN_CHIEF)
Entrance(RR_SPIRIT_TEMPLE_MQ_AFTER_SYMPHONY_ROOM, {[]{return logic->CanUse(RG_MEGATON_HAMMER) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanUse(RG_EPONAS_SONG) &&
logic->CanUse(RG_SUNS_SONG) && logic->CanUse(RG_SONG_OF_STORMS) && logic->CanUse(RG_ZELDAS_LULLABY);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_AFTER_SYMPHONY_ROOM] = Region("Spirit Temple MQ After Symphony Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM_CHEST, logic->CanPassEnemy(RE_BIG_SKULLTULA)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_SYMPHONY_ROOM, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG)),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_FOUR_BEAMOS_ROOM] = Region("Spirit Temple MQ Four Beamos Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_BEAMOS_ROOM_CHEST, logic->CanKillEnemy(RE_BEAMOS)),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM_EAST, {[]{return logic->CanAvoidEnemy(RE_BEAMOS, true, 4) && logic->CanUse(RG_SONG_OF_TIME) && logic->SmallKeys(RR_SPIRIT_TEMPLE, 5) && logic->CanUse(RG_HOOKSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM, {[]{return logic->CanAvoidEnemy(RE_BEAMOS, true, 4) && logic->CanUse(RG_SONG_OF_TIME);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_WALL, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 6);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM] = Region("Spirit Temple MQ SoT Sun Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_CHEST_SWITCH_CHEST, true),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_FOUR_BEAMOS_ROOM, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, {[]{return logic->CanJumpslash();}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_3F_GIBDO_ROOM, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM, []{return (logic->IsAdult || logic->CanUse(RG_SONG_OF_TIME)) && logic->CanUse(RG_MIRROR_SHIELD);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND] = Region("Spirit Temple MQ East Stairs to Hand", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE, {[]{return (ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)) &&
Here(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, []{return logic->CanKillEnemy(RE_FLOORMASTER);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE] = Region("Spirit Temple MQ East Iron Knuckle", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND] = Region("Spirit Temple MQ Mirror Shield Hand", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MIRROR_SHIELD_CHEST, true),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND, {[]{return logic->CanUse(RG_LONGSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE, {[]{return true;}}),
Entrance(RR_DESERT_COLOSSUS, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_3F_GIBDO_ROOM] = Region("Spirit Temple MQ 3F Gibdo Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_BOSS_KEY_CHEST, true),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_WALL] = Region("Spirit Temple MQ Big Wall", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_FOUR_BEAMOS_ROOM, {[]{return true;}}),
//technically we only need to avoid them, but the sheer height and the moving walls makes getting to the top after only stunning them very difficult/impossible
//The silver rupees are irrelevant without silver shuffle
Entrance(RR_SPIRIT_TEMPLE_MQ_4F_CENTRAL, {[]{return logic->CanKillEnemy(RE_KEESE);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_4F_CENTRAL] = Region("Spirit Temple MQ 4F Central", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_WALL, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_NINE_CHAIRS_ROOM, {[]{return logic->SmallKeys(RR_SPIRIT_TEMPLE, 7);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_ROOM, {[]{return logic->CanUse(RG_ZELDAS_LULLABY);}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_NINE_CHAIRS_ROOM] = Region("Spirit Temple MQ Nine Chairs Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
//These skulls rely on the iron knuckle existing without a trick to shoot through the chairs
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_NINE_THRONES_ROOM_WEST, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG)),
LOCATION(RC_SPIRIT_TEMPLE_MQ_GS_NINE_THRONES_ROOM_NORTH, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA)),
}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_4F_CENTRAL, {[]{return true;}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_ROOM] = Region("Spirit Temple MQ Big Mirror Room", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_4F_CENTRAL, {[]{return true;}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_CAVE, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_ROOM, []{return logic->CanUse(RG_MEGATON_HAMMER);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_CAVE] = Region("Spirit Temple MQ Big Mirror Cave", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
LOCATION(RC_SPIRIT_TEMPLE_MQ_MIRROR_PUZZLE_INVISIBLE_CHEST, ctx->GetTrickOption(RT_LENS_SPIRIT_MQ) || logic->CanUse(RG_LENS_OF_TRUTH)),
}, {
//Exits
//If it's ever relevant to longshot into head from lobby, this needs to be an event access
Entrance(RR_SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_CAVE, []{return logic->CanUse(RG_MIRROR_SHIELD);}) && logic->CanUse(RG_HOOKSHOT);}}),
Entrance(RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM, {[]{return Here(RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_CAVE, []{return logic->CanUse(RG_MIRROR_SHIELD);});}}),
});
areaTable[RR_SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD] = Region("Spirit Temple MQ Inside Statue Head", "Spirit Temple", {RA_SPIRIT_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
// Exits
Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, {[]{return true;} }),
Entrance(RR_SPIRIT_TEMPLE_BOSS_ENTRYWAY, {[]{return logic->HasItem(RG_SPIRIT_TEMPLE_BOSS_KEY);}}),
});
}
/*---------------------------

View File

@ -475,7 +475,7 @@ void RegionTable_Init_WaterTemple() {
areaTable[RR_WATER_TEMPLE_MQ_STALFOS_PIT] = Region("Water Temple MQ Stalfos Pit", "Water Temple", {RA_WATER_TEMPLE}, NO_DAY_NIGHT_CYCLE, {
//Events
EventAccess(&logic->MQWaterStalfosPit, {[]{return ((logic->IsAdult && logic->CanKillEnemy(RE_STALFOS, ED_CLOSE, true, 3, false, true)) ||
(logic->CanUse(RG_IRON_BOOTS) && logic->CanUse(RG_HOOKSHOT) && logic->CanKillEnemy(RE_STALFOS, ED_BOOMERANG, true, 3, false, true)));}}),
(logic->CanUse(RG_IRON_BOOTS) && logic->CanUse(RG_HOOKSHOT) && logic->CanKillEnemy(RE_STALFOS, ED_BOMB_THROW, true, 3, false, true)));}}),
}, {}, {
//Exits
Entrance(RR_WATER_TEMPLE_MQ_WATERFALL, {[]{return logic->MQWaterStalfosPit && logic->CanUse(RG_HOOKSHOT) && (logic->IsAdult || logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 8);}}),
@ -577,7 +577,7 @@ void RegionTable_Init_WaterTemple() {
LOCATION(RC_WATER_TEMPLE_MQ_BOSS_KEY_CHEST, true),
}, {
//Exits
Entrance(RR_WATER_TEMPLE_MQ_BOSS_KEY_ROOM_SWITCH, {[]{return logic->CanHitSwitch(ED_BOOMERANG) || logic->CanUse(RG_HOVER_BOOTS);}}),
Entrance(RR_WATER_TEMPLE_MQ_BOSS_KEY_ROOM_SWITCH, {[]{return logic->CanHitSwitch(ED_BOMB_THROW) || logic->CanUse(RG_HOVER_BOOTS);}}),
Entrance(RR_WATER_TEMPLE_MQ_BOSS_KEY_ROOM_PIT, {[]{return true;}}),
Entrance(RR_WATER_TEMPLE_MQ_B1_GATE_SWITCH, {[]{return logic->HasItem(RG_SILVER_SCALE) || (logic->CanUse(RG_IRON_BOOTS) && (logic->HasItem(RG_BRONZE_SCALE) || (logic->WaterTimer() >= 24 && logic->CanUse(RG_LONGSHOT))));}}),
});

View File

@ -834,7 +834,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
Actor_Kill(&item00->actor);
*should = false;
} else if (item00->actor.params == ITEM00_SOH_GIVE_ITEM_ENTRY) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (item00->itemEntry.modIndex == MOD_NONE) {
if (item00->itemEntry.getItemId == GI_SWORD_BGS) {
gSaveContext.bgsFlag = true;

View File

@ -434,12 +434,15 @@ namespace Rando {
case ED_LONG_JUMPSLASH:
killed = killed || CanUse(RG_BIGGORON_SWORD) || CanUse(RG_STICKS);
[[fallthrough]];
case ED_BOMB_THROW:
killed = killed || CanUse(RG_BOMB_BAG);
[[fallthrough]];
case ED_BOOMERANG:
//RANDOTODO test dins, bomb and chu range in a practical example
killed = killed || CanUse(RG_BOMB_BAG) || CanUse(RG_DINS_FIRE);
//RANDOTODO test dins and chu range in a practical example
killed = killed || CanUse(RG_DINS_FIRE);
[[fallthrough]];
case ED_HOOKSHOT:
//RANDOTODO test dins, bomb and chu range in a practical example
//RANDOTODO test dins and chu range in a practical example
killed = killed || CanUse(RG_HOOKSHOT) || (wallOrFloor && CanUse(RG_BOMBCHU_5));
[[fallthrough]];
case ED_LONGSHOT:
@ -467,9 +470,13 @@ namespace Rando {
case ED_LONG_JUMPSLASH:
killed = killed || CanUse(RG_BIGGORON_SWORD) || CanUse(RG_STICKS);
[[fallthrough]];
case ED_BOMB_THROW:
//RANDOTODO test dins and chu range in a practical example
killed = killed || (!inWater && CanUse(RG_BOMB_BAG));
[[fallthrough]];
case ED_BOOMERANG:
//RANDOTODO test dins, bomb and chu range in a practical example
killed = killed || CanUse(RG_BOOMERANG) || (!inWater && CanUse(RG_BOMB_BAG));
//RANDOTODO test dins and chu range in a practical example
killed = killed || CanUse(RG_BOOMERANG);
[[fallthrough]];
case ED_HOOKSHOT:
//RANDOTODO test dins, bomb and chu range in a practical example
@ -508,12 +515,12 @@ namespace Rando {
case ED_LONG_JUMPSLASH:
killed = killed || CanUse(RG_BIGGORON_SWORD) || (quantity <= 1 && CanUse(RG_STICKS));
[[fallthrough]];
case ED_BOOMERANG:
//RANDOTODO test dins, bomb and chu range in a practical example
case ED_BOMB_THROW:
killed = killed || (quantity <= 2 && !timer && !inWater && (CanUse(RG_NUTS) || HookshotOrBoomerang()) && CanUse(RG_BOMB_BAG));
[[fallthrough]];
case ED_BOOMERANG:
case ED_HOOKSHOT:
//RANDOTODO test dins, bomb and chu range in a practical example
//RANDOTODO test dins and chu range in a practical example
killed = killed || (wallOrFloor && CanUse(RG_BOMBCHU_5));
[[fallthrough]];
case ED_LONGSHOT:
@ -535,6 +542,7 @@ namespace Rando {
return CanUse(RG_MEGATON_HAMMER) || CanUse(RG_HOOKSHOT) || (HasExplosives() && (CanJumpslashExceptHammer() || CanUse(RG_FAIRY_BOW) || CanUse(RG_FAIRY_SLINGSHOT) || CanUse(RG_BOOMERANG)));
case RE_WOLFOS:
case RE_WHITE_WOLFOS:
case RE_WALLMASTER:
return CanJumpslash() || CanUse(RG_FAIRY_BOW) || CanUse(RG_FAIRY_SLINGSHOT) || CanUse(RG_BOMBCHU_5) || CanUse(RG_DINS_FIRE) || (CanUse(RG_BOMB_BAG) && (CanUse(RG_NUTS) || CanUse(RG_HOOKSHOT) || CanUse(RG_BOOMERANG)));
case RE_GIBDO:
case RE_REDEAD:
@ -568,10 +576,11 @@ namespace Rando {
case ED_LONG_JUMPSLASH:
killed = killed || CanUse(RG_BIGGORON_SWORD) || CanUse(RG_STICKS);
[[fallthrough]];
case ED_BOOMERANG:
//RANDOTODO test dins, bomb and chu range in a practical example
case ED_BOMB_THROW:
//RANDOTODO test dins and chu range in a practical example
killed = killed || (!inWater && CanUse(RG_BOMB_BAG));
[[fallthrough]];
case ED_BOOMERANG:
case ED_HOOKSHOT:
//RANDOTODO test dins, bomb and chu range in a practical example
killed = killed || CanUse(RG_HOOKSHOT) || (wallOrFloor && CanUse(RG_BOMBCHU_5));
@ -587,9 +596,30 @@ namespace Rando {
case RE_BIG_OCTO:
//If chasing octo is annoying but with rolls you can catch him, and you need rang to get into this room without shenanigains anyway. Bunny makes it free
return CanUse(RG_KOKIRI_SWORD) || CanUse(RG_STICKS) || CanUse(RG_MASTER_SWORD);
case RE_GANONDORF:
// RANDOTODO: Trick to use hammer (no jumpslash) or stick (only jumpslash) instead of a sword to reflect the energy ball
// and either of them regardless of jumpslashing to damage and kill ganondorf
// Bottle is not taken into account since a sword, hammer or stick are required
// for killing ganondorf and all of those can reflect the energy ball
// This will not be the case once ammo logic in taken into account as
// sticks are limited and using a bottle might become a requirement in that case
return HasBossSoul(RG_GANON_SOUL) && CanUse(RG_LIGHT_ARROWS) && (CanUse(RG_KOKIRI_SWORD) || CanUse(RG_MASTER_SWORD) || CanUse(RG_BIGGORON_SWORD));
case RE_GANON:
return HasBossSoul(RG_GANON_SOUL) && CanUse(RG_MASTER_SWORD);
case RE_DARK_LINK:
//RNADOTODO Dark link is buggy right now, retest when he is not
//RANDOTODO Dark link is buggy right now, retest when he is not
return CanJumpslash() || CanUse(RG_FAIRY_BOW);
case RE_ANUBIS:
//there's a restoration that allows beating them with mirror shield + some way to trigger thier attack
return HasFireSource();
case RE_BEAMOS:
return HasExplosives();
case RE_PURPLE_LEEVER:
//dies on it's own, so this is the conditions to spawn it (killing 10 normal leevers)
//Sticks and Ice arrows work but will need ammo capacity logic
//other mothods can damage them but not kill them, and they run when hit, making them impractical
return CanUse(RG_MASTER_SWORD) || CanUse(RG_BIGGORON_SWORD);
default:
SPDLOG_ERROR("CanKillEnemy reached `default`.");
assert(false);
@ -626,6 +656,9 @@ namespace Rando {
case RE_FREEZARD:
case RE_SPIKE:
case RE_DARK_LINK:
case RE_ANUBIS:
case RE_WALLMASTER:
case RE_PURPLE_LEEVER:
return true;
case RE_BIG_SKULLTULA:
//hammer jumpslash can pass, but only on flat land where you can kill with hammer swing
@ -649,48 +682,56 @@ namespace Rando {
}
//Can we avoid this enemy while climbing up a wall, or doing a difficult platforming challenge?
bool Logic::CanAvoidEnemy(RandomizerEnemy enemy) {
if (CanKillEnemy(enemy)){
return true;
}
switch(enemy) {
case RE_GOLD_SKULLTULA:
case RE_GOHMA_LARVA:
case RE_LIZALFOS:
case RE_DODONGO: //RANDOTODO do dodongos block the way in tight corridors?
case RE_BIG_SKULLTULA:
case RE_DEAD_HAND:
case RE_DEKU_BABA:
case RE_WITHERED_DEKU_BABA:
case RE_LIKE_LIKE:
case RE_STALFOS:
case RE_IRON_KNUCKLE:
case RE_FLARE_DANCER:
case RE_WOLFOS:
case RE_WHITE_WOLFOS:
case RE_FLOORMASTER:
case RE_REDEAD:
case RE_MEG:
case RE_ARMOS:
case RE_GREEN_BUBBLE:
case RE_FREEZARD:
case RE_SPIKE:
case RE_BIG_OCTO:
case RE_GIBDO:
case RE_DARK_LINK:
return true;
case RE_MAD_SCRUB:
case RE_KEESE:
case RE_FIRE_KEESE:
return CanUse(RG_NUTS);
case RE_BLUE_BUBBLE:
//RANDOTODO Trick to use shield hylian shield as child to stun these guys
return CanUse(RG_NUTS) || HookshotOrBoomerang() || CanStandingShield();
default:
SPDLOG_ERROR("CanPassEnemy reached `default`.");
assert(false);
return false;
}
//use grounded if the challenge is such that the enemy interfears even if it cannot hit link out of the air
bool Logic::CanAvoidEnemy(RandomizerEnemy enemy, bool grounded, uint8_t quantity) {
//DISTANCE AND WALL ASSUMED, add more arguments later if needed
if (CanKillEnemy(enemy, ED_CLOSE, true, quantity)){
return true;
}
switch(enemy) {
case RE_GOLD_SKULLTULA:
case RE_GOHMA_LARVA:
case RE_LIZALFOS:
case RE_DODONGO:
case RE_BIG_SKULLTULA:
case RE_DEAD_HAND:
case RE_DEKU_BABA:
case RE_WITHERED_DEKU_BABA:
case RE_LIKE_LIKE:
case RE_STALFOS:
case RE_IRON_KNUCKLE:
case RE_FLARE_DANCER:
case RE_WOLFOS:
case RE_WHITE_WOLFOS:
case RE_FLOORMASTER:
case RE_REDEAD:
case RE_MEG:
case RE_ARMOS:
case RE_GREEN_BUBBLE:
case RE_FREEZARD:
case RE_SPIKE:
case RE_BIG_OCTO:
case RE_GIBDO:
case RE_DARK_LINK:
case RE_WALLMASTER:
case RE_ANUBIS:
case RE_PURPLE_LEEVER:
return true;
case RE_BEAMOS:
return !grounded || CanUse(RG_NUTS) || (quantity == 1 && (CanUse(RG_FAIRY_BOW) || CanUse(RG_FAIRY_SLINGSHOT)));
case RE_MAD_SCRUB:
return !grounded || CanUse(RG_NUTS);
case RE_KEESE:
case RE_FIRE_KEESE:
return CanUse(RG_NUTS);
case RE_BLUE_BUBBLE:
//RANDOTODO Trick to use shield hylian shield as child to stun these guys
return !grounded || CanUse(RG_NUTS) || HookshotOrBoomerang() || CanStandingShield();
default:
SPDLOG_ERROR("CanPassEnemy reached `default`.");
assert(false);
return false;
}
}
bool Logic::CanGetEnemyDrop(RandomizerEnemy enemy, EnemyDistance distance, bool aboveLink) {
@ -708,6 +749,7 @@ namespace Rando {
case ED_SHORT_JUMPSLASH:
case ED_MASTER_SWORD_JUMPSLASH:
case ED_LONG_JUMPSLASH:
case ED_BOMB_THROW:
case ED_BOOMERANG:
drop = drop || CanUse(RG_BOOMERANG);
[[fallthrough]];
@ -718,9 +760,10 @@ namespace Rando {
drop = drop || CanUse(RG_LONGSHOT);
[[fallthrough]];
case ED_FAR:
return drop;
break;
//RANDOTODO double check all jumpslash kills that might be out of jump/backflip range
}
return drop;
break;
case RE_KEESE:
case RE_FIRE_KEESE:
@ -832,12 +875,14 @@ namespace Rando {
case ED_LONG_JUMPSLASH:
hit = hit || CanUse(RG_BIGGORON_SWORD) || CanUse(RG_STICKS);
[[fallthrough]];
case ED_BOMB_THROW:
hit = hit || (!inWater && CanUse(RG_BOMB_BAG));
[[fallthrough]];
case ED_BOOMERANG:
//RANDOTODO test bomb and chu range in a practical example
hit = hit || CanUse(RG_BOOMERANG) || (!inWater && CanUse(RG_BOMB_BAG)) ;
hit = hit || CanUse(RG_BOOMERANG);
[[fallthrough]];
case ED_HOOKSHOT:
//RANDOTODO test bomb and chu range in a practical example
//RANDOTODO test chu range in a practical example
hit = hit || CanUse(RG_HOOKSHOT) || CanUse(RG_BOMBCHU_5) ;
[[fallthrough]];
case ED_LONGSHOT:
@ -2110,6 +2155,9 @@ namespace Rando {
MQWaterB1Switch = false;
//MQWaterPillarSoTBlock = false;
MQWaterOpenedPillarB1 = false;
MQSpiritCrawlBoulder = false;
MQSpiritMapRoomEnemies = false;
MQSpirit3SunsEnemies = false;
StopPerformanceTimer(PT_LOGIC_RESET);
}

View File

@ -166,6 +166,11 @@ class Logic {
bool MQWaterB1Switch = false;
//bool MQWaterPillarSoTBlock = false; should be irrelevant. SHOULD.
bool MQWaterOpenedPillarB1 = false;
bool MQSpiritCrawlBoulder = false;
bool MQSpiritMapRoomEnemies = false;
bool MQSpiritTimeTravelChest = false;
bool MQSpirit3SunsEnemies = false;
bool Spirit1FSilverRupees = false;
/* --- END OF HELPERS AND LOCATION ACCESS --- */
@ -181,7 +186,7 @@ class Logic {
bool CanEquipSwap(RandomizerGet itemName);
bool CanKillEnemy(RandomizerEnemy enemy, EnemyDistance distance = ED_CLOSE, bool wallOrFloor = true, uint8_t quantity = 1, bool timer = false, bool inWater = false);
bool CanPassEnemy(RandomizerEnemy enemy, EnemyDistance distance = ED_CLOSE, bool wallOrFloor = true);
bool CanAvoidEnemy(RandomizerEnemy enemy);
bool CanAvoidEnemy(RandomizerEnemy enemy, bool grounded = false, uint8_t quantity = 1);
bool CanGetEnemyDrop(RandomizerEnemy enemy, EnemyDistance distance = ED_CLOSE, bool aboveLink = false);
bool CanBreakMudWalls();
bool CanGetDekuBabaSticks();

View File

@ -808,13 +808,39 @@ typedef enum {
RR_SPIRIT_TEMPLE_INSIDE_STATUE_HEAD,
RR_SPIRIT_TEMPLE_MQ_LOBBY,
RR_SPIRIT_TEMPLE_MQ_CHILD,
RR_SPIRIT_TEMPLE_MQ_ADULT,
RR_SPIRIT_TEMPLE_MQ_SHARED,
RR_SPIRIT_TEMPLE_MQ_LOWER_ADULT,
RR_SPIRIT_TEMPLE_MQ_BOSS_AREA,
RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND,
RR_SPIRIT_TEMPLE_MQ_1F_WEST,
RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_NORTH,
RR_SPIRIT_TEMPLE_MQ_1F_GIBDO_ROOM_SOUTH,
RR_SPIRIT_TEMPLE_MQ_TURNTABLE_ROOM,
RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_NORTH,
RR_SPIRIT_TEMPLE_MQ_MAP_ROOM_SOUTH,
RR_SPIRIT_TEMPLE_MQ_WEST_1F_RUSTED_SWITCH,
RR_SPIRIT_TEMPLE_MQ_UNDER_LIKE_LIKE,
RR_SPIRIT_TEMPLE_MQ_BROKEN_WALL_ROOM,
RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM,
RR_SPIRIT_TEMPLE_MQ_SUN_BLOCK_ROOM,
RR_SPIRIT_TEMPLE_MQ_WEST_IRON_KNUCKLE,
RR_SPIRIT_TEMPLE_MQ_SILVER_GAUNTLETS_HAND,
RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_SOUTH,
RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH,
RR_SPIRIT_TEMPLE_MQ_STATUE_ROOM_EAST,
RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_2F,
RR_SPIRIT_TEMPLE_MQ_THREE_SUNS_ROOM_1F,
RR_SPIRIT_TEMPLE_MQ_1F_EAST,
RR_SPIRIT_TEMPLE_MQ_LEEVER_ROOM,
RR_SPIRIT_TEMPLE_MQ_SYMPHONY_ROOM,
RR_SPIRIT_TEMPLE_MQ_AFTER_SYMPHONY_ROOM,
RR_SPIRIT_TEMPLE_MQ_FOUR_BEAMOS_ROOM,
RR_SPIRIT_TEMPLE_MQ_SOT_SUN_ROOM,
RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND,
RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE,
RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND,
RR_SPIRIT_TEMPLE_MQ_3F_GIBDO_ROOM,
RR_SPIRIT_TEMPLE_MQ_BIG_WALL,
RR_SPIRIT_TEMPLE_MQ_4F_CENTRAL,
RR_SPIRIT_TEMPLE_MQ_NINE_CHAIRS_ROOM,
RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_ROOM,
RR_SPIRIT_TEMPLE_MQ_BIG_MIRROR_CAVE,
RR_SPIRIT_TEMPLE_MQ_INSIDE_STATUE_HEAD,
RR_SPIRIT_TEMPLE_BOSS_ENTRYWAY,
@ -925,7 +951,6 @@ typedef enum {
RR_GANONS_CASTLE_SHADOW_TRIAL,
RR_GANONS_CASTLE_SPIRIT_TRIAL,
RR_GANONS_CASTLE_LIGHT_TRIAL,
RR_GANONS_CASTLE_TOWER,
RR_GANONS_CASTLE_MQ_LOBBY,
RR_GANONS_CASTLE_MQ_MAIN,
@ -954,6 +979,13 @@ typedef enum {
RR_GANONS_CASTLE_MQ_LIGHT_TRIAL_BOULDER_ROOM_BACK,
RR_GANONS_CASTLE_MQ_LIGHT_TRIAL_FINAL_ROOM,
RR_GANONS_TOWER_FLOOR_1,
RR_GANONS_TOWER_FLOOR_2,
RR_GANONS_TOWER_FLOOR_3,
RR_GANONS_TOWER_GANONDORF_LAIR,
RR_GANONS_CASTLE_ESCAPE,
RR_GANONS_CASTLE_GANON_ARENA,
RR_MARKER_AREAS_END, // Used for area key count
// DUNGEONS
@ -4570,7 +4602,13 @@ typedef enum {
RE_STINGER,
RE_BIG_OCTO,
RE_GIBDO,
RE_GANONDORF,
RE_GANON,
RE_DARK_LINK,
RE_ANUBIS,
RE_BEAMOS,
RE_WALLMASTER,
RE_PURPLE_LEEVER,
} RandomizerEnemy;
//RANDOTODO compare child long jumpslash range with adult short
@ -4581,6 +4619,7 @@ typedef enum {
ED_MASTER_SWORD_JUMPSLASH,
//sticks or BGS
ED_LONG_JUMPSLASH,
ED_BOMB_THROW,
ED_BOOMERANG,
ED_HOOKSHOT,
ED_LONGSHOT,

View File

@ -446,7 +446,7 @@ void Settings::CreateOptions() {
mTrickOptions[RT_WATER_BK_REGION] = TrickOption::LogicTrick(RCQUEST_VANILLA, RA_WATER_TEMPLE, {Tricks::Tag::INTERMEDIATE}, false, "Water Temple Boss Key Region with Hover Boots", "With precise Hover Boots movement it is possible to reach the boss key chest's region without needing the Longshot. It is not necessary to take damage from the spikes. The Gold Skulltula Token in the following room can also be obtained with just the Hover Boots.");
mTrickOptions[RT_WATER_NORTH_BASEMENT_LEDGE_JUMP] = TrickOption::LogicTrick(RCQUEST_BOTH, RA_WATER_TEMPLE, {Tricks::Tag::INTERMEDIATE}, false, "Water Temple North Basement Ledge with Precise Jump", "In the northern basement there's a ledge from where, in vanilla Water Temple, boulders roll out into the room. Normally to jump directly to this ledge logically requires the Hover Boots, but with precise jump, it can be done without them. This trick applies to both Vanilla and Master Quest.");
mTrickOptions[RT_WATER_BK_JUMP_DIVE] = TrickOption::LogicTrick(RCQUEST_VANILLA, RA_WATER_TEMPLE, {Tricks::Tag::NOVICE}, false, "Water Temple Boss Key Jump Dive", "Stand on the very edge of the raised corridor leading from the push block room to the rolling boulder corridor. Face the gold skulltula on the waterfall and jump over the boulder corridor floor into the pool of water, swimming right once underwater. This allows access to the boss key room without Iron boots.");
//Also used in MQ logic, but won't be relevent unl;ess a way to enter tower without irons exists (likely a clip + swim)
//Also used in MQ logic, but won't be relevent unless a way to enter tower without irons exists (likely a clip + swim)
mTrickOptions[RT_WATER_FW_CENTRAL_GS] = TrickOption::LogicTrick(RCQUEST_VANILLA, RA_WATER_TEMPLE, {Tricks::Tag::NOVICE}, false, "Water Temple Central Pillar GS with Farore\'s Wind", "If you set Farore's Wind inside the central pillar and then return to that warp point after raising the water to the highest level, you can obtain this Skulltula Token with Hookshot or Boomerang.");
mTrickOptions[RT_WATER_IRONS_CENTRAL_GS] = TrickOption::LogicTrick(RCQUEST_VANILLA, RA_WATER_TEMPLE, {Tricks::Tag::NOVICE}, false, "Water Temple Central Pillar GS with Iron Boots", "After opening the middle water level door into the central pillar, the door will stay unbarred so long as you do not leave the room -- even if you were to raise the water up to the highest level. With the Iron Boots to go through the door after the water has been raised, you can obtain the Skulltula Token with the Hookshot.");
mTrickOptions[RT_WATER_CENTRAL_BOW] = TrickOption::LogicTrick(RCQUEST_VANILLA, RA_WATER_TEMPLE, {Tricks::Tag::ADVANCED}, false, "Water Temple Central Bow Target without Longshot or Hover Boots", "A very precise Bow shot can hit the eye switch from the floor above. Then, you can jump down into the hallway and make through it before the gate closes. It can also be done as child, using the Slingshot instead of the Bow.");

View File

@ -47,7 +47,7 @@ extern void func_80AF36EC(EnRu2* enRu2, PlayState* play);
void EnMa1_EndTeachSong(EnMa1* enMa1, PlayState* play) {
if (Message_GetState(&gPlayState->msgCtx) == TEXT_STATE_CLOSING) {
Flags_SetRandomizerInf(RAND_INF_LEARNED_EPONA_SONG);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
enMa1->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
enMa1->actionFunc = func_80AA0D88;
@ -59,7 +59,7 @@ void EnMa1_EndTeachSong(EnMa1* enMa1, PlayState* play) {
void EnFu_EndTeachSong(EnFu* enFu, PlayState* play) {
if (Message_GetState(&gPlayState->msgCtx) == TEXT_STATE_CLOSING) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
enFu->actionFunc = EnFu_WaitAdult;
enFu->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
@ -434,7 +434,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
player->stateFlags1 |= PLAYER_STATE1_GETTING_ITEM;
if (Animation_OnFrame(&demoIm->skelAnime, 25.0f)) {
Audio_PlaySoundGeneral(NA_SE_IT_DEKU, &demoIm->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_DEKU, &demoIm->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnActorUpdate>(demoImUpdateHook);
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnSceneInit>(demoImKillHook);
demoImUpdateHook = 0;
@ -513,7 +513,7 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO)) {
*should = false;
Flags_SetEnv(gPlayState, 2);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
break;
}

View File

@ -181,7 +181,7 @@ void RegisterOnInterfaceUpdateHook() {
if (gPlayState->state.frames % 7 == 0) {
if (lostHealth >= 16) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
lostHealth -= 16;
}
}

View File

@ -133,7 +133,7 @@ void Emit(Options notification) {
notification.remainingTime = CVarGetFloat(CVAR_SETTING("Notifications.Duration"), 10.0f);
}
notifications.push_back(notification);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} // namespace Notification

View File

@ -1648,7 +1648,7 @@ void func_800ED458(s32 arg0) {
if ((sCurOcarinaBtnVal != 0xFF) && (sPrevOcarinaNoteVal != sCurOcarinaBtnVal)) {
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1);
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sCurOcarinaBtnVal);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &D_80130F24, &D_80130F28, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &D_80130F24, &D_80130F28, &gSfxDefaultReverb);
} else if ((sPrevOcarinaNoteVal != 0xFF) && (sCurOcarinaBtnVal == 0xFF)) {
Audio_StopSfxById(NA_SE_OC_OCARINA);
}
@ -1791,8 +1791,8 @@ void Audio_OcaPlayback(void) {
sStaffPlaybackPos++;
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1);
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sDisplayedNoteValue & 0x3F);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &sNormalizedNotePlaybackTone,
&sNormalizedNotePlaybackVolume, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sNormalizedNotePlaybackTone,
&sNormalizedNotePlaybackVolume, &gSfxDefaultReverb);
} else {
Audio_StopSfxById(NA_SE_OC_OCARINA);
}
@ -3044,7 +3044,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
case 2:
case 3:
Audio_PlaySoundGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
&D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break;
case 4:
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
@ -3443,7 +3443,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG;
Audio_PlaySoundGeneral(sfx, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
@ -3974,7 +3974,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
if (getItem.modIndex == MOD_NONE) {
if (((itemId >= ITEM_RUPEE_GREEN) && (itemId <= ITEM_RUPEE_GOLD)) || (itemId == ITEM_HEART)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_BOXITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_BOXITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
if (itemId == ITEM_HEART_CONTAINER ||
((itemId == ITEM_HEART_PIECE_2) && ((gSaveContext.inventory.questItems & 0xF0000000) == 0x40000000))) {
@ -4046,7 +4046,7 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
D_80131C8C = arg2;
sp24 = func_800F3F84(arg2);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
if ((sfxId & 0xF0) == 0xB0) {
phi_f0 = 0.3f;
@ -4064,22 +4064,22 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
sfxId2 = NA_SE_PL_METALEFFECT_KID;
}
D_8016B7AC = (sp24 * 0.7) + 0.3;
Audio_PlaySoundGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &D_801333E8);
Audio_PlaySoundGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &gSfxDefaultReverb);
}
}
void func_800F4138(Vec3f* pos, u16 sfxId, f32 arg2) {
func_800F3F84(arg2);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
}
void func_800F4190(Vec3f* pos, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &D_801333E0, &D_801305B4);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4);
}
void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
u8 offset = Audio_NextRandom() % randLim;
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F4254(Vec3f* pos, u8 level) {
@ -4088,10 +4088,10 @@ void func_800F4254(Vec3f* pos, u8 level) {
D_801305F4 = D_801305E4[level];
switch (level) {
case 1:
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break;
case 2:
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break;
}
@ -4099,7 +4099,7 @@ void func_800F4254(Vec3f* pos, u8 level) {
}
if (level != 0) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
@ -4111,14 +4111,14 @@ void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2) {
}
if (D_8016B7D8 > 0.5f) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
void func_800F4414(Vec3f* pos, u16 sfxId, f32 arg2) {
D_801305B8--;
if (D_801305B8 == 0) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (arg2 > 2.0f) {
arg2 = 2.0f;
@ -4135,17 +4135,17 @@ void func_800F44EC(s8 arg0, s8 arg1) {
void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2) {
D_8016B7DC = arg2;
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_801333E0, &D_8016B7DC);
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC);
}
void func_800F4578(Vec3f* pos, u16 sfxId, f32 arg2) {
D_8016B7E0 = arg2;
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_8016B7E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb);
}
void func_800F45D0(f32 arg0) {
func_800F4414(&D_801333D4, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, arg0);
func_800F436C(&D_801333D4, 0, (0.15f * arg0) + 1.4f);
func_800F4414(&gSfxDefaultPos, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, arg0);
func_800F436C(&gSfxDefaultPos, 0, (0.15f * arg0) + 1.4f);
}
void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
@ -4156,8 +4156,8 @@ void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
sRiverFreqScaleLerp.remainingFrames = 40;
sRiverFreqScaleLerp.step = (sRiverFreqScaleLerp.target - sRiverFreqScaleLerp.value) / 40;
}
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
@ -4169,7 +4169,7 @@ void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
sWaterfallFreqScaleLerp.step = (sWaterfallFreqScaleLerp.target - sWaterfallFreqScaleLerp.value) / 40;
}
Audio_PlaySoundGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value,
&sWaterfallFreqScaleLerp.value, &D_801333E8);
&sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb);
}
void Audio_StepFreqLerp(FreqLerp* lerp) {
@ -4285,8 +4285,8 @@ void func_800F4A70(void) {
}
void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39], &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39], &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (sAudioIncreasingTranspose < 15) {
sAudioIncreasingTranspose++;
@ -4298,7 +4298,7 @@ void Audio_ResetIncreasingTranspose(void) {
}
void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
@ -4319,7 +4319,7 @@ void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
}
phi_s1++;
}
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F4E30(Vec3f* pos, f32 arg1) {
@ -4880,10 +4880,10 @@ void func_800F6268(f32 dist, u16 arg1) {
void func_800F64E0(u8 arg0) {
D_80130608 = arg0;
if (arg0 != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_QueueCmdS32(0xF1000000, 0);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_QueueCmdS32(0xF2000000, 0);
}
}
@ -4961,7 +4961,7 @@ void Audio_SetBaseFilter(u8 filter) {
if (filter == 0) {
Audio_StopSfxById(NA_SE_PL_IN_BUBBLE);
} else if (sAudioBaseFilter == 0) {
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
sAudioBaseFilter = filter;
@ -4994,7 +4994,7 @@ void Audio_PlaySoundGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32*
}
void Audio_PlaySoundIfNotInCutscene(u16 sfxId) {
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void func_800F6964(u16 arg0) {

View File

@ -81,13 +81,13 @@ u8 gSfxChannelLayout = 0;
u16 D_801333D0 = 0;
Vec3f D_801333D4 = { 0.0f, 0.0f, 0.0f }; // default pos
Vec3f gSfxDefaultPos = { 0.0f, 0.0f, 0.0f }; // default pos
f32 D_801333E0 = 1.0f; // default freqScale
f32 gSfxDefaultFreqAndVolScale = 1.0f; // default freqScale
s32 D_801333E4 = 0; // unused
s8 D_801333E8 = 0; // default reverbAdd
s8 gSfxDefaultReverb = 0; // default reverbAdd
s32 D_801333EC = 0; // unused
@ -381,7 +381,7 @@ void Audio_ChooseActiveSounds(u8 bankId)
} else if (gSoundBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) {
entry = &gSoundBanks[bankId][entryIndex];
if (&D_801333D4.x == entry[0].posX) {
if (&gSfxDefaultPos.x == entry[0].posX) {
entry->dist = 0.0f;
} else {
tempf1 = *entry->posY * 1;

View File

@ -294,7 +294,7 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
if (dbCamera->sub.nPoints < 6) {
if (sDbCamAnim.unk_0A != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDbCamAnim.unk_0A = 0;
}
func_8006376C(0x0D, 0x17, 3, cameraStrings[0]);
@ -308,7 +308,7 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
!func_800BB2B4(&sDbCamAnim.lookAtPos, &sDbCamAnim.roll, &sDbCamAnim.fov, dbCamera->sub.lookAt,
&sDbCamAnim.keyframe, &sDbCamAnim.curFrame) &&
sDbCamAnim.unk_0A == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDbCamAnim.unk_04++;
if (dbCamera->sub.nFrames > 0 && dbCamera->sub.nFrames < sDbCamAnim.unk_04) {
@ -536,7 +536,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->unk_40 = -1;
dbCamera->sub.demoCtrlActionIdx = 0;
sDbCamAnim.unk_0A = 0;
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (dbCamera->unk_38 == -1) {
dbCamera->unk_38 = 1;
} else {
@ -856,22 +856,22 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->unk_1C.z = 0.0f;
dbCamera->unk_1C.y = 1.0f;
} else if (dbCamera->sub.unk_08 == 2) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.unk_08 = 0;
func_800B41DC(dbCamera, dbCamera->sub.unkIdx, cam);
} else {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R) &&
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.nPoints = dbCamera->sub.unkIdx + 1;
func_800B4088(dbCamera, cam);
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R)) {
if (dbCamera->sub.unkIdx == 0x80) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
func_800B42C0(dbCamera, cam);
if (dbCamera->sub.unkIdx == (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
@ -923,7 +923,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
} else {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CRIGHT) &&
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
DbCamera_PrintPoints("Lookat", dbCamera->sub.nPoints, dbCamera->sub.lookAt);
DbCamera_PrintPoints("Position", dbCamera->sub.nPoints, dbCamera->sub.position);
@ -932,13 +932,13 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", dbCamera->sub.mode);
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3;
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CUP) &&
CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx > 0) {
dbCamera->sub.unkIdx--;
} else {
@ -946,8 +946,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
} else {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CUP)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (dbCamera->sub.unkIdx > 0) {
dbCamera->sub.unkIdx--;
} else {
@ -968,7 +968,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CDOWN)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
} else {
@ -976,8 +976,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
} else {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CDOWN)) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
dbCamera->sub.unkIdx++;
} else {
@ -1046,8 +1046,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
case 1:
dbCamera->unk_3C = true;
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (dbCamera->sub.unk_0A == 0) {
dbCamera->sub.unk_0A = 5;
} else {
@ -1055,8 +1055,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (dbCamera->sub.unk_0A == 5) {
dbCamera->sub.unk_0A = 0;
} else {
@ -1064,8 +1064,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
switch (dbCamera->sub.unk_0A) {
case 1:
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L)) {
@ -1114,8 +1114,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_DLEFT)) {
if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
switch (dbCamera->sub.unk_0A) {
@ -1152,8 +1152,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
switch (dbCamera->sub.unk_0A) {
case 1:
@ -1201,8 +1201,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_DRIGHT)) {
if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
switch (dbCamera->sub.unk_0A) {
@ -1353,7 +1353,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
dbCamera->fov = 60.0f;
dbCamera->rollDegrees = dbCamera->roll * 1.40625f;
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3;
dbCamera->unk_38 = -1;
}
@ -1634,7 +1634,7 @@ void DbCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorId) {
void DbCamera_PrintAllCuts(Camera* cam) {
s32 i;
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
@ -1777,8 +1777,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if ((1 << sCurFileIdx) & sMempakFiles) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT) ||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlToggleSwitch ^= 1;
}
cameraStrings[41][9] = sCurFileIdx + 'A';
@ -1791,12 +1791,12 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
if (dbCamera->sub.demoCtrlToggleSwitch == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu++;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = 0;
}
}
@ -1812,7 +1812,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = 0;
return 1;
}
@ -1848,7 +1848,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (dbCamera->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
}
@ -1870,7 +1870,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu -= 9;
}
block_2:
@ -1904,8 +1904,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
sp74[i * 2 + 1] = '\0';
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (sCurFileIdx >= 4) {
sCurFileIdx = 0;
} else {
@ -1921,8 +1921,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (sCurFileIdx <= 0) {
sCurFileIdx = 4;
} else {
@ -1964,25 +1964,25 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
func_8006376C(0x14, 0x1A, 5, cameraStrings[36]);
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlToggleSwitch = 0;
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(dbCamera->sub.demoCtrlActionIdx, MENU_INFO);
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
return 1;
}
@ -1994,8 +1994,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP) ||
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
}
return 2;
@ -2007,13 +2007,13 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
default: {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
sCurFileIdx = 0;
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DDOWN)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
sCurFileIdx = 0;
@ -2052,7 +2052,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (func_800B91B0(cam, dbCamera) == 0) {
Interface_ChangeAlpha(2);
ShrinkWindow_SetVal(0);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
OLib_Vec3fDiffToVecSphGeo(&sp5C, &dbCamera->eye, &dbCamera->at);
DbCamera_CalcUpFromPitchYawRoll(&dbCamera->unk_1C, sp5C.pitch, sp5C.yaw,
@ -2070,7 +2070,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
sDbCamAnim.unk_0A = 1;
sDbCamAnim.unk_0C = 0;
D_8016110C = 0;
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_L)) {
@ -2085,15 +2085,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (sLastFileIdx != -1) {
switch (sp74[sCurFileIdx]) {
case '?':
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
sDbCameraCuts[idx1] = sDbCameraCuts[idx2];
sp74[sCurFileIdx] = '?'; // useless
DbCamera_ResetCut(idx2, false);
break;
case '-':
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
sp64 = sDbCameraCuts[idx2];
if (sLastFileIdx < sCurFileIdx) {
@ -2115,8 +2115,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
break;
default:
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
break;
}
}
@ -2125,7 +2125,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_A)) {
if (sp74[sCurFileIdx] == '?') {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = DbCamera_InitCut(idx1, &dbCamera->sub);
if (sp74[sCurFileIdx] == '?') {
func_8006376C(0xF, 0x18, 7, cameraStrings[26]);
@ -2135,7 +2135,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_B)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = '?';
DbCamera_ResetCut(idx1, true);
}
@ -2143,7 +2143,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_R)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < sDbCameraCuts[idx1].nPoints; i++) {
dbCamera->sub.lookAt[i] = sDbCameraCuts[idx1].lookAt[i];
@ -2165,7 +2165,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DRIGHT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx == 0x1E) {
sCurFileIdx = 0;
} else {
@ -2173,7 +2173,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
}
}
if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_DLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
}
@ -2187,7 +2187,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
DbCamera_PrintAllCuts(cam);
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
if (sDbCameraCuts[i].nPoints != 0) {
osSyncPrintf("\n@@@ /* CUT [%d]\t*/", i);
@ -2203,7 +2203,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
Interface_ChangeAlpha(50);
ShrinkWindow_SetVal(0x20);
D_8016110C = 0;
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
func_8006376C(4, 7, 5, cameraStrings[28]);

View File

@ -624,7 +624,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOSTILE) ? NA_SE_SY_LOCK_ON
: NA_SE_SY_LOCK_ON_HUMAN;
func_80078884(lockOnSfxId);
Sfx_PlaySfxCentered(lockOnSfxId);
}
targetCtx->targetCenterPos.x = actorArg->world.pos.x;
@ -2202,7 +2202,7 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
void Player_PlaySfx(Actor* actor, u16 sfxId) {
if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) {
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale , &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
freqMultiplier = CVarGetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0);
if (freqMultiplier <= 0) {
@ -2210,12 +2210,12 @@ void Player_PlaySfx(Actor* actor, u16 sfxId) {
}
// Authentic behavior uses D_801333E0 for both freqScale and a4
// Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
func_80078914(&actor->projectedPos, sfxId);
Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId);
}
void func_8002F850(PlayState* play, Actor* actor) {
@ -2231,8 +2231,8 @@ void func_8002F850(PlayState* play, Actor* actor) {
sfxId = SurfaceType_GetSfx(&play->colCtx, actor->floorPoly, actor->floorBgId);
}
func_80078914(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
func_80078914(&actor->projectedPos, sfxId + SFX_FLAG);
Sfx_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId + SFX_FLAG);
}
void func_8002F8F0(Actor* actor, u16 sfxId) {
@ -2654,7 +2654,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor = NULL;
if (actorCtx->targetCtx.unk_4B != 0) {
actorCtx->targetCtx.unk_4B = 0;
func_80078884(NA_SE_SY_LOCK_OFF);
Sfx_PlaySfxCentered(NA_SE_SY_LOCK_OFF);
}
}
@ -2755,15 +2755,15 @@ void Actor_Draw(PlayState* play, Actor* actor) {
void func_80030ED8(Actor* actor) {
if (actor->flags & ACTOR_FLAG_SFX_AT_POS) {
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (actor->flags & ACTOR_FLAG_SFX_AT_CENTER) {
func_80078884(actor->sfx);
Sfx_PlaySfxCentered(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_SFX_AT_CENTER2) {
func_800788CC(actor->sfx);
Sfx_PlaySfxCentered2(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_SFX_AS_TIMER) {
func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1));
func_800F4C58(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1));
} else {
func_80078914(&actor->projectedPos, actor->sfx);
Sfx_PlaySfxAtPos(&actor->projectedPos, actor->sfx);
}
}
@ -5737,8 +5737,8 @@ void func_80036E50(u16 textId, s16 arg1) {
Flags_SetInfTable(INFTABLE_0C);
return;
case 0x1033:
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Flags_SetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD);
Flags_SetInfTable(INFTABLE_0E);
return;
@ -6201,7 +6201,7 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
ret = true;
}

View File

@ -6168,7 +6168,7 @@ s32 Camera_Demo5(Camera* camera) {
pad = sDemo5PrevSfxFrame - camera->play->state.frames;
if ((pad >= 0x33) || (pad < -0x32)) {
func_80078884(camera->data1);
Sfx_PlaySfxCentered(camera->data1);
}
sDemo5PrevSfxFrame = camera->play->state.frames;
@ -7362,11 +7362,11 @@ s32 Camera_DbgChangeMode(Camera* camera) {
if (!gDbgCamEnabled && camera->play->activeCamera == MAIN_CAM) {
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
osSyncPrintf("attention sound URGENCY\n");
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_URGENCY);
}
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CDOWN)) {
osSyncPrintf("attention sound NORMAL\n");
func_80078884(NA_SE_SY_ATTENTION_ON);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_ON);
}
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CRIGHT)) {
@ -7783,7 +7783,7 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags) {
if (!((sCameraSettings[camera->setting].unk_00 & 0x3FFFFFFF) & (1 << mode))) {
if (mode == CAM_MODE_FIRSTPERSON) {
osSyncPrintf("camera: error sound\n");
func_80078884(NA_SE_SY_ERROR);
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
}
if (camera->mode != CAM_MODE_NORMAL) {
@ -7871,20 +7871,20 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 flags) {
if (camera->status == CAM_STAT_ACTIVE) {
switch (modeChangeFlags) {
case 1:
func_80078884(0);
Sfx_PlaySfxCentered(0);
break;
case 2:
if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) {
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_URGENCY);
} else {
func_80078884(NA_SE_SY_ATTENTION_ON);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_ON);
}
break;
case 4:
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_URGENCY);
break;
case 8:
func_80078884(NA_SE_SY_ATTENTION_ON);
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_ON);
break;
}
}

View File

@ -1607,10 +1607,10 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
} else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
@ -1622,18 +1622,18 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
} else if (flags == TOUCH_SFX_HARD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
} else if (flags == TOUCH_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -1644,17 +1644,17 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
return 1;
@ -1691,7 +1691,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
if (at->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
}
@ -1704,10 +1704,10 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (ac->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
}
@ -3460,7 +3460,7 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
/**
@ -3468,7 +3468,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
/**
@ -3508,7 +3508,7 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
initWood.lightPoint.z = initWood.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &initWood);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
/**

View File

@ -285,7 +285,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
play->roomCtx.unk_74[0] += 0x14;
}
if (csCtx->frames == 0x30F) {
func_80078884(NA_SE_EV_DEKU_DEATH);
Sfx_PlaySfxCentered(NA_SE_EV_DEKU_DEATH);
} else if (csCtx->frames == 0x2CD) {
play->roomCtx.unk_74[0] = 0;
}
@ -299,7 +299,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
break;
case 13:
if (play->roomCtx.unk_74[1] == 0) {
func_80078884(NA_SE_EV_TRIFORCE_FLASH);
Sfx_PlaySfxCentered(NA_SE_EV_TRIFORCE_FLASH);
}
if (play->roomCtx.unk_74[1] < 0xFF) {
play->roomCtx.unk_74[1] += 5;
@ -412,7 +412,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
if (sp3F != 0) {
play->envCtx.sandstormState = SANDSTORM_FILL;
}
func_800788CC(NA_SE_EV_SAND_STORM - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_SAND_STORM - SFX_FLAG);
break;
case 33:
gSaveContext.sunsSongState = SUNSSONG_START;
@ -514,7 +514,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
temp = 1;
}
@ -1328,15 +1328,15 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
if (cmd->base == 1) {
play->envCtx.screenFillColor[3] = 255.0f * temp;
if ((temp == 0.0f) && (gSaveContext.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0)) {
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if ((temp == 0.0f) &&
((gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_ENTRANCE) || (gSaveContext.entranceIndex == ENTR_CASTLE_GROUNDS_SOUTH_EXIT) ||
(gSaveContext.entranceIndex == ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_FARORES_ZF))) {
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if ((temp == 0.0f) && (play->sceneNum == SCENE_INSIDE_GANONS_CASTLE)) {
func_800788CC(NA_SE_EV_WHITE_OUT);
Sfx_PlaySfxCentered2(NA_SE_EV_WHITE_OUT);
}
} else {
play->envCtx.screenFillColor[3] = (1.0f - temp) * 255.0f;

View File

@ -974,7 +974,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, play)) {
Flags_SetCollectible(play, this->collectibleFlag);
@ -982,7 +982,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
return;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Flags_SetCollectible(play, this->collectibleFlag);

View File

@ -84,7 +84,7 @@ void TransitionCircle_Start(void* thisx) {
} else {
this->texY = 0x1F4;
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
@ -109,7 +109,7 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
if (this->direction != 0) {
if (this->texY == 0) {
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
this->texY += this->speed * 3 / updateRate;

View File

@ -914,10 +914,10 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
osSyncPrintf("\nnext_zelda_time=[%x]", ((void)0, gSaveContext.nextDayTime));
if (((void)0, gSaveContext.nextDayTime) == 0xFF0E) {
func_80078884(NA_SE_EV_CHICKEN_CRY_M);
Sfx_PlaySfxCentered(NA_SE_EV_CHICKEN_CRY_M);
gSaveContext.nextDayTime = 0xFFFF;
} else if (((void)0, gSaveContext.nextDayTime) == 0xFF0D) {
func_800788CC(NA_SE_EV_DOG_CRY_EVENING);
Sfx_PlaySfxCentered2(NA_SE_EV_DOG_CRY_EVENING);
gSaveContext.nextDayTime = 0xFFFF;
}
}
@ -2076,7 +2076,7 @@ void func_80075B44(PlayState* play) {
break;
case 2:
if (gSaveContext.dayTime > 0xC000) {
func_800788CC(NA_SE_EV_DOG_CRY_EVENING);
Sfx_PlaySfxCentered2(NA_SE_EV_DOG_CRY_EVENING);
play->envCtx.unk_E0++;
}
break;
@ -2105,7 +2105,7 @@ void func_80075B44(PlayState* play) {
gSaveContext.totalDays++;
gSaveContext.bgsDayCount++;
gSaveContext.dogIsLost = true;
func_80078884(NA_SE_EV_CHICKEN_CRY_M);
Sfx_PlaySfxCentered(NA_SE_EV_CHICKEN_CRY_M);
if ((Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) ||
Inventory_HatchPocketCucco(play)) &&
play->csCtx.state == 0 && !Player_InCsMode(play)) {

View File

@ -572,14 +572,17 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
dst->a = src->a;
}
void func_80078884(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
void Sfx_PlaySfxCentered(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_800788CC(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
void Sfx_PlaySfxCentered2(u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void func_80078914(Vec3f* arg0, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, arg0, 4, &D_801333E0, &D_801333E0, &D_801333E8);
void Sfx_PlaySfxAtPos(Vec3f* arg0, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}

View File

@ -648,7 +648,7 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
interfaceCtx->unk_22C = 0;
if (CVarGetInteger(CVAR_ENHANCEMENT("LowHpAlarm"), 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
func_80078884(NA_SE_SY_HITPOINT_ALARM);
Sfx_PlaySfxCentered(NA_SE_SY_HITPOINT_ALARM);
}
}
} else {

View File

@ -810,10 +810,10 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) && enableMapToggle) {
osSyncPrintf("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
// clang-format on
R_MINIMAP_DISABLED ^= 1;
}
@ -965,10 +965,10 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play) && enableMapToggle) {
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
// clang-format on
R_MINIMAP_DISABLED ^= 1;
}

View File

@ -154,7 +154,7 @@ u8 Message_ShouldAdvance(PlayState* play) {
: CHECK_BTN_ALL(input->press.button, BTN_B);
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
}
@ -179,7 +179,7 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
@ -195,7 +195,7 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
if (msgCtx->choiceIndex > 128) {
msgCtx->choiceIndex = 0;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if ((input->rel.stick_y <= -30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
sAnalogStickHeld = true;
@ -203,7 +203,7 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
if (msgCtx->choiceIndex > numChoices) {
msgCtx->choiceIndex = numChoices;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (ABS(input->rel.stick_y) < 30) {
sAnalogStickHeld = false;
@ -724,7 +724,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
MessageContext* msgCtx = &play->msgCtx;
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
// clang-format on
gDPPipeSync(gfx++);
@ -882,7 +882,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) {
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
} else {
@ -899,7 +899,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
}
@ -970,8 +970,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
// "Sound (SE)"
osSyncPrintf("サウンド(SE)\n");
sfxHi = msgCtx->msgBufDecoded[i + 1] << 8;
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
i += 2;
break;
@ -980,7 +980,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
break;
case MESSAGE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
// clang-format on
gDPPipeSync(gfx++);
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
@ -1062,8 +1062,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == 0) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@ -1094,7 +1094,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
return;
case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
@ -1105,14 +1105,14 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
*gfxP = gfx;
return;
default:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
charTexIdx += FONT_CHAR_TEX_SIZE;
@ -1812,7 +1812,7 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
osSyncPrintf("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
msgCtx->ocarinaAction = ocarinaActionId;
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_PLAYBACK) {
Message_OpenText(play, 0x86F); // Ocarina
@ -2259,8 +2259,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW) {
Audio_OcaSetInstrument(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
} else {
// "Ocarina_Flog Correct Example Performance"
@ -2269,15 +2269,15 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Interface_ChangeAlpha(1);
}
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW) {
Audio_OcaSetInstrument(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else {
@ -2287,8 +2287,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Interface_ChangeAlpha(1);
}
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
@ -2298,23 +2298,23 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
Interface_ChangeAlpha(1);
} else {
Audio_OcaSetInstrument(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
}
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
Audio_OcaSetInstrument(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else if (isB_Held) {
@ -2641,11 +2641,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
osSyncPrintf("z_message.c 取得メロディ=%d\n", ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
osSyncPrintf(VT_RST);
msgCtx->stateTimer = 20;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
}
@ -2696,8 +2696,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff->state);
gSaveContext.scarecrowLongSongSet = true;
}
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
osSyncPrintf("aaaaaaaaaaaaaa\n");
Audio_OcaSetRecordingState(0);
msgCtx->stateTimer = 10;
@ -2766,8 +2766,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer = 20;
gSaveContext.scarecrowSpawnSongSet = true;
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_DONE;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("\n====================================================================\n");
memcpy(gSaveContext.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
@ -2781,8 +2781,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
// "Played an existing song"
osSyncPrintf("すでに存在する曲吹いた!!! \n");
Audio_OcaSetRecordingState(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Message_CloseTextbox(play);
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_FAILED;
}
@ -2807,8 +2807,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) {
sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx;
@ -2818,11 +2818,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->stateTimer == 0) {
if (msgCtx->ocarinaStaff->state == 0) {
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
msgCtx->msgMode++;
}
@ -2840,8 +2840,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
}
break;
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) {
sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx;
@ -2852,14 +2852,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
// "Musical round failed"
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
Audio_OcaSetInstrument(0);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10;
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else if (msgCtx->ocarinaStaff->state == 0xD) {
// "Musical round succeeded"
osSyncPrintf("輪唱成功!!!!!!!!!\n");
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
msgCtx->stateTimer = 30;
}
@ -2875,8 +2875,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
if (Audio_OcaMemoryGameGenNote() != 1) {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
Message_ResetOcarinaNoteState();
@ -3337,11 +3337,11 @@ void Message_Update(PlayState* play) {
} else if (Message_ShouldAdvanceSilent(play)) {
osSyncPrintf("select=%d\n", msgCtx->textboxEndType);
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Message_ContinueTextbox(play, sNextTextId);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_CloseTextbox(play);
}
}

View File

@ -471,7 +471,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
Player_SetCsActionWithHaltedActors(play, &player->actor, 5);
OnePointCutscene_SetCsCamPoints(csCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_8012021C[D_801202FC - 2].pos);
D_8012013C[D_801202FC - 3].pos.x +=

View File

@ -2827,12 +2827,12 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
(play->csCtx.state == CS_STATE_IDLE)) {
if (!CVarGetInteger(CVAR_ENHANCEMENT("DisableNaviCallAudio"), 0)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
// clang-format on
if (naviCallState == 0x1D) {
func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32);
func_800F4524(&gSfxDefaultPos, NA_SE_VO_NA_HELLO_2, 32);
}
}
@ -2896,8 +2896,8 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) {
}
// clang-format off
if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((gSaveContext.isDoubleDefenseAcquired != 0) && (healthChange < 0)) {
healthChange >>= 1;
osSyncPrintf("ハート減少半分!!=%d\n", healthChange); // "Heart decrease halved!!%d"
@ -3077,7 +3077,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
if ((type != 5) && (gSaveContext.magic - amount) < 0) {
if (gSaveContext.magicCapacity != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
return false;
}
@ -3093,7 +3093,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return 1;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
case MAGIC_CONSUME_WAIT_NO_PREVIEW:
@ -3105,7 +3105,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
return true;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
case MAGIC_CONSUME_LENS:
@ -3133,7 +3133,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
return true;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false;
}
case MAGIC_ADD:
@ -3217,8 +3217,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
gSaveContext.magic += 4;
if (gSaveContext.gameMode == 0 && gSaveContext.sceneSetupIndex < 4) {
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
// "Storage MAGIC_NOW=%d (%d)"
@ -3319,8 +3319,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
!hasLens ||
!play->actorCtx.lensActive) {
play->actorCtx.lensActive = false;
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
gSaveContext.magicState = MAGIC_STATE_IDLE;
if (CVarGetInteger(CVAR_COSMETIC("Consumable.MagicBorder.Changed"), 0)) {
sMagicBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.MagicBorder.Value"), sMagicBorder_ori);
@ -3375,7 +3375,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
case MAGIC_STATE_ADD:
gSaveContext.magic += 4;
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (gSaveContext.magic >= gSaveContext.magicTarget) {
gSaveContext.magic = gSaveContext.magicTarget;
gSaveContext.magicState = gSaveContext.prevMagicState;
@ -5796,17 +5796,17 @@ void Interface_Draw(PlayState* play) {
D_80125A5C = 0;
} else if (gSaveContext.timer1Value > 60) {
if (timerDigits[4] == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (gSaveContext.timer1Value >= 11) {
if (timerDigits[4] & 1) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -5853,8 +5853,8 @@ void Interface_Draw(PlayState* play) {
D_8015FFE2 = 40;
gSaveContext.timer1State = 15;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -5971,17 +5971,17 @@ void Interface_Draw(PlayState* play) {
}
} else if (gSaveContext.timer2Value > 60) {
if (timerDigits[4] == 1) {
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (gSaveContext.timer2Value > 10) {
if ((timerDigits[4] & 1)) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
gSaveContext.timer2Value++;
@ -5995,8 +5995,8 @@ void Interface_Draw(PlayState* play) {
}
if ((gSaveContext.timer2Value % 60) == 0) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
}
@ -6361,7 +6361,7 @@ void Interface_Update(PlayState* play) {
gSaveContext.health += 4;
if ((gSaveContext.health & 0xF) < 4) {
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
osSyncPrintf("now_life=%d max_life=%d\n", gSaveContext.health, gSaveContext.healthCapacity);
@ -6398,7 +6398,7 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
gSaveContext.rupeeAccumulator--;
gSaveContext.rupees++;
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
// "Rupee Amount MAX = %d"
osSyncPrintf("ルピー数MAX = %d\n", CUR_CAPACITY(UPG_WALLET));
@ -6414,11 +6414,11 @@ void Interface_Update(PlayState* play) {
gSaveContext.rupees = 0;
}
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
gSaveContext.rupeeAccumulator++;
gSaveContext.rupees--;
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else {
gSaveContext.rupeeAccumulator = 0;

View File

@ -63,8 +63,8 @@ void Play_SetViewpoint(PlayState* play, s16 viewpoint) {
play->unk_1242B = viewpoint;
if ((YREG(15) != 0x10) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
Audio_PlaySoundGeneral((viewpoint == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral((viewpoint == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Play_RequestViewpointBgCam(play);
@ -1036,8 +1036,8 @@ void Play_Update(PlayState* play) {
break;
case TRANS_MODE_SANDSTORM:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (play->transitionTrigger == TRANS_TRIGGER_END) {
if (play->envCtx.sandstormPrimA < 110) {
@ -1074,8 +1074,8 @@ void Play_Update(PlayState* play) {
break;
case TRANS_MODE_SANDSTORM_END:
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (play->transitionTrigger == TRANS_TRIGGER_END) {
if (play->envCtx.sandstormPrimA <= 0) {
@ -1222,8 +1222,8 @@ void Play_Update(PlayState* play) {
// "Changing viewpoint is prohibited during the cutscene"
osSyncPrintf(VT_FGCOL(CYAN) "デモ中につき視点変更を禁止しております\n" VT_RST);
} else if (YREG(15) == 0x10) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
// C-Up toggle for houses, move between pivot camera and fixed camera
// Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT

View File

@ -58,5 +58,5 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
source->countdown = duration;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}

View File

@ -181,8 +181,8 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
this->timer = 0;
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (DECR(this->timer) == 0) {
grabbed = this->grabbed;
if (grabbed != NULL) {
@ -278,12 +278,12 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
func_80865044(this);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
} else if (CHECK_BTN_ANY(play->state.input[0].press.button, (buttonsToCheck))) {
this->timer = 0;

View File

@ -234,7 +234,7 @@ void func_8086EE40(BgBombwall* this, PlayState* play) {
func_8086EE94(this, play);
if (((this->dyna.actor.params >> 0xF) & 1) != 0) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
}
}

View File

@ -307,11 +307,11 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
gSaveContext.cutsceneTrigger = 1;
Player_SetCsActionWithHaltedActors(play, NULL, 0x31);
}
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (this->dyna.actor.params < 0) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Actor_Kill(&this->dyna.actor);

View File

@ -173,8 +173,8 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, PlayState* play) {
func_8003555C(play, &pos1, &sBgDdanKdVelocity, &sBgDdanKdAccel);
}
Camera_AddQuake(&play->mainCamera, 0, effectStrength * 0.6f, 3);
Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View File

@ -160,16 +160,16 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
((play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) {
Flags_SetSwitch(play, this->dyna.actor.params & 0x3F);
this->state = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgDodoago_SetupAction(this, BgDodoago_OpenJaw);
OnePointCutscene_Init(play, 3380, 160, &this->dyna.actor, MAIN_CAM);
} else if (play->roomCtx.unk_74[this->state] == 0) {
OnePointCutscene_Init(play, 3065, 40, &this->dyna.actor, MAIN_CAM);
BgDodoago_SetupAction(this, BgDodoago_LightOneEye);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
OnePointCutscene_Init(play, 3065, 20, &this->dyna.actor, MAIN_CAM);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sBgDodoagoTimer += 30;
return;
}
@ -247,11 +247,11 @@ void BgDodoago_OpenJaw(BgDodoago* this, PlayState* play) {
if (Math_SmoothStepToS(&this->dyna.actor.shape.rot.x, 0x1333, 110 - this->state, 0x3E8, 0x32) == 0) {
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View File

@ -221,11 +221,11 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, PlayState* play) {
}
} else {
if (this->dropTimer == 1) {
Audio_PlaySoundGeneral(NA_SE_EV_STONEDOOR_STOP, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_STONEDOOR_STOP, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
Math_ApproachF(&this->dyna.actor.world.pos.y, -1000.0f, 1.0f, this->dyna.actor.speedXZ);
Math_ApproachF(&this->dyna.actor.speedXZ, 100.0f, 1.0f, 0.1f);

View File

@ -123,7 +123,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else {
this->actionFlags |= 4;
this->timer1 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
@ -138,7 +138,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else {
this->actionFlags |= 8;
this->timer2 = 304;
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View File

@ -163,7 +163,7 @@ void func_8087B284(BgGndSoulmeiro* this, PlayState* play) {
if (!Flags_GetSwitch(play, (this->actor.params >> 8) & 0x3F)) {
this->actor.draw = BgGndSoulmeiro_Draw;
if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->unk_198 = 40;
this->actionFunc = func_8087AF38;
} else {

View File

@ -115,7 +115,7 @@ void func_8087B938(BgHaka* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
if (this->dyna.actor.params == 1) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
} else if (!IS_DAY && play->sceneNum == SCENE_GRAVEYARD) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x,
this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0,
@ -124,7 +124,7 @@ void func_8087B938(BgHaka* this, PlayState* play) {
// un tss un tss
if (play->sceneNum == SCENE_GRAVEYARD && allPulled) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
func_800F5ACC(NA_BGM_STAFF_2);
Actor* actor2 = play->actorCtx.actorLists[ACTORCAT_BG].head;

View File

@ -242,7 +242,7 @@ void BgHakaGate_FloorClosed(BgHakaGate* this, PlayState* play) {
sBgPoEventPuzzleState = SKULL_OF_TRUTH_FOUND;
this->actionFunc = BgHakaGate_DoNothing;
} else {
func_80078884(NA_SE_SY_ERROR);
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GROUND_GATE_OPEN);
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
this->vTimer = 60;

View File

@ -230,6 +230,6 @@ void BgHakaShip_Draw(Actor* thisx, PlayState* play) {
sp2C.z = this->dyna.actor.world.pos.z;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->bellSoundPos);
func_80078914(&this->bellSoundPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->bellSoundPos, NA_SE_EV_SHIP_BELL - SFX_FLAG);
}
}

View File

@ -546,7 +546,7 @@ void BgHakaTrap_Draw(Actor* thisx, PlayState* play) {
sp2C.y = this->dyna.actor.world.pos.y + 110.0f;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &sp2C, &this->unk_16C);
func_80078914(&this->unk_16C, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->unk_16C, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG);
}
}

View File

@ -163,7 +163,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
if (sPotsDestroyed == 3) {
// All 3 pots destroyed
collectibleParams = -1;
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
// Drop rupees
for (i = 0; i < 9; i++) {
collectible = Item_DropCollectible(play, &spawnPos, i % 3);
@ -178,7 +178,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_FIREFLY, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y + 80.0f, this->dyna.actor.world.pos.z, 0,
this->dyna.actor.shape.rot.y, 0, 2, true);
func_80078884(NA_SE_SY_ERROR);
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
} else {
// Random rewards
if (CVarGetInteger(CVAR_ENHANCEMENT("NoRandomDrops"), 0)) {
@ -192,7 +192,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
} else {
collectibleParams = ITEM00_ARROWS_SMALL;
}
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
}
} else if (Flags_GetCollectible(play, this->dyna.actor.params) != 0) {
// If small key already collected, drop recovery heart instead
@ -202,11 +202,11 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, PlayState* play) {
else {
collectibleParams = ITEM00_HEART;
}
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
} else {
// Drops a small key and sets a collect flag
collectibleParams = ((this->dyna.actor.params & 0x3F) << 8) | ITEM00_SMALL_KEY;
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
if (collectibleParams != -1) {
collectible = Item_DropCollectible(play, &spawnPos, collectibleParams);

View File

@ -376,7 +376,7 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
func_808884C8(this, play);
if ((this->dyna.actor.params & 0xFF) == 5) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
osSyncPrintf("B(%d)\n", this->dyna.actor.params);

View File

@ -313,7 +313,7 @@ void BgHidanKowarerukabe_Update(Actor* thisx, PlayState* play) {
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
}
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
return;
}

View File

@ -396,7 +396,7 @@ void BgHidanRock_Draw(Actor* thisx, PlayState* play) {
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &this->dyna.actor.home.pos, &this->unk_170);
}
func_80078914(&this->unk_170, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->unk_170, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);
func_8088BC40(play, this);
}
}

View File

@ -428,7 +428,7 @@ void func_808911D4(BgIceShelter* this, PlayState* play) {
}
if (type == 4) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
Actor_Kill(&this->dyna.actor);

View File

@ -275,7 +275,7 @@ void BgJyaMegami_Explode(BgJyaMegami* this, PlayState* play) {
func_80033480(play, &sp8C, 100.0f, 1, 150, 100, 1);
}
if (this->explosionTimer == 60) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
if (this->explosionTimer >= 100) {
Actor_Kill(&this->dyna.actor);

View File

@ -110,7 +110,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
this->framesUntilDisable = 416;
if (D_8089C1A0 == 4) {
Flags_SetSwitch(play, this->actor.params);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
}
if (this->framesUntilDisable == -1) {

View File

@ -475,7 +475,7 @@ void BgMizuBwall_Idle(BgMizuBwall* this, PlayState* play) {
this->dList = NULL;
BgMizuBwall_SpawnDebris(this, play);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actionFunc = BgMizuBwall_Break;
} else if (this->dyna.actor.xzDistToPlayer < 600.0f) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View File

@ -218,7 +218,7 @@ void func_808A3E54(BgMoriHineri* this, PlayState* play) {
this->moriHineriObjIdx = objBankIndex;
this->dyna.actor.params ^= 1;
sBgMoriHineriNextCamIdx = MAIN_CAM;
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
} else {
this->dyna.actor.draw = NULL;
this->actionFunc = func_808A3D58;

View File

@ -134,9 +134,9 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, PlayState* play) {
BgMoriIdomizu_SetWaterLevel(play, thisx->world.pos.y);
if (this->drainTimer > 0) {
if (switchFlagSet) {
func_800788CC(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
}
}
}

View File

@ -137,11 +137,11 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) {
thisx->home.rot.y -= 0x2000;
}
thisx->world.rot.y = thisx->shape.rot.y = thisx->home.rot.y;
func_800788CC(NA_SE_EV_STONEDOOR_STOP);
Sfx_PlaySfxCentered2(NA_SE_EV_STONEDOOR_STOP);
} else {
rotY = this->rotYdeg * (0x10000 / 360.0f);
thisx->world.rot.y = thisx->shape.rot.y = thisx->home.rot.y + rotY;
func_800788CC(NA_SE_EV_WALL_SLIDE - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_WALL_SLIDE - SFX_FLAG);
}
if (fabsf(this->dyna.unk_150) > 0.001f) {
this->dyna.unk_150 = 0.0f;

View File

@ -133,7 +133,7 @@ void BgMoriRakkatenjo_Wait(BgMoriRakkatenjo* this, PlayState* play) {
}
}
if (this->timer < 20) {
func_800788CC(NA_SE_EV_BLOCKSINK - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_BLOCKSINK - SFX_FLAG);
}
}
@ -156,7 +156,7 @@ void BgMoriRakkatenjo_Fall(BgMoriRakkatenjo* this, PlayState* play) {
} else {
if (this->bounceCount == 0) {
this->fallCount++;
func_800788CC(NA_SE_EV_STONE_BOUND);
Sfx_PlaySfxCentered2(NA_SE_EV_STONE_BOUND);
func_800AA000(SQ(thisx->yDistToPlayer), 0xFF, 0x14, 0x96);
}
thisx->world.pos.y =

View File

@ -343,7 +343,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) {
if (amy != NULL) {
OnePointCutscene_Init(play, 3170, 30, amy, MAIN_CAM);
}
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
gSaveContext.timer1State = 0xA;
}
} else {
@ -538,7 +538,7 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, PlayState* play) {
thisx->world.pos.y - 40.0f, thisx->world.pos.z, 0, thisx->shape.rot.y, 0,
thisx->params + ((this->type - 1) << 8), true);
OnePointCutscene_Init(play, 3160, 80, thisx, MAIN_CAM);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
} else {
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2);

View File

@ -150,7 +150,7 @@ void func_808A9234(BgRelayObjects* this, PlayState* play) {
func_800AA000(this->dyna.actor.xyzDistToPlayerSq, 180, 20, 100);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
if (this->unk_169 != play->roomCtx.curRoom.num) {
func_800788CC(NA_SE_EN_PO_LAUGH);
Sfx_PlaySfxCentered2(NA_SE_EN_PO_LAUGH);
this->timer = 5;
this->actionFunc = func_808A932C;
return;
@ -173,7 +173,7 @@ void func_808A932C(BgRelayObjects* this, PlayState* play) {
}
if (this->timer == 0) {
if (!Player_InCsMode(play)) {
func_80078884(NA_SE_OC_ABYSS);
Sfx_PlaySfxCentered(NA_SE_OC_ABYSS);
Play_TriggerRespawn(play);
this->actionFunc = BgRelayObjects_DoNothing;
}

View File

@ -50,7 +50,7 @@ const ActorInit Bg_Spot01_Idohashira_InitVars = {
};
void BgSpot01Idohashira_PlayBreakSfx1(BgSpot01Idohashira* this) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_BOX_BREAK);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_BOX_BREAK);
}
void BgSpot01Idohashira_PlayBreakSfx2(BgSpot01Idohashira* this, PlayState* play) {

View File

@ -55,8 +55,8 @@ void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
}
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
if (this->waterHeight < this->actor.world.pos.y) {
Audio_PlaySoundGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
Math_ApproachF(&this->actor.world.pos.y, this->waterHeight, 1.0f, 2.0f);
}

View File

@ -214,7 +214,7 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
}
if (play->csCtx.frames == 245 || play->csCtx.frames == 351) {
func_800788CC(NA_SE_EV_LIGHTNING);
Sfx_PlaySfxCentered2(NA_SE_EV_LIGHTNING);
}
}

View File

@ -343,7 +343,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, PlayState* play) {
EffectSsGSplash_Spawn(play, &this->dyna.actor.world.pos, NULL, NULL, 1, 700);
this->collider.elements->dim.worldSphere.radius = 45;
this->actionFunc = BgSpot06Objects_LockPullOutward;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Flags_SetSwitch(play, this->switchFlag);
OnePointCutscene_Init(play, 4120, 170, &this->dyna.actor, MAIN_CAM);
} else {

View File

@ -187,7 +187,7 @@ void BgSpot08Bakudankabe_Update(Actor* thisx, PlayState* play) {
func_808B0324(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
} else if (this->dyna.actor.xzDistToPlayer < 800.0f) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View File

@ -139,7 +139,7 @@ void BgSpot11Bakudankabe_Update(Actor* thisx, PlayState* play) {
func_808B2218(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
return;
}

View File

@ -110,7 +110,7 @@ void func_808B29F0(BgSpot11Oasis* this, PlayState* play) {
func_808B2AA8(this);
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, this->actor.world.pos.x,
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, FAIRY_SPAWNER, true);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
func_808B27F0(play, this->actor.world.pos.y);
}

View File

@ -286,7 +286,7 @@ void func_808B4194(BgSpot15Rrbox* this, PlayState* play) {
Audio_PlayActorSound2(actor, NA_SE_EV_WOOD_BOUND);
}
if (func_808B3A40(this, play)) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
actor->home.pos.x = actor->world.pos.x;
actor->home.pos.z = actor->world.pos.z;

View File

@ -472,7 +472,7 @@ void func_808B5A94(BgSpot16Bombstone* this, PlayState* play) {
func_808B5240(this, play);
if (this->unk_154 == 56) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
if (this->unk_154 > 60) {

View File

@ -118,7 +118,7 @@ void BgSpot17Bakudankabe_Update(Actor* thisx, PlayState* play) {
func_808B6BC0(this, play);
Flags_SetSwitch(play, (this->dyna.actor.params & 0x3F));
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Actor_Kill(&this->dyna.actor);
}
}

View File

@ -418,9 +418,9 @@ void func_808B81A0(BgSpot18Basket* this, PlayState* play) {
}
} else if (this->unk_216 == 2) {
if (this->unk_218 == 2) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
} else {
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
}
} else if (this->unk_216 == 200) {
func_808B7BB0(this);

View File

@ -258,7 +258,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
this->dyna.unk_150 = 0.0f;
player->stateFlags2 &= ~PLAYER_STATE2_MOVING_DYNAPOLY;
Flags_SetSwitch(play, (this->dyna.actor.params >> 8) & 0x3F);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);

View File

@ -100,7 +100,7 @@ void func_808BC65C(BgTreemouth* this, PlayState* play) {
if (npcAction->action == 2) {
BgTreemouth_SetupAction(this, func_808BC80C);
} else if (npcAction->action == 3) {
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgTreemouth_SetupAction(this, func_808BC6F8);
}
}
@ -206,7 +206,7 @@ void func_808BCAF0(BgTreemouth* this, PlayState* play) {
if (npcAction->action == 2) {
BgTreemouth_SetupAction(this, func_808BC80C);
} else if (npcAction->action == 3) {
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_WOODDOOR_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgTreemouth_SetupAction(this, func_808BC6F8);
}
}

View File

@ -84,8 +84,8 @@ void BgVbSima_Update(Actor* thisx, PlayState* play) {
this->dyna.actor.world.pos.z += 2.0f * Math_CosS(this->shakeTimer * 0x8000);
this->dyna.actor.shape.rot.x = (s16)Math_SinS(this->shakeTimer * 0x7000) * 0x37;
this->dyna.actor.shape.rot.z = (s16)Math_SinS(this->shakeTimer * 0x5000) * 0x37;
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (signal == VBSIMA_KILL) {
Actor_Kill(&this->dyna.actor);
}

View File

@ -149,7 +149,7 @@ void func_808BF078(BgYdanMaruta* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->unk_16A = 20;
Flags_SetSwitch(play, this->switchFlag);
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_808BF108;
OnePointCutscene_Init(play, 3010, 50, &this->dyna.actor, MAIN_CAM);
} else {

View File

@ -172,7 +172,7 @@ void BgYdanSp_UpdateFloorWebCollision(BgYdanSp* this) {
void BgYdanSp_BurnWeb(BgYdanSp* this, PlayState* play) {
this->timer = 30;
this = this;
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Flags_SetSwitch(play, this->isDestroyedSwitchFlag);
if (this->dyna.actor.params == WEB_FLOOR) {
this->actionFunc = BgYdanSp_BurnFloorWeb;
@ -255,7 +255,7 @@ void BgYdanSp_FloorWebBreaking(BgYdanSp* this, PlayState* play) {
if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 190.0f) {
func_8003EBF8(play, &play->colCtx.dyna, this->dyna.bgId);
this->timer = 40;
func_80078884(NA_SE_SY_CORRECT_CHIME);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Flags_SetSwitch(play, this->isDestroyedSwitchFlag);
this->actionFunc = BgYdanSp_FloorWebBroken;
pos.y = this->dyna.actor.world.pos.y - 60.0f;

View File

@ -55,8 +55,8 @@ void BgZg_Destroy(Actor* thisx, PlayState* play) {
}
void func_808C0C50(BgZg* this) {
Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
s32 func_808C0C98(BgZg* this, PlayState* play) {

View File

@ -844,7 +844,7 @@ void BossDodongo_Walk(BossDodongo* this, PlayState* play) {
}
if (this->unk_1BC != 0) {
func_80078884(NA_SE_EN_DODO_K_WALK);
Sfx_PlaySfxCentered(NA_SE_EN_DODO_K_WALK);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_WALK);
}

View File

@ -397,8 +397,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->fogMode = 1;
}
if (this->timers[0] < 50) {
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
}
@ -418,8 +418,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
case BFD_CS_LOOK_GROUND:
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->timers[0] == 0) {
this->introState = BFD_CS_COLLAPSE;
this->camData.nextEye.x = player2->actor.world.pos.x + 100.0f + 300.0f;
@ -439,8 +439,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->camData.accel = 0.005f;
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
Math_ApproachF(&this->camData.shake, 2.0f, 1.0f, 0.8 * 0.01f);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->timers[0] == 100) {
this->platformSignal = VBSIMA_COLLAPSE;
}
@ -476,8 +476,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
osSyncPrintf("WAY_SPD Y = %f\n", this->camData.atVel.y);
osSyncPrintf("WAY_SPD Z = %f\n", this->camData.atVel.z);
if ((this->timers[3] > 190) && !Flags_GetEventChkInf(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
if (this->timers[3] == 190) {
this->camData.atMaxVel.x = this->camData.atMaxVel.y = this->camData.atMaxVel.z = 0.05f;
@ -683,8 +683,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
if (this->actor.bgCheckFlags & 0x10) {
this->fwork[BFD_CEILING_BOUNCE] = -18384.0f;
this->timers[1] = 10;
Audio_PlaySoundGeneral(NA_SE_EV_EXPLOSION, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_EXPLOSION, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
func_80033E1C(play, 3, 0xA, 0x7530);
this->work[BFD_ROCK_TIMER] = 300;
}
@ -783,8 +783,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
sp150 = 1;
if (this->work[BFD_MOVE_TIMER] & 0x1C) {
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_BURN - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_BURN - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
for (i1 = 0; i1 < sp150; i1++) {
if (sp150) { // Needed for matching
@ -856,8 +856,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->work[BFD_CEILING_TARGET]++;
this->timers[1] = 60;
this->work[BFD_CAM_SHAKE_TIMER] = 20;
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Player_SetCsActionWithHaltedActors(play, &this->actor, 5);
for (i1 = 0; i1 < 15; i1++) {
Vec3f sp144 = { 0.0f, 0.0f, 0.0f };
@ -898,8 +898,8 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
Vec3f sp114 = { 0.0f, 0.0f, 0.0f };
Vec3f sp108 = { 0.0f, 0.03f, 0.0f };
Audio_PlaySoundGeneral(NA_SE_EN_GOMA_LAST - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_GOMA_LAST - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp120.x = Rand_CenteredFloat(40.0f) + this->actor.world.pos.x;
sp120.y = (Rand_CenteredFloat(10.0f) + this->actor.world.pos.y) - 10.0f;
@ -1139,8 +1139,8 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
if (this->work[BFD_ROAR_TIMER] != 0) {
if (this->work[BFD_ROAR_TIMER] == 37) {
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_ROAR, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_ROAR, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
jawAngle = 6000.0f;
jawSpeed = 1300.0f;
@ -1160,8 +1160,8 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
Vec3f spawnPos1;
s32 pad;
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_APPEAR - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_APPEAR - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->work[BFD_SPLASH_TIMER] != 0) {
this->work[BFD_SPLASH_TIMER]--;
if ((this->actor.colChkInfo.health == 0) ||
@ -1238,8 +1238,8 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
this->fogMode = 2;
spawnSpeed2.z = 30.0f;
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_FIRE - SFX_FLAG, &sFireAudioVec, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_FIRE - SFX_FLAG, &sFireAudioVec, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
spawnPos2 = this->headPos;
spawnAngleY = (this->actor.world.rot.y / (f32)0x8000) * M_PI;
@ -1301,8 +1301,8 @@ void BossFd_CollisionCheck(BossFd* this, PlayState* play) {
}
this->work[BFD_DAMAGE_FLASH_TIMER] = 10;
this->work[BFD_INVINC_TIMER] = 20;
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_DAMAGE1, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_VALVAISA_DAMAGE1, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}

View File

@ -700,7 +700,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->fwork[GDF_TRIFORCE_PRIM_A] = 0.0f;
this->fwork[GDF_TRIFORCE_PRIM_B] = 255.0f;
this->fwork[GDF_TRIFORCE_ENV_G] = 100.0f;
func_80078884(NA_SE_EV_TRIFORCE_MARK);
Sfx_PlaySfxCentered(NA_SE_EV_TRIFORCE_MARK);
play->envCtx.unk_D8 = 0.0f;
// fallthrough
case 7:
@ -747,7 +747,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->fwork[GDF_TRIFORCE_PRIM_A] = 0.0f;
this->fwork[GDF_TRIFORCE_PRIM_B] = 255.0f;
this->fwork[GDF_TRIFORCE_ENV_G] = 100.0f;
func_80078884(NA_SE_EV_TRIFORCE_MARK);
Sfx_PlaySfxCentered(NA_SE_EV_TRIFORCE_MARK);
play->envCtx.unk_D8 = 0.0f;
// fallthrough
case 9:
@ -956,7 +956,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer >= 30) {
if (this->csTimer == 30) {
func_80078884(NA_SE_EV_TRIFORCE_MARK);
Sfx_PlaySfxCentered(NA_SE_EV_TRIFORCE_MARK);
}
// fade in ganondorf's triforce
@ -1476,7 +1476,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.2f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
skip_cam_and_quake:
this->envLightMode = 15;
@ -1523,7 +1523,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
}
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * this->unk_710;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
if (this->csTimer < 100) {
this->windowShatterState = GDF_WINDOW_SHATTER_PARTIAL;
@ -1744,7 +1744,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
case 1055:
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.3f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
if (this->csTimer == 20) {
sBossGanonZelda->unk_3C8 = 5;
@ -1759,7 +1759,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
case 1056:
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.3f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
this->csCamEye.x = -503.0f;
this->csCamEye.y = 4128.0f;
@ -1777,7 +1777,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
case 1057:
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * (50.0f * this->csCamMovementScale);
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Math_ApproachF(&this->csCamEye.x, -1200.0f, 0.1f, this->csCamMovementScale * 697.0f);
Math_ApproachF(&this->csCamEye.y, 4241.0f, 0.1f, this->csCamMovementScale * 113.0f);
@ -1801,7 +1801,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
this->csCamAt.z = sBossGanonZelda->actor.world.pos.z - 25.0f;
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.3f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
if (this->csTimer == 70) {
sBossGanonZelda->unk_3C8 = 6;
@ -1821,7 +1821,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
case 107:
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.8f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
this->csCamEye.x = -380.0f;
this->csCamEye.y = 4154.0f;
@ -1840,7 +1840,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
case 108:
this->unk_70C = Math_SinS(this->csTimer * 0x6300) * 0.8f;
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
this->csCamAt.x = (sBossGanonZelda->actor.world.pos.x - 5.0f) - 30.0f;
this->csCamAt.y = (sBossGanonZelda->actor.world.pos.y + 40.0f + 5.0f) - 20.0f;
@ -1863,7 +1863,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
break;
case 109:
func_80078884(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
break;
}
@ -2306,7 +2306,7 @@ void BossGanon_Wait(BossGanon* this, PlayState* play) {
this->actor.world.pos.y += this->actor.velocity.y;
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0xBB8);
func_80078914(&this->actor.projectedPos, NA_SE_EN_FANTOM_FLOAT - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EN_FANTOM_FLOAT - SFX_FLAG);
}
void BossGanon_SetupChargeLightBall(BossGanon* this, PlayState* play) {
@ -2803,7 +2803,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
BossGanon_SetupDeathCutscene(this, play);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_DEAD);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_DD_THUNDER);
func_80078914(&sZeroVec, NA_SE_EN_LAST_DAMAGE);
Sfx_PlaySfxAtPos(&sZeroVec, NA_SE_EN_LAST_DAMAGE);
Audio_QueueSeqCmd(0x100100FF);
this->screenFlashTimer = 4;
GameInteractor_ExecuteOnBossDefeat(&this->actor);
@ -2985,7 +2985,7 @@ void BossGanon_Update(Actor* thisx, PlayState* play2) {
// player hit, spawn shock and play sound
if (this->unk_2E8 != 0) {
func_80078914(&player->actor.projectedPos, NA_SE_PL_SPARK - SFX_FLAG);
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_PL_SPARK - SFX_FLAG);
BossGanonEff_SpawnShock(play, 700.0f, GDF_SHOCK_PLAYER_YELLOW);
}
}
@ -4028,8 +4028,8 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
if ((hitWithBottle == false) && (acHitInfo->toucher.dmgFlags & 0x100000)) {
spBA = 2;
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_800AA000(this->actor.xyzDistToPlayerSq, 0xFF, 0x14, 0x96);
} else {
spBA = 1;
@ -4038,8 +4038,8 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
Math_Atan2S(sqrtf(SQ(xDistFromGanondorf) + SQ(zDistFromGanondorf)), yDistFromGanondorf);
this->unk_1A4++;
this->timers[1] = 2;
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_REFLECT_MG, &player->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_REFLECT_MG, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_800AA000(this->actor.xyzDistToPlayerSq, 0xB4, 0x14, 0x64);
if (hitWithBottle == false) {
@ -4319,8 +4319,8 @@ void func_808E1EB4(Actor* thisx, PlayState* play2) {
this->actor.speedXZ = 0.0f;
if (this->actor.params == 0xC8) {
func_80078884(NA_SE_EN_GANON_DAMAGE2);
func_80078884(NA_SE_EN_GANON_DD_THUNDER);
Sfx_PlaySfxCentered(NA_SE_EN_GANON_DAMAGE2);
Sfx_PlaySfxCentered(NA_SE_EN_GANON_DD_THUNDER);
for (i = 0; i < 150; i++) {
@ -4824,7 +4824,7 @@ void BossGanon_UpdateEffects(PlayState* play) {
Math_ApproachF(&eff->unk_40, 4.0f, 1.0f, 0.15f);
} else if (eff->type == GDF_EFF_IMPACT_DUST_LIGHT) {
if (i == 0) {
func_80078884(NA_SE_EN_GANON_WAVE_GND - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EN_GANON_WAVE_GND - SFX_FLAG);
}
eff->unk_30++; // unused

View File

@ -334,7 +334,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
Math_ApproachF(&this->unk_3B0.y, player->actor.world.pos.y + 47.0f + 7.0f, 0.1f, 2.0f);
this->unk_339 = 4;
if (this->csTimer == 10) {
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
Sfx_PlaySfxAtPos(&D_80906D6C, NA_SE_EV_STONE_BOUND);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
}
if (this->csTimer == 20) {
@ -397,7 +397,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_3B0.y = (player->actor.world.pos.y + 200.0f) - 160.0f;
this->unk_3B0.z = player->actor.world.pos.z;
if (this->csTimer >= 20) {
func_80078884(NA_SE_EN_GOMA_LAST - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EN_GOMA_LAST - SFX_FLAG);
Math_ApproachF(&this->unk_324, 255.0f, 1.0f, 10.0f);
this->unk_339 = 5;
if (this->csTimer == 20) {
@ -418,7 +418,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
break;
case 11:
this->unk_339 = 5;
func_80078884(NA_SE_EN_GOMA_LAST - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EN_GOMA_LAST - SFX_FLAG);
player->actor.world.pos.x = 490.0f;
player->actor.world.pos.y = 1086.0f;
player->actor.world.pos.z = -166.0f;
@ -434,10 +434,10 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_3B0.y = ((player->actor.world.pos.y + 200.0f) - 151.0f) - 2.0f;
this->unk_3B0.z = player->actor.world.pos.z + 2.0f;
if (this->csTimer == 10) {
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
Sfx_PlaySfxAtPos(&D_80906D6C, NA_SE_EV_STONE_BOUND);
}
if (this->csTimer == 20) {
func_80078884(NA_SE_EV_STONE_BOUND);
Sfx_PlaySfxCentered(NA_SE_EV_STONE_BOUND);
}
if (this->csTimer == 30) {
Player_SetCsActionWithHaltedActors(play, &this->actor, 0x52);
@ -471,7 +471,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
func_800A9F6C(0.0f, 0xC8, 0x14, 0x14);
}
if (this->csTimer == 30) {
func_80078884(NA_SE_EV_GRAVE_EXPLOSION);
Sfx_PlaySfxCentered(NA_SE_EV_GRAVE_EXPLOSION);
}
if (this->csTimer >= 30) {
Math_ApproachF(&this->actor.world.pos.y, 1289.0f, 0.1f, 10.0f);
@ -736,8 +736,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_312 = 2;
}
if ((this->csTimer == 166) || (this->csTimer == 185) || (this->csTimer == 200)) {
func_80078884(NA_SE_EN_MGANON_SWORD);
func_80078884(NA_SE_EN_MGANON_ROAR);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_SWORD);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_ROAR);
}
if (this->csTimer == 215) {
this->csState = 23;
@ -751,8 +751,8 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_312 = 2;
}
if (this->csTimer == 222) {
func_80078884(NA_SE_EN_MGANON_SWORD);
func_80078884(NA_SE_EN_MGANON_ROAR);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_SWORD);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_ROAR);
}
this->unk_3A4.x = (player->actor.world.pos.x - 40.0f) + 6.0f;
this->unk_3A4.y = player->actor.world.pos.y + 40.0f;
@ -761,7 +761,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_3B0.y = ((player->actor.world.pos.y + 10.0f + 60.0f) - 20.0f) - 2.0f;
this->unk_3B0.z = player->actor.world.pos.z;
if (this->csTimer == 228) {
func_80078884(NA_SE_IT_SHIELD_REFLECT_SW);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_SW);
Player_SetCsActionWithHaltedActors(play, &this->actor, 0x56);
func_800A9F6C(0.0f, 0xFF, 0xA, 0x32);
}
@ -796,7 +796,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_3A4.z = effect->position.z + 70.0f;
}
if ((this->csTimer & 3) == 0) {
func_80078884(NA_SE_IT_SWORD_SWING);
Sfx_PlaySfxCentered(NA_SE_IT_SWORD_SWING);
}
if (this->csTimer == 25) {
Player_SetCsActionWithHaltedActors(play, &this->actor, 0x57);
@ -976,11 +976,11 @@ void func_808FF898(BossGanon2* this, PlayState* play) {
}
if (this->unk_392 == 4) {
func_80078884(NA_SE_EV_GRAVE_EXPLOSION);
Sfx_PlaySfxCentered(NA_SE_EV_GRAVE_EXPLOSION);
}
if (this->unk_392 == 3) {
func_80078884(NA_SE_EN_MGANON_SWDIMP);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_SWDIMP);
}
}
}
@ -1349,7 +1349,7 @@ void func_80900890(BossGanon2* this, PlayState* play) {
play->envCtx.unk_D8 = 0.0f;
case 1:
if (this->unk_1A2[1] == 50) {
func_80078884(NA_SE_EN_MGANON_WALK);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_WALK);
}
Matrix_RotateY(((this->actor.shape.rot.y / (f32)0x8000) * M_PI) + 0.3f, MTXMODE_NEW);
sp5C.x = 0.0f;
@ -1556,12 +1556,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
Math_ApproachZeroF(&play->envCtx.unk_D8, 1.0f, 0.08f);
}
if (this->csTimer == 50) {
func_80078884(NA_SE_EN_MGANON_WALK);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_WALK);
}
if (this->csTimer > 90) {
Math_ApproachF(&this->unk_380, 0.25f, 1.0f, 0.0125f);
this->unk_37C = 200.0f;
func_80078884(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
}
if (this->csTimer >= 110) {
if (this->csTimer == 110) {
@ -1596,7 +1596,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
case 2:
this->unk_339 = 22;
Math_ApproachF(&play->envCtx.unk_D8, 1.0f, 1.0f, 0.1f);
func_80078884(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
this->unk_3A4.x = 250;
this->unk_3A4.y = 1150.0f;
this->unk_3A4.z = 0.0f;
@ -1610,7 +1610,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
break;
case 3:
this->unk_339 = 22;
func_80078884(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG);
this->unk_3A4.x = 330.0f;
this->unk_3A4.y = 1120.0f;
this->unk_3A4.z = -150.0f;
@ -1647,7 +1647,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
this->unk_339 = 23;
if ((this->csTimer >= 60) && (this->csTimer <= 90)) {
if (this->csTimer == 62) {
func_80078884(NA_SE_EV_TRIFORCE_FLASH);
Sfx_PlaySfxCentered(NA_SE_EV_TRIFORCE_FLASH);
}
Math_ApproachF(&this->unk_38C, 200.0f, 1.0f, 8.0f);
} else {
@ -1707,12 +1707,12 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
player->actor.shape.rot.y = -0x4000;
player->actor.world.pos.z = 30.0f;
if ((this->csTimer == 20) || (this->csTimer == 30) || (this->csTimer == 65) || (this->csTimer == 40)) {
func_80078884(NA_SE_VO_LI_SWORD_N);
func_80078884(NA_SE_IT_SWORD_SWING_HARD);
Sfx_PlaySfxCentered(NA_SE_VO_LI_SWORD_N);
Sfx_PlaySfxCentered(NA_SE_IT_SWORD_SWING_HARD);
}
if ((this->csTimer == 22) || (this->csTimer == 35) || (this->csTimer == 72) || (this->csTimer == 45)) {
func_80078884(NA_SE_EN_MGANON_DAMAGE);
func_80078884(NA_SE_IT_SHIELD_BOUND);
Sfx_PlaySfxCentered(NA_SE_EN_MGANON_DAMAGE);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_BOUND);
play->envCtx.unk_D8 = 1.0f;
}
if ((this->csTimer == 22) || (this->csTimer == 35) || (this->csTimer == 72) || (this->csTimer == 45)) {
@ -2052,7 +2052,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
if (this->actor.bgCheckFlags & 1) {
if (this->actor.velocity.y < -5.0f) {
func_80033E88(&this->actor, play, 5, 20);
func_80078884(NA_SE_IT_BOMB_EXPLOSION);
Sfx_PlaySfxCentered(NA_SE_IT_BOMB_EXPLOSION);
}
this->actor.velocity.y = 0.0f;
}
@ -2138,7 +2138,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
if (Rand_ZeroOne() < 0.5f) {
D_8090EB20.z = Rand_ZeroFloat(1000.0f);
}
func_80078914(&D_8090EB20, NA_SE_EV_LIGHTNING);
Sfx_PlaySfxAtPos(&D_8090EB20, NA_SE_EV_LIGHTNING);
this->unk_328 = 0xFF;
this->unk_330 = 5;
this->unk_32C = 0.0f;
@ -2916,7 +2916,7 @@ void func_80905DA8(BossGanon2* this, PlayState* play) {
if (effect->velocity.y < -10.0f) {
sp78 = effect->position;
sp78.y = 1086.0f;
func_80078884(NA_SE_IT_SHIELD_REFLECT_SW);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_SW);
CollisionCheck_SpawnShieldParticlesMetal(play, &sp78);
}
effect->velocity.y = 0.0f;

View File

@ -316,7 +316,7 @@ void BossGanondrof_Intro(BossGanondrof* this, PlayState* play) {
}
if (this->timers[1] == 30) {
func_80078914(&sAudioVec, NA_SE_EN_FANTOM_TRANSFORM);
Sfx_PlaySfxAtPos(&sAudioVec, NA_SE_EN_FANTOM_TRANSFORM);
}
if (horse->bossGndSignal == FHG_LIGHTNING) {

View File

@ -619,7 +619,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
case MO_TENT_READY:
case MO_TENT_SWING:
if (sMorphaCore->csState == MO_BATTLE) {
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
}
Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f);
for (indS1 = 0; indS1 < 41; indS1++) {
@ -672,7 +672,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
break;
case MO_TENT_ATTACK:
this->actor.flags |= ACTOR_FLAG_PLAY_HIT_SFX;
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG);
Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f);
for (indS1 = 0; indS1 < 41; indS1++) {
Math_ApproachF(&this->tentStretch[indS1].y,
@ -754,9 +754,9 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
if (play->grabPlayer(play, player)) {
player->actor.parent = &this->actor;
this->work[MO_TENT_ACTION_STATE] = MO_TENT_GRAB;
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_CATCH);
Audio_PlaySoundGeneral(NA_SE_VO_LI_DAMAGE_S, &player->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CATCH);
Audio_PlaySoundGeneral(NA_SE_VO_LI_DAMAGE_S, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
this->work[MO_TENT_ACTION_STATE] = MO_TENT_READY;
this->tentMaxAngle = .001f;
@ -885,7 +885,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
}
break;
case MO_TENT_CUT:
func_80078914(&this->tentTipPos, NA_SE_EV_WATER_WALL - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EV_WATER_WALL - SFX_FLAG);
if (&this->actor == player->actor.parent) {
player->av2.actionVar2 = 0x65;
player->actor.parent = NULL;
@ -1103,7 +1103,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
this->drawActor = false;
this->work[MO_TENT_ACTION_STATE] = MO_TENT_DEATH_6;
this->timers[0] = 60;
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_CORE_JUMP);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CORE_JUMP);
for (indS1 = 0; indS1 < 300; indS1++) {
spC8.x = 0.0;
spC8.y = 0.0;
@ -1181,7 +1181,7 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
hurtbox = this->tentCollider.elements[i1].info.acHitInfo;
this->work[MO_TENT_INVINC_TIMER] = 5;
if (hurtbox->toucher.dmgFlags & 0x00020000) {
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_CUT);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CUT);
this->cutIndex = 15;
this->meltIndex = this->cutIndex + 1;
this->work[MO_TENT_ACTION_STATE] = MO_TENT_CUT;
@ -1292,7 +1292,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
EffectSsBubble_Spawn(play, &bubblePos, 0.0f, 10.0f, 50.0f, Rand_ZeroFloat(0.05f) + 0.13f);
}
if (this->timers[2] == 40) {
func_80078914(&sAudioZeroVec, NA_SE_EN_MOFER_BUBLE_DEMO);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EN_MOFER_BUBLE_DEMO);
}
break;
case MO_INTRO_SWIM:
@ -1325,7 +1325,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
Math_ApproachF(&this->cameraSpeedMod, 0.02f, 1.0f, 0.001f);
}
if (this->work[MO_TENT_MOVE_TIMER] == 190) {
func_80078914(&sAudioZeroVec, NA_SE_EN_MOFER_BUBLE_DEMO);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EN_MOFER_BUBLE_DEMO);
}
if ((this->work[MO_TENT_MOVE_TIMER] > 150) && (this->work[MO_TENT_MOVE_TIMER] < 180)) {
bubblePos2.x = (this->cameraEye.x + 20.0f) + 10.0f;
@ -1517,9 +1517,9 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
}
if ((this->csState > MO_INTRO_START) && (this->work[MO_TENT_MOVE_TIMER] > 540)) {
func_80078914(&sMorphaTent1->tentTipPos, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
Sfx_PlaySfxAtPos(&sMorphaTent1->tentTipPos, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
} else if (this->csState >= MO_INTRO_START) {
func_80078914(&sAudioZeroVec, NA_SE_EN_MOFER_MOVE_DEMO - SFX_FLAG);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EN_MOFER_MOVE_DEMO - SFX_FLAG);
}
}
@ -1718,13 +1718,13 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) {
}
if ((this->csState > MO_DEATH_START) && (this->csState < MO_DEATH_FINISH)) {
if (this->work[MO_TENT_MOVE_TIMER] < 500) {
func_80078914(&sAudioZeroVec, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EN_MOFER_APPEAR - SFX_FLAG);
}
if ((this->work[MO_TENT_MOVE_TIMER] < 490) && (this->work[MO_TENT_MOVE_TIMER] > 230)) {
func_80078914(&sAudioZeroVec, NA_SE_EV_DROP_FALL - SFX_FLAG);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EV_DROP_FALL - SFX_FLAG);
}
if (this->work[MO_TENT_MOVE_TIMER] < 220) {
func_80078914(&sAudioZeroVec, NA_SE_EV_SCOOPUP_WATER - SFX_FLAG);
Sfx_PlaySfxAtPos(&sAudioZeroVec, NA_SE_EV_SCOOPUP_WATER - SFX_FLAG);
}
}
if (sMorphaCore->waterLevel < -200.0f) {
@ -1820,7 +1820,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
this->work[MO_TENT_INVINC_TIMER] = 10;
} else if (!(hurtbox->toucher.dmgFlags & 0x00100000) && (hurtbox->toucher.dmgFlags & 0x80)) {
if (this->work[MO_TENT_ACTION_STATE] >= MO_CORE_ATTACK) {
func_80078914(&sMorphaTent1->tentTipPos, NA_SE_EN_MOFER_CUT);
Sfx_PlaySfxAtPos(&sMorphaTent1->tentTipPos, NA_SE_EN_MOFER_CUT);
sMorphaTent1->cutIndex = this->work[MO_CORE_POS_IN_TENT];
sMorphaTent1->meltIndex = sMorphaTent1->cutIndex + 1;
sMorphaTent1->cutScale = 1.0f;
@ -2386,7 +2386,7 @@ void BossMo_UpdateTent(Actor* thisx, PlayState* play) {
} else {
i = 0;
if (this->work[MO_TENT_ACTION_STATE] < MO_TENT_CUT) {
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_CORE_ROLL - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CORE_ROLL - SFX_FLAG);
}
}
bubblePos.x = this->tentPos[i].x + sp7C.x;
@ -3614,7 +3614,7 @@ void BossMo_Unknown(void) {
if (BREG(32) != 0) {
BREG(32)--;
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
func_80078914(&zeroVec, unkSfx[BREG(33)]);
Sfx_PlaySfxAtPos(&zeroVec, unkSfx[BREG(33)]);
}
if (BREG(34) != 0) {
BREG(34) = 0;

View File

@ -2526,7 +2526,7 @@ void BossSst_HandSetInvulnerable(BossSst* this, s32 isInv) {
}
void BossSst_HeadSfx(BossSst* this, u16 sfxId) {
func_80078914(&this->center, sfxId);
Sfx_PlaySfxAtPos(&this->center, sfxId);
}
void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) {

View File

@ -853,7 +853,7 @@ s32 BossTw_CheckBeamReflection(BossTw* this, PlayState* play) {
BossTw_AddShieldDeflectEffect(play, 10.0f, this->actor.params);
play->envCtx.unk_D8 = 1.0f;
this->timers[0] = 10;
func_80078884(NA_SE_IT_SHIELD_REFLECT_MG2);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_MG2);
}
sBeamDivertTimer++;
@ -1080,7 +1080,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
}
this->beamShootState = 1;
func_80078914(&player->actor.projectedPos, NA_SE_IT_SHIELD_REFLECT_MG);
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_IT_SHIELD_REFLECT_MG);
Matrix_MtxFToYXZRotS(&player->shieldMf, &sp128, 0);
sp128.y += 0x8000;
sp128.x = -sp128.x;
@ -1105,11 +1105,11 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
&this->unk_54C, &this->actor.projectedW);
if (this->actor.params == 1) {
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_54C, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_54C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_54C, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_54C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
@ -1135,15 +1135,15 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
&this->actor.projectedW);
if (this->actor.params == 1) {
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_558, 4U, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_REFL_FIRE - SFX_FLAG, &this->unk_558, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_558, 4U, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_REFL_FIRE - SFX_FLAG, &this->unk_558, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_558, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_REFL_FREEZE - SFX_FLAG, &this->unk_558, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_558, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySoundGeneral(NA_SE_EN_TWINROBA_REFL_FREEZE - SFX_FLAG, &this->unk_558, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
}
@ -1671,7 +1671,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) {
if (this->timers[1] == 8) {
this->work[TW_BLINK_IDX] = 8;
func_80078884(NA_SE_EN_TWINROBA_YOUNG_WINK);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_YOUNG_WINK);
}
if (this->timers[2] == 4) {
sEnvType = 0;
@ -1749,12 +1749,12 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->csSfxTimer > 220 && this->csSfxTimer < 630) {
func_80078884(NA_SE_EN_TWINROBA_UNARI - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_UNARI - SFX_FLAG);
}
if (this->csSfxTimer == 180) {
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH);
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH2);
Sfx_PlaySfxAtPos(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH);
Sfx_PlaySfxAtPos(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH2);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
}
@ -1815,7 +1815,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
}
if (this->work[CS_TIMER_1] == 180) {
func_80078884(NA_SE_EN_TWINROBA_APPEAR_MS);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_APPEAR_MS);
}
if (this->work[CS_TIMER_1] > 180) {
@ -2433,7 +2433,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
}
if (this->work[CS_TIMER_2] > 440 && this->work[CS_TIMER_2] < 860) {
func_80078884(NA_SE_EN_TWINROBA_FIGHT - SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_FIGHT - SFX_FLAG);
}
if (this->work[CS_TIMER_2] == 430) {
@ -2638,7 +2638,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
Vec3f spBC;
Vec3f spB0;
Vec3f spA4 = { 0.0f, 0.0f, 0.0f };
func_80078884(NA_SE_EN_TWINROBA_TRANSFORM);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_TRANSFORM);
for (i = 0; i < 100; i++) {
spB0.x = Rand_CenteredFloat(5.0f);
spB0.y = Rand_CenteredFloat(5.0f);
@ -2751,7 +2751,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
Actor_SetScale(&sKotakePtr->actor, 0.0f);
sKoumePtr->visible = 1;
sKotakePtr->visible = 1;
func_80078884(NA_SE_EN_TWINROBA_TRANSFORM);
Sfx_PlaySfxCentered(NA_SE_EN_TWINROBA_TRANSFORM);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
this->csState2 = 3;
this->work[CS_TIMER_2] = 0;
@ -3153,8 +3153,8 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
if (sFreezeState == 1) {
sFreezeState = 2;
BossTw_AddPlayerFreezeEffect(play, NULL);
func_80078914(&player->actor.projectedPos, NA_SE_VO_LI_FREEZE);
func_80078914(&player->actor.projectedPos, NA_SE_PL_FREEZE);
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_VO_LI_FREEZE);
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_PL_FREEZE);
if (sShieldFireCharge != 0) {
sShieldFireCharge = 4;
@ -3680,11 +3680,11 @@ void BossTw_ShieldChargeDraw(BossTw* this, PlayState* play) {
temp_t0 = sShieldFireCharge | sShieldIceCharge;
if (temp_t0 == 1) {
func_80078884(NA_SE_IT_SHIELD_CHARGE_LV1 & ~SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_CHARGE_LV1 & ~SFX_FLAG);
} else if (temp_t0 == 2) {
func_80078884(NA_SE_IT_SHIELD_CHARGE_LV2 & ~SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_CHARGE_LV2 & ~SFX_FLAG);
} else if (temp_t0 == 3) {
func_80078884(NA_SE_IT_SHIELD_CHARGE_LV3 & ~SFX_FLAG);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_CHARGE_LV3 & ~SFX_FLAG);
}
if (temp_t0 != 0 && temp_t0 < 4) {
@ -4367,7 +4367,7 @@ s32 BossTw_BlastShieldCheck(BossTw* this, PlayState* play) {
sEnvType = 0;
sShieldIceCharge = 0;
sShieldFireCharge = 0;
func_80078884(NA_SE_IT_SHIELD_REFLECT_MG2);
Sfx_PlaySfxCentered(NA_SE_IT_SHIELD_REFLECT_MG2);
}
ret = true;

View File

@ -3937,7 +3937,7 @@ void BossVa_SpawnTumor(PlayState* play, BossVaEffect* effect, BossVa* this, Vec3
effect->scale = 0.0f;
if (((i % 4) == 0) || (mode == 2)) {
Audio_PlaySoundGeneral(NA_SE_EN_BALINADE_BREAK, &effect->pos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_BALINADE_BREAK, &effect->pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
}

View File

@ -236,7 +236,7 @@ void func_80966E98(Demo6K* this, PlayState* play) {
}
if (this->timer1 == 39) {
func_800788CC(NA_SE_EV_CONSENTRATION);
Sfx_PlaySfxCentered2(NA_SE_EV_CONSENTRATION);
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_6K, this->actor.world.pos.x,
this->actor.world.pos.y + 10.0f, this->actor.world.pos.z, 0, 0, 0, 2, true);
}

View File

@ -309,14 +309,14 @@ void DemoDu_InitCs_GoronsRuby(DemoDu* this, PlayState* play) {
// Cutscene: Darunia gives Link the Goron's Ruby.
// Sfx played when Darunia lands at the floor at the start of the cutscene.
void DemoDu_CsPlaySfx_GoronLanding(DemoDu* this) {
func_80078914(&this->actor.projectedPos, NA_SE_EN_GOLON_LAND_BIG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EN_GOLON_LAND_BIG);
}
// Cutscene: Darunia gives Link the Goron's Ruby.
// Sfx played when Darunia is falling at the start of the cutscene.
void DemoDu_CsPlaySfx_DaruniaFalling(PlayState* play) {
if (play->csCtx.frames == 160) {
func_800788CC(NA_SE_EV_OBJECT_FALL);
Sfx_PlaySfxCentered2(NA_SE_EV_OBJECT_FALL);
}
}
@ -325,14 +325,14 @@ void DemoDu_CsPlaySfx_DaruniaHitsLink(PlayState* play) {
Player* player = GET_PLAYER(play);
s32 pad;
func_80078914(&player->actor.projectedPos, NA_SE_EN_DARUNIA_HIT_LINK);
Audio_PlaySoundGeneral(NA_SE_VO_LI_DAMAGE_S_KID, &player->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_EN_DARUNIA_HIT_LINK);
Audio_PlaySoundGeneral(NA_SE_VO_LI_DAMAGE_S_KID, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
// Cutscene: Darunia gives Link the Goron's Ruby.
void DemoDu_CsPlaySfx_HitBreast(DemoDu* this) {
func_80078914(&this->actor.projectedPos, NA_SE_EN_DARUNIA_HIT_BREAST - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EN_DARUNIA_HIT_BREAST - SFX_FLAG);
}
// Cutscene: Darunia gives Link the Goron's Ruby.
@ -341,8 +341,8 @@ void DemoDu_CsPlaySfx_LinkEscapeFromGorons(PlayState* play) {
if (play->csCtx.frames == 1400) {
Player* player = GET_PLAYER(play);
Audio_PlaySoundGeneral(NA_SE_VO_LI_FALL_L_KID, &player->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_VO_LI_FALL_L_KID, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
@ -352,8 +352,8 @@ void DemoDu_CsPlaySfx_LinkSurprised(PlayState* play) {
if (play->csCtx.frames == 174) {
Player* player = GET_PLAYER(play);
Audio_PlaySoundGeneral(NA_SE_VO_LI_SURPRISE_KID, &player->actor.projectedPos, 4U, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_VO_LI_SURPRISE_KID, &player->actor.projectedPos, 4U, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}
@ -715,7 +715,7 @@ void DemoDu_InitCs_AfterGanon(DemoDu* this, PlayState* play) {
}
void DemoDu_CsPlaySfx_WhiteOut() {
func_800788CC(NA_SE_SY_WHITE_OUT_T);
Sfx_PlaySfxCentered2(NA_SE_SY_WHITE_OUT_T);
}
void DemoDu_CsAfterGanon_SpawnDemo6K(DemoDu* this, PlayState* play) {

View File

@ -651,7 +651,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
(IS_RANDO && gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_WARP_PAD)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
}
if (this->getItem.drawId != GID_ARROW_LIGHT) {
this->actor.shape.rot.y += 0x3E80;
@ -667,7 +667,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
(IS_RANDO && gSaveContext.entranceIndex == ENTR_TEMPLE_OF_TIME_WARP_PAD)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
}
break;
case 4:
@ -973,7 +973,7 @@ void DemoEffect_UpdateCreationFireball(DemoEffect* this, PlayState* play) {
Actor_SetScale(&effect->actor, 0.2f);
}
func_800788CC(NA_SE_IT_DM_RING_EXPLOSION);
Sfx_PlaySfxCentered2(NA_SE_IT_DM_RING_EXPLOSION);
Actor_Kill(&this->actor);
}
@ -1862,13 +1862,13 @@ void DemoEffect_DrawGodLgt(Actor* thisx, PlayState* play) {
if (gSaveContext.entranceIndex == ENTR_CUTSCENE_MAP_0) {
if (gSaveContext.sceneSetupIndex == 4) {
if (play->csCtx.frames <= 680) {
func_80078914(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
}
} else {
func_80078914(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
}
} else {
func_80078914(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_GOD_FLYING - SFX_FLAG);
}
gSPSegment(POLY_XLU_DISP++, 8,

View File

@ -45,8 +45,8 @@ void DemoExt_Init(Actor* thisx, PlayState* play) {
void DemoExt_PlayVortexSFX(DemoExt* this) {
if (this->alphaTimer <= (kREG(35) + 40.0f) - 15.0f) {
Audio_PlaySoundGeneral(NA_SE_EV_FANTOM_WARP_L - SFX_FLAG, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_FANTOM_WARP_L - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View File

@ -101,14 +101,14 @@ void func_8097C930(DemoGo* this) {
}
void func_8097C9B8(DemoGo* this) {
func_80078914(&this->actor.projectedPos, NA_SE_EN_DODO_M_GND);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EN_DODO_M_GND);
}
void func_8097C9DC(DemoGo* this) {
s32 pad[2];
if (Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 25.0f)) {
func_80078914(&this->actor.projectedPos, NA_SE_EN_MORIBLIN_WALK);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EN_MORIBLIN_WALK);
}
}

View File

@ -20,7 +20,7 @@ void DemoGt_Destroy(Actor* thisx, PlayState* play) {
}
void DemoGt_PlayEarthquakeSfx() {
func_800788CC(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
Sfx_PlaySfxCentered2(NA_SE_EV_EARTHQUAKE - SFX_FLAG);
}
void DemoGt_PlayExplosion1Sfx(PlayState* play, Vec3f* pos) {
@ -1189,7 +1189,7 @@ void func_80980F58(DemoGt* this, PlayState* play) {
u16 frames = play->csCtx.frames;
if (frames == 244) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
}
}
@ -1312,7 +1312,7 @@ void func_80981424(DemoGt* this, PlayState* play) {
u16 frames = play->csCtx.frames;
if (frames == 789) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
}
}
@ -1430,7 +1430,7 @@ void func_809818FC(DemoGt* this, PlayState* play) {
u16 frames = play->csCtx.frames;
if (frames == 845) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
}
}
void func_80981930(DemoGt* this, PlayState* play) {
@ -1521,7 +1521,7 @@ void func_80981CEC(DemoGt* this, PlayState* play) {
u16 frames = play->csCtx.frames;
if (frames == 183) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
}
}
@ -1612,7 +1612,7 @@ void func_809820AC(DemoGt* this, PlayState* play) {
u16 frames = play->csCtx.frames;
if (frames == 154) {
func_80078914(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
Sfx_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TOWER_PARTS_BROKEN - SFX_FLAG);
}
}

View File

@ -93,20 +93,20 @@ void DemoIk_Type1PlaySound(DemoIk* this) {
switch (this->actor.params) {
case 0:
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND1_DEMO, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND1_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
case 1:
if (Animation_OnFrame(&this->skelAnime, 10.0f)) {
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND3_DEMO, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND3_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
case 2:
if (Animation_OnFrame(&this->skelAnime, 9.0f)) {
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND2_DEMO, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND2_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
}
@ -327,8 +327,8 @@ void DemoIk_Type2Init(DemoIk* this, PlayState* play) {
void DemoIk_Type2PlaySoundOnFrame(DemoIk* this, f32 frame) {
if (Animation_OnFrame(&this->skelAnime, frame)) {
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_OFF_DEMO, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EN_IRONNACK_ARMOR_OFF_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
}

View File

@ -438,7 +438,7 @@ void func_80985860(DemoIm* this, PlayState* play) {
}
void func_809858A8(void) {
func_800788CC(NA_SE_SY_WHITE_OUT_T);
Sfx_PlaySfxCentered2(NA_SE_SY_WHITE_OUT_T);
}
void DemoIm_SpawnLightBall(DemoIm* this, PlayState* play) {
@ -728,7 +728,7 @@ void func_80986570(DemoIm* this, PlayState* play) {
u32 sfxId = SFX_FLAG;
sfxId += SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
Audio_PlaySoundGeneral(sfxId, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}

View File

@ -257,7 +257,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
this->sparkleCounter = 0;
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
if (this->actor.params == DEMOKANKYO_WARP_OUT) {
Audio_PlaySoundGeneral(NA_SE_EV_SARIA_MELODY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_SARIA_MELODY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
break;
case DEMOKANKYO_SPARKLES:
@ -818,8 +818,8 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_22++;
}
} else {
Audio_PlaySoundGeneral(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Audio_PlaySoundGeneral(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpInCameraPoints, &this->unk_150[i].unk_20,
&this->unk_150[i].unk_1C) != 0) {
this->unk_150[i].unk_22++;

Some files were not shown because too many files have changed in this diff Show More