1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-16 21:05:12 +00:00

Name variables for Audio_PlaySoundGeneral (#1198)

* Rename variables and function

* Improve comment

* PR Suggestion

* PR Suggestions

* Revert back to `Audio_PlaySoundGeneral`, make a separate PR `Sound` -> `Sfx`

* Oops, fixed that
This commit is contained in:
engineer124 2022-04-24 00:55:18 +10:00 committed by GitHub
parent 1e03b662f2
commit ef870bdd11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 1026 additions and 721 deletions

View file

@ -1689,7 +1689,8 @@ void func_8002F7A0(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f
}
void func_8002F7DC(Actor* actor, u16 sfxId) {
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
}
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
@ -2235,13 +2236,14 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
void func_80030ED8(Actor* actor) {
if (actor->flags & ACTOR_FLAG_19) {
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_20) {
func_80078884(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_21) {
func_800788CC(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_28) {
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);
}
@ -4967,8 +4969,8 @@ void func_80036E50(u16 textId, s16 arg1) {
Flags_SetInfTable(0xC);
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(0x4);
Flags_SetInfTable(0xE);
return;
@ -5431,7 +5433,8 @@ s32 func_80037CB8(GlobalContext* globalCtx, Actor* actor, s16 arg2) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(globalCtx) && func_80037C94(globalCtx, 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;
}