summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-03-30 19:53:47 +1100
committerGitHub <noreply@github.com>2023-03-30 19:53:47 +1100
commit6685a4775e440b247f3db62db4162dccbf0775ea (patch)
tree14c20e33d91b6914f272d8301b7c3a0cfb544e01 /src/code
parent045c3537a9bae4fa7fb33985c7834f3c956d42f1 (diff)
Audio `sequence.c` OK and documented (#1201)
* import sequence docs * cleanup * do not need raw hex
Diffstat (limited to 'src/code')
-rw-r--r--src/code/audio_thread_manager.c2
-rw-r--r--src/code/z_demo.c8
-rw-r--r--src/code/z_game_over.c2
-rw-r--r--src/code/z_parameter.c2
-rw-r--r--src/code/z_play.c4
-rw-r--r--src/code/z_scene.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/code/audio_thread_manager.c b/src/code/audio_thread_manager.c
index eca7ddd83..45fbcb87e 100644
--- a/src/code/audio_thread_manager.c
+++ b/src/code/audio_thread_manager.c
@@ -80,7 +80,7 @@ void AudioMgr_ThreadEntry(void* arg) {
Audio_Init();
AudioLoad_SetDmaHandler(DmaMgr_DmaHandler);
- func_801A4D00();
+ Audio_InitSound();
osSendMesg(&audioMgr->lockMsgQ, NULL, OS_MESG_BLOCK);
IrqMgr_AddClient(audioMgr->irqMgr, &irqClient, &audioMgr->interruptMsgQ);
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index c3e3ecff0..2628658f6 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -396,9 +396,9 @@ void Cutscene_Command_FadeSequence(PlayState* play, CutsceneContext* csCtx, CsCm
u8 fadeTimer = cmd->endFrame - cmd->startFrame;
if (cmd->type == 2) {
- Audio_QueueSeqCmd((fadeTimer << 0x10) | 0x110000FF);
+ SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, fadeTimer);
} else {
- Audio_QueueSeqCmd((fadeTimer << 0x10) | NA_BGM_STOP);
+ SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, fadeTimer);
}
}
}
@@ -471,7 +471,7 @@ void func_800EADB0(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
break;
case 7:
- seqId = Audio_GetActiveSequence(SEQ_PLAYER_BGM_MAIN);
+ seqId = AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
break;
case 8:
@@ -492,7 +492,7 @@ void Cutscene_Command_FadeAmbienceSequence(PlayState* play, CutsceneContext* csC
if (csCtx->frames == cmd->startFrame && csCtx->frames < cmd->endFrame) {
u8 fadeTimer = cmd->endFrame - cmd->startFrame;
- Audio_QueueSeqCmd((fadeTimer << 0x10) | 0x140000FF);
+ SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_AMBIENCE, fadeTimer);
}
}
diff --git a/src/code/z_game_over.c b/src/code/z_game_over.c
index 01eaf2cd8..4e24eb72e 100644
--- a/src/code/z_game_over.c
+++ b/src/code/z_game_over.c
@@ -73,7 +73,7 @@ void GameOver_Update(PlayState* play) {
break;
case GAMEOVER_DEATH_FADE_OUT:
- if (Audio_GetActiveSequence(SEQ_PLAYER_FANFARE) != NA_BGM_GAME_OVER) {
+ if (AudioSeq_GetActiveSeqId(SEQ_PLAYER_FANFARE) != NA_BGM_GAME_OVER) {
func_80169F78(&play->state);
if (gSaveContext.respawnFlag != -7) {
gSaveContext.respawnFlag = -6;
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index 5f5440a2f..cb4a296d4 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -4324,7 +4324,7 @@ void Interface_DrawPerfectLetters(PlayState* play) {
void Interface_StartMoonCrash(PlayState* play) {
if (play->actorCtx.flags & ACTORCTX_FLAG_1) {
- Audio_QueueSeqCmd(0xE0000100);
+ SEQCMD_DISABLE_PLAY_SEQUENCES(false);
}
gSaveContext.save.day = 4;
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 52146a121..ea86b2e82 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -572,7 +572,7 @@ void Play_UpdateTransition(PlayState* this) {
((this->nextEntrance == ENTRANCE(TERMINA_FIELD, 2)) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) ||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20))) &&
(!func_800FE590(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
- (Audio_GetActiveSequence(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS))) {
+ (AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS))) {
func_801A4058(20);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
@@ -585,7 +585,7 @@ void Play_UpdateTransition(PlayState* this) {
}
if (func_800FE590(this) && (Entrance_GetSceneId(this->nextEntrance + sceneLayer) >= 0) &&
- (Audio_GetActiveSequence(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS)) {
+ (AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS)) {
func_801A41C8(20);
}
}
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index 1db125af2..1fa3ed54a 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -444,7 +444,7 @@ void Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd) {
play->sequenceCtx.ambienceId = cmd->soundSettings.ambienceId;
if (gSaveContext.seqId == (u8)NA_BGM_DISABLED ||
- Audio_GetActiveSequence(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS) {
+ AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) == NA_BGM_FINAL_HOURS) {
Audio_SetSpec(cmd->soundSettings.specId);
}
}