1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00

Document code_800C3C20: Audio_StopAllSfx (#1309)

* Document code_800C3C20

* Associate it with AudioMgr to separate it from the audio library
This commit is contained in:
engineer124 2022-07-04 11:51:38 -04:00 committed by GitHub
parent ed0ab877c9
commit f2d4c3b10b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -1557,7 +1557,7 @@ u32 THA_IsCrash(TwoHeadArena* tha);
void THA_Init(TwoHeadArena* tha);
void THA_Ct(TwoHeadArena* tha, void* ptr, u32 size);
void THA_Dt(TwoHeadArena* tha);
void func_800C3C20(void);
void AudioMgr_StopAllSfx(void);
void func_800C3C80(AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);
void AudioMgr_HandlePreNMI(AudioMgr* audioMgr);

View file

@ -1,13 +1,13 @@
#include "global.h"
u8 D_8012D200[] = {
0, 1, 2, 3, 4, 5, 6,
u8 sSfxBankIds[] = {
BANK_PLAYER, BANK_ITEM, BANK_ENV, BANK_ENEMY, BANK_SYSTEM, BANK_OCARINA, BANK_VOICE,
};
void func_800C3C20(void) {
s32 i;
void AudioMgr_StopAllSfx(void) {
u32 i;
for (i = 0; (i < ARRAY_COUNT(D_8012D200)) & 0xFFFFFFFF; i++) {
Audio_StopSfxByBank(D_8012D200[i]);
for (i = 0; (u32)(i < ARRAY_COUNT(sSfxBankIds)); i++) {
Audio_StopSfxByBank(sSfxBankIds[i]);
}
}

View file

@ -424,7 +424,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
void GameState_Destroy(GameState* gameState) {
osSyncPrintf("game デストラクタ開始\n"); // "game destructor start"
func_800C3C20();
AudioMgr_StopAllSfx();
func_800F3054();
osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
LogUtils_CheckNullPointer("this->cleanup", gameState->destroy, "../game.c", 1139);