Audio Sfx (code_801A5BD0 and selected sfx functions in code_8019AF00.c) OK and Documented (#798)

* Rename functions

* code_801A5BD0 OK

* PR 1, improve spacing

* Rename unused struct

* Rename Sfx Variables

* PR Feedback, update names

* Add comment

* cleanup vars

* Fix merge

* Rework documentation, include more functions in sfx system

* PR suggestions

* fix AudioSfx_MuteBanks

* missed enum

* more cleanup

* more suggestions
This commit is contained in:
engineer124
2022-08-15 14:39:57 -04:00
committed by GitHub
parent 0082c299c6
commit 82fe521721
47 changed files with 2739 additions and 1284 deletions
+5 -3
View File
@@ -2127,7 +2127,8 @@ void func_800B8E58(Player* player, u16 sfxId) {
if (player->currentMask == PLAYER_MASK_GIANT) {
func_8019F170(&player->actor.projectedPos, sfxId);
} else {
Audio_PlaySfxGeneral(sfxId, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &gSfxDefaultReverb);
AudioSfx_PlaySfx(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
}
@@ -2567,7 +2568,8 @@ void func_800B9D1C(Actor* actor) {
if (sfxId != 0) {
if (actor->audioFlags & 2) {
Audio_PlaySfxGeneral(sfxId, &actor->projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &gSfxDefaultReverb);
AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (actor->audioFlags & 4) {
play_sound(sfxId);
} else if (actor->audioFlags & 8) {
@@ -3338,7 +3340,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
actorCtx->targetContext.bgmEnemy = NULL;
}
Audio_StopSfxByPos(&actor->projectedPos);
AudioSfx_StopByPos(&actor->projectedPos);
Actor_Destroy(actor, play);
newHead = Actor_RemoveFromCategory(play, actorCtx, actor);