diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2022-07-04 11:51:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-04 11:51:38 -0400 |
| commit | f2d4c3b10bed4f5b515f6396baf49e5c24eef684 (patch) | |
| tree | 3136e3bf8deda4a36afca38228ca437fea70024a /src/code | |
| parent | ed0ab877c9f250c233be6ec9a9e83425cc1a827d (diff) | |
Document code_800C3C20: Audio_StopAllSfx (#1309)
* Document code_800C3C20
* Associate it with AudioMgr to separate it from the audio library
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/code_800C3C20.c | 12 | ||||
| -rw-r--r-- | src/code/game.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/code/code_800C3C20.c b/src/code/code_800C3C20.c index bd3b37850..8384ab2e9 100644 --- a/src/code/code_800C3C20.c +++ b/src/code/code_800C3C20.c @@ -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]); } } diff --git a/src/code/game.c b/src/code/game.c index 34a7c59b4..053c836ff 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -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); |
