mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 15:16:13 +00:00
Audio Sequence Player Ids Enum (#1040)
* bgm.h -> sequence.h * First round of filling in enum * More * seqCmd * format
This commit is contained in:
parent
d9c1dffe09
commit
783ef3a117
35 changed files with 413 additions and 393 deletions
|
@ -117,4 +117,11 @@
|
|||
#define NA_BGM_NATURE_SFX_RAIN 0x80 // Related to rain
|
||||
#define NA_BGM_DISABLED 0xFFFF
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SEQ_PLAYER_BGM_MAIN,
|
||||
/* 1 */ SEQ_PLAYER_FANFARE,
|
||||
/* 2 */ SEQ_PLAYER_SFX,
|
||||
/* 3 */ SEQ_PLAYER_BGM_SUB
|
||||
} SequencePlayerId;
|
||||
|
||||
#endif
|
|
@ -23,7 +23,7 @@
|
|||
#include "z64map_mark.h"
|
||||
#include "z64transition.h"
|
||||
#include "z64interface.h"
|
||||
#include "bgm.h"
|
||||
#include "sequence.h"
|
||||
#include "sfx.h"
|
||||
#include "color.h"
|
||||
#include "ichain.h"
|
||||
|
|
|
@ -562,8 +562,8 @@ s8 func_800E6070(s32 playerIdx, s32 channelIdx, s32 scriptIdx) {
|
|||
}
|
||||
}
|
||||
|
||||
s8 func_800E60C4(s32 arg0, s32 arg1) {
|
||||
return gAudioContext.seqPlayers[arg0].soundScriptIO[arg1];
|
||||
s8 func_800E60C4(s32 playerIdx, s32 arg1) {
|
||||
return gAudioContext.seqPlayers[playerIdx].soundScriptIO[arg1];
|
||||
}
|
||||
|
||||
void Audio_InitExternalPool(void* mem, u32 size) {
|
||||
|
@ -723,7 +723,7 @@ void Audio_WaitForAudioTask(void) {
|
|||
osRecvMesg(gAudioContext.taskStartQueueP, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
s32 func_800E6590(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 func_800E6590(s32 playerIdx, s32 arg1, s32 arg2) {
|
||||
SequencePlayer* seqPlayer;
|
||||
SequenceLayer* layer;
|
||||
Note* note;
|
||||
|
@ -731,7 +731,7 @@ s32 func_800E6590(s32 arg0, s32 arg1, s32 arg2) {
|
|||
s32 loopEnd;
|
||||
s32 samplePos;
|
||||
|
||||
seqPlayer = &gAudioContext.seqPlayers[arg0];
|
||||
seqPlayer = &gAudioContext.seqPlayers[playerIdx];
|
||||
if (seqPlayer->enabled && seqPlayer->channels[arg1]->enabled) {
|
||||
layer = seqPlayer->channels[arg1]->layers[arg2];
|
||||
if (layer == NULL) {
|
||||
|
|
|
@ -966,15 +966,15 @@ void func_800ED458(s32 arg0) {
|
|||
D_80130F24 = Audio_OcaAdjStick(D_80130F2C);
|
||||
|
||||
D_80130F34 = (sCurOcaStick.x < 0 ? -sCurOcaStick.x : sCurOcaStick.x) >> 2;
|
||||
Audio_QueueCmdS8(0x6020D06, D_80130F34);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD06, D_80130F34);
|
||||
} else {
|
||||
D_80130F2C = 0;
|
||||
D_80130F24 = 1.0f;
|
||||
}
|
||||
|
||||
if ((sCurOcarinaBtnVal != 0xFF) && (sPrevOcarinaNoteVal != sCurOcarinaBtnVal)) {
|
||||
Audio_QueueCmdS8(0x6020D07, D_80130F10 - 1);
|
||||
Audio_QueueCmdS8(0x6020D05, sCurOcarinaBtnVal);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sCurOcarinaBtnVal);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &D_80130F24, &D_80130F28, &D_801333E8);
|
||||
} else if ((sPrevOcarinaNoteVal != 0xFF) && (sCurOcarinaBtnVal == 0xFF)) {
|
||||
Audio_StopSfxById(NA_SE_OC_OCARINA);
|
||||
|
@ -991,7 +991,7 @@ void Audio_OcaSetInstrument(u8 arg0) {
|
|||
return;
|
||||
}
|
||||
|
||||
Audio_SeqCmd8(2, 1, SFX_PLAYER_CHANNEL_OCARINA, arg0);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_SFX, 1, SFX_PLAYER_CHANNEL_OCARINA, arg0);
|
||||
D_80130F10 = arg0;
|
||||
if (arg0 == 0) {
|
||||
sCurOcarinaBtnPress = 0;
|
||||
|
@ -1084,7 +1084,7 @@ void Audio_OcaPlayback(void) {
|
|||
|
||||
if (sNotePlaybackVibrato != sPlaybackSong[sPlaybackNotePos].vibrato) {
|
||||
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
|
||||
Audio_QueueCmdS8(0x06020D06, sNotePlaybackVibrato);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD06, sNotePlaybackVibrato);
|
||||
}
|
||||
|
||||
if (sNotePlaybackTone != sPlaybackSong[sPlaybackNotePos].tone) {
|
||||
|
@ -1108,8 +1108,8 @@ void Audio_OcaPlayback(void) {
|
|||
|
||||
if (sDisplayedNoteValue != 0xFF) {
|
||||
sStaffPlaybackPos++;
|
||||
Audio_QueueCmdS8(0x6020D07, D_80130F10 - 1);
|
||||
Audio_QueueCmdS8(0x6020D05, sDisplayedNoteValue & 0x3F);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sDisplayedNoteValue & 0x3F);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &sNormalizedNotePlaybackTone,
|
||||
&sNormalizedNotePlaybackVolume, &D_801333E8);
|
||||
} else {
|
||||
|
@ -1528,7 +1528,7 @@ char sAudioSfxSwapModeNames[2][5] = { "SWAP", "ADD" };
|
|||
u8 sAudioSfxParamChgSel = 0;
|
||||
u8 sAudioSfxParamChgBitSel = 0;
|
||||
u16 sAudioSfxParamChgWork[4] = { 0 };
|
||||
u8 sAudioSubTrackInfoPlayerSel = 0;
|
||||
u8 sAudioSubTrackInfoPlayerSel = SEQ_PLAYER_BGM_MAIN;
|
||||
u8 sAudioSubTrackInfoChannelSel = 0;
|
||||
u8 sSeqPlayerPeakNumLayers[20] = { 0 };
|
||||
char sAudioSceneNames[3][2] = { "A", "S", "X" };
|
||||
|
@ -1716,7 +1716,7 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
for (k2 = 0; k2 < gChannelsPerBank[gSfxChannelLayout][k]; k2++) {
|
||||
#define entryIndex (gActiveSounds[k][k2].entryIndex)
|
||||
#define entry (&gSoundBanks[k][entryIndex])
|
||||
#define chan (gAudioContext.seqPlayers[2].channels[entry->channelIdx])
|
||||
#define chan (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[entry->channelIdx])
|
||||
GfxPrint_SetPos(printer, 2 + sAudioIntInfoX, 5 + ind + sAudioIntInfoY);
|
||||
if (sAudioIntInfoBankPage[k] == 1) {
|
||||
if ((entryIndex != 0xFF) &&
|
||||
|
@ -2101,30 +2101,35 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
|
||||
SETCOL(255, 255, 255);
|
||||
GfxPrint_SetPos(printer, 3, 7);
|
||||
GfxPrint_Printf(printer, "NEXT SCENE %02X %s", (u8)gAudioContext.seqPlayers[0].soundScriptIO[2],
|
||||
sAudioSceneNames[(u8)gAudioContext.seqPlayers[0].soundScriptIO[2]]);
|
||||
GfxPrint_Printf(printer, "NEXT SCENE %02X %s",
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[2],
|
||||
sAudioSceneNames[(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[2]]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 8);
|
||||
GfxPrint_Printf(printer, "NOW SCENE %02X %s", (u8)gAudioContext.seqPlayers[0].soundScriptIO[4],
|
||||
sAudioSceneNames[(u8)gAudioContext.seqPlayers[0].soundScriptIO[4]]);
|
||||
GfxPrint_Printf(printer, "NOW SCENE %02X %s",
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[4],
|
||||
sAudioSceneNames[(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[4]]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 9);
|
||||
GfxPrint_Printf(printer, "NOW BLOCK %02X", (gAudioContext.seqPlayers[0].soundScriptIO[5] + 1) & 0xFF);
|
||||
GfxPrint_Printf(printer, "NOW BLOCK %02X",
|
||||
(gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[5] + 1) & 0xFF);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 11);
|
||||
GfxPrint_Printf(printer, "PORT");
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 12);
|
||||
GfxPrint_Printf(printer, "%02X %02X %02X %02X", (u8)gAudioContext.seqPlayers[0].soundScriptIO[0],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[1],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[2],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[3]);
|
||||
GfxPrint_Printf(printer, "%02X %02X %02X %02X",
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[0],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[1],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[2],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[3]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 13);
|
||||
GfxPrint_Printf(printer, "%02X %02X %02X %02X", (u8)gAudioContext.seqPlayers[0].soundScriptIO[4],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[5],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[6],
|
||||
(u8)gAudioContext.seqPlayers[0].soundScriptIO[7]);
|
||||
GfxPrint_Printf(printer, "%02X %02X %02X %02X",
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[4],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[5],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[6],
|
||||
(u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[7]);
|
||||
break;
|
||||
|
||||
case PAGE_OCARINA_TEST:
|
||||
|
@ -2329,10 +2334,10 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
|
||||
break;
|
||||
case 5:
|
||||
Audio_SeqCmdE01(0, sAudioSndContWork[sAudioSndContSel]);
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[sAudioSndContSel]);
|
||||
break;
|
||||
case 6:
|
||||
Audio_SeqCmdF(0, sAudioSndContWork[sAudioSndContSel]);
|
||||
Audio_SeqCmdF(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[sAudioSndContSel]);
|
||||
sAudioSubTrackInfoSpec = sAudioSndContWork[6];
|
||||
if (sAudioSubTrackInfoPlayerSel > gAudioSpecs[sAudioSubTrackInfoSpec].numSequencePlayers - 1) {
|
||||
sAudioSubTrackInfoPlayerSel = gAudioSpecs[sAudioSubTrackInfoSpec].numSequencePlayers - 1;
|
||||
|
@ -2357,7 +2362,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
Audio_SeqCmd1(sAudioSndContSel, 0);
|
||||
break;
|
||||
case 7:
|
||||
Audio_SeqCmd1(0, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
|
@ -2596,7 +2601,7 @@ void AudioDebug_ProcessInput_SubTrackInfo(void) {
|
|||
if (sAudioSubTrackInfoPlayerSel < gAudioSpecs[sAudioSubTrackInfoSpec].numSequencePlayers - 1) {
|
||||
sAudioSubTrackInfoPlayerSel++;
|
||||
} else {
|
||||
sAudioSubTrackInfoPlayerSel = 0;
|
||||
sAudioSubTrackInfoPlayerSel = SEQ_PLAYER_BGM_MAIN;
|
||||
}
|
||||
}
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_DLEFT)) {
|
||||
|
@ -2606,7 +2611,7 @@ void AudioDebug_ProcessInput_SubTrackInfo(void) {
|
|||
sAudioSubTrackInfoChannelSel = (sAudioSubTrackInfoChannelSel + 1) & 0xF;
|
||||
}
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_START)) {
|
||||
sSeqPlayerPeakNumLayers[sAudioSubTrackInfoPlayerSel] = 0;
|
||||
sSeqPlayerPeakNumLayers[sAudioSubTrackInfoPlayerSel] = SEQ_PLAYER_BGM_MAIN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2646,7 +2651,7 @@ void AudioDebug_ProcessInput_BlkChgBgm(void) {
|
|||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
Audio_QueueCmdS8(MK_CMD(0x46, 0x00, 0x00, 0x00), sAudioBlkChgBgmWork[1]);
|
||||
Audio_QueueCmdS8(MK_CMD(0x46, SEQ_PLAYER_BGM_MAIN, 0x00, 0x00), sAudioBlkChgBgmWork[1]);
|
||||
Audio_QueueSeqCmd(sAudioBlkChgBgmWork[0] | 0x10000);
|
||||
}
|
||||
|
||||
|
@ -2802,12 +2807,12 @@ void AudioDebug_ProcessInput(void) {
|
|||
case PAGE_NON:
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
sAudioSndContWork[5] ^= 1;
|
||||
Audio_SeqCmdE01(0, sAudioSndContWork[5]);
|
||||
if (func_800FA0B4(0) != NA_BGM_NATURE_BACKGROUND) {
|
||||
Audio_SeqCmd1(0, 0);
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, sAudioSndContWork[5]);
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_BACKGROUND) {
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
Audio_SeqCmd1(1, 0);
|
||||
Audio_SeqCmd1(3, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, 0);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
|
@ -2887,7 +2892,7 @@ void func_800F3140(UNK_TYPE arg0, UNK_TYPE arg1) {
|
|||
}
|
||||
|
||||
void func_800F314C(s8 arg0) {
|
||||
Audio_QueueCmdS32(0x82000000 | (((u8)arg0 & 0xFF) << 8), 1);
|
||||
Audio_QueueCmdS32(0x82 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | (((u8)arg0 & 0xFF) << 8), 1);
|
||||
}
|
||||
|
||||
f32 Audio_ComputeSoundVolume(u8 bankId, u8 entryIdx) {
|
||||
|
@ -2949,9 +2954,9 @@ s8 Audio_ComputeSoundReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[2].channels[channelIdx])) {
|
||||
scriptAdd = gAudioContext.seqPlayers[2].channels[channelIdx]->soundScriptIO[1];
|
||||
if (gAudioContext.seqPlayers[2].channels[channelIdx]->soundScriptIO[1] < 0) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIdx])) {
|
||||
scriptAdd = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIdx]->soundScriptIO[1];
|
||||
if (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIdx]->soundScriptIO[1] < 0) {
|
||||
scriptAdd = 0;
|
||||
}
|
||||
}
|
||||
|
@ -3195,33 +3200,33 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
|||
}
|
||||
|
||||
// CHAN_UPD_SCRIPT_IO (slot 2, sets volume)
|
||||
Audio_QueueCmdS8(0x6020000 | (channelIdx << 8) | 2, volS8);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8) | 2, volS8);
|
||||
if (reverb != sSfxChannelState[channelIdx].reverb) {
|
||||
Audio_QueueCmdS8(0x5020000 | (channelIdx << 8), reverb);
|
||||
Audio_QueueCmdS8(0x5 << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), reverb);
|
||||
sSfxChannelState[channelIdx].reverb = reverb;
|
||||
}
|
||||
if (freqScale != sSfxChannelState[channelIdx].freqScale) {
|
||||
Audio_QueueCmdF32(0x4020000 | (channelIdx << 8), freqScale);
|
||||
Audio_QueueCmdF32(0x4 << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), freqScale);
|
||||
sSfxChannelState[channelIdx].freqScale = freqScale;
|
||||
}
|
||||
if (stereoBits != sSfxChannelState[channelIdx].stereoBits) {
|
||||
Audio_QueueCmdS8(0xE020000 | (channelIdx << 8), stereoBits | 0x10);
|
||||
Audio_QueueCmdS8(0xE << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), stereoBits | 0x10);
|
||||
sSfxChannelState[channelIdx].stereoBits = stereoBits;
|
||||
}
|
||||
if (filter != sSfxChannelState[channelIdx].filter) {
|
||||
// CHAN_UPD_SCRIPT_IO (slot 3, sets filter)
|
||||
Audio_QueueCmdS8(0x6020000 | (channelIdx << 8) | 3, filter);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8) | 3, filter);
|
||||
sSfxChannelState[channelIdx].filter = filter;
|
||||
}
|
||||
if (sp38 != sSfxChannelState[channelIdx].unk_0C) {
|
||||
// CHAN_UPD_UNK_0F
|
||||
Audio_QueueCmdS8(0xC020000 | (channelIdx << 8), 0x10);
|
||||
Audio_QueueCmdS8(0xC << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), 0x10);
|
||||
// CHAN_UPD_UNK_20
|
||||
Audio_QueueCmdU16(0xD020000 | (channelIdx << 8), ((u16)(sp38) << 8) + 0xFF);
|
||||
Audio_QueueCmdU16(0xD << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), ((u16)(sp38) << 8) + 0xFF);
|
||||
sSfxChannelState[channelIdx].unk_0C = sp38;
|
||||
}
|
||||
if (panSigned != sSfxChannelState[channelIdx].panSigned) {
|
||||
Audio_QueueCmdS8(0x3020000 | (channelIdx << 8), panSigned);
|
||||
Audio_QueueCmdS8(0x3 << 24 | SEQ_PLAYER_SFX << 16 | (channelIdx << 8), panSigned);
|
||||
sSfxChannelState[channelIdx].panSigned = panSigned;
|
||||
}
|
||||
}
|
||||
|
@ -3248,8 +3253,8 @@ void Audio_ResetSfxChannelState(void) {
|
|||
|
||||
void func_800F3F3C(u8 arg0) {
|
||||
if (gSoundBankMuted[0] != 1) {
|
||||
Audio_StartSeq(3, 0, NA_BGM_VARIOUS_SFX);
|
||||
Audio_SeqCmd8(3, 0, 0, arg0);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 0, NA_BGM_VARIOUS_SFX);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_SUB, 0, 0, arg0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3413,17 +3418,17 @@ void Audio_StepFreqLerp(FreqLerp* lerp) {
|
|||
}
|
||||
|
||||
void func_800F47BC(void) {
|
||||
Audio_SetVolScale(0, 1, 0, 10);
|
||||
Audio_SetVolScale(3, 1, 0, 10);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 10);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 10);
|
||||
}
|
||||
|
||||
void func_800F47FC(void) {
|
||||
Audio_SetVolScale(0, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(3, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0x7F, 3);
|
||||
}
|
||||
|
||||
void func_800F483C(u8 targetVol, u8 volFadeTimer) {
|
||||
Audio_SetVolScale(0, 0, targetVol, volFadeTimer);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, targetVol, volFadeTimer);
|
||||
}
|
||||
|
||||
void func_800F4870(u8 arg0) {
|
||||
|
@ -3437,7 +3442,8 @@ void func_800F4870(u8 arg0) {
|
|||
|
||||
for (i = 0; i < 16; i++) {
|
||||
// CHAN_UPD_PAN_UNSIGNED
|
||||
Audio_QueueCmdS8(_SHIFTL(0x07, 24, 8) | _SHIFTL(0x00, 16, 8) | _SHIFTL(i, 8, 8) | _SHIFTL(0, 0, 8), pan);
|
||||
Audio_QueueCmdS8(
|
||||
_SHIFTL(0x7, 24, 8) | _SHIFTL(SEQ_PLAYER_BGM_MAIN, 16, 8) | _SHIFTL(i, 8, 8) | _SHIFTL(0, 0, 8), pan);
|
||||
}
|
||||
|
||||
if (arg0 == 7) {
|
||||
|
@ -3454,24 +3460,27 @@ s32 Audio_SetGanonDistVol(u8 targetVol) {
|
|||
u8 i;
|
||||
|
||||
if (sAudioGanonDistVol != targetVol) {
|
||||
Audio_SetVolScale(0, 0, targetVol, 2);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, targetVol, 2);
|
||||
if (targetVol < 0x40) {
|
||||
phi_v0 = 0x10;
|
||||
} else {
|
||||
phi_v0 = (((targetVol - 0x40) >> 2) + 1) << 4;
|
||||
}
|
||||
|
||||
Audio_SeqCmd8(0, 4, 15, phi_v0);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, 4, 15, phi_v0);
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
if (gAudioContext.seqPlayers[0].channels[i] != &gAudioContext.sequenceChannelNone) {
|
||||
if ((u8)gAudioContext.seqPlayers[0].channels[i]->soundScriptIO[5] != 0xFF) {
|
||||
if (gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].channels[i] != &gAudioContext.sequenceChannelNone) {
|
||||
if ((u8)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].channels[i]->soundScriptIO[5] != 0xFF) {
|
||||
// this looks like some kind of macro?
|
||||
phi_v0_2 = ((u16)gAudioContext.seqPlayers[0].channels[i]->soundScriptIO[5] - targetVol) + 0x7F;
|
||||
phi_v0_2 =
|
||||
((u16)gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].channels[i]->soundScriptIO[5] - targetVol) +
|
||||
0x7F;
|
||||
if (phi_v0_2 >= 0x80) {
|
||||
phi_v0_2 = 0x7F;
|
||||
}
|
||||
// CHAN_UPD_REVERB
|
||||
Audio_QueueCmdS8(_SHIFTL(5, 24, 8) | _SHIFTL(0, 16, 8) | _SHIFTL(i, 8, 8) | _SHIFTL(0, 0, 8),
|
||||
Audio_QueueCmdS8(_SHIFTL(0x5, 24, 8) | _SHIFTL(SEQ_PLAYER_BGM_MAIN, 16, 8) | _SHIFTL(i, 8, 8) |
|
||||
_SHIFTL(0, 0, 8),
|
||||
(u8)phi_v0_2);
|
||||
}
|
||||
}
|
||||
|
@ -3489,13 +3498,13 @@ void func_800F4A54(u8 arg0) {
|
|||
void func_800F4A70(void) {
|
||||
if (D_8016B8B2 == 1) {
|
||||
if (D_8016B8B1 != D_8016B8B0) {
|
||||
Audio_SetVolScale(0, 0, D_8016B8B0, 0xA);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, D_8016B8B0, 0xA);
|
||||
D_8016B8B1 = D_8016B8B0;
|
||||
D_8016B8B3 = 1;
|
||||
}
|
||||
D_8016B8B2 = 0;
|
||||
} else if (D_8016B8B3 == 1 && D_80130608 == 0) {
|
||||
Audio_SetVolScale(0, 0, 0x7F, 0xA);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, 0x7F, 0xA);
|
||||
D_8016B8B1 = 0x7F;
|
||||
D_8016B8B3 = 0;
|
||||
}
|
||||
|
@ -3538,7 +3547,8 @@ void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
|
|||
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
|
||||
if ((gActiveSounds[bankId][i].entryIndex != 0xFF) &&
|
||||
(sfxId == gSoundBanks[bankId][gActiveSounds[bankId][i].entryIndex].sfxId)) {
|
||||
Audio_QueueCmdS8(_SHIFTL(6, 24, 8) | _SHIFTL(2, 16, 8) | _SHIFTL(phi_s1, 8, 8) | _SHIFTL(6, 0, 8), arg2);
|
||||
Audio_QueueCmdS8(
|
||||
_SHIFTL(0x6, 24, 8) | _SHIFTL(SEQ_PLAYER_SFX, 16, 8) | _SHIFTL(phi_s1, 8, 8) | _SHIFTL(6, 0, 8), arg2);
|
||||
}
|
||||
phi_s1++;
|
||||
}
|
||||
|
@ -3580,8 +3590,8 @@ void func_800F4E30(Vec3f* pos, f32 arg1) {
|
|||
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
if (i != 9) {
|
||||
Audio_SeqCmd6(0, 2, i, (127.0f * phi_f22));
|
||||
Audio_QueueCmdS8(0x03000000 | ((u8)((u32)i) << 8), phi_s4);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 2, i, (127.0f * phi_f22));
|
||||
Audio_QueueCmdS8(0x3 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | ((u8)((u32)i) << 8), phi_s4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3602,11 +3612,12 @@ void func_800F510C(s8 volSplit) {
|
|||
u8 vol;
|
||||
u8 prio;
|
||||
u16 channelBits;
|
||||
u8 players[2] = { 0, 3 };
|
||||
u8 players[2] = { SEQ_PLAYER_BGM_MAIN, SEQ_PLAYER_BGM_SUB };
|
||||
u8 i;
|
||||
u8 j;
|
||||
|
||||
if ((func_800FA0B4(1) == NA_BGM_DISABLED) && (func_800FA0B4(3) != NA_BGM_LONLON)) {
|
||||
if ((func_800FA0B4(SEQ_PLAYER_FANFARE) == NA_BGM_DISABLED) &&
|
||||
(func_800FA0B4(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON)) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (i == 0) {
|
||||
vol = volSplit;
|
||||
|
@ -3648,7 +3659,7 @@ void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax) {
|
|||
dist = sqrtf(SQ(pos->z) + SQ(pos->x));
|
||||
if (sSariaBgmPtr == NULL) {
|
||||
sSariaBgmPtr = pos;
|
||||
func_800F5E18(3, seqId, 0, 7, 2);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_SUB, seqId, 0, 7, 2);
|
||||
} else {
|
||||
prevDist = sqrtf(SQ(sSariaBgmPtr->z) + SQ(sSariaBgmPtr->x));
|
||||
if (dist < prevDist) {
|
||||
|
@ -3676,8 +3687,8 @@ void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax) {
|
|||
func_800F510C(vol);
|
||||
}
|
||||
|
||||
Audio_SetVolScale(3, 3, vol, 0);
|
||||
Audio_SetVolScale(0, 3, 0x7F - vol, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, vol, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F - vol, 0);
|
||||
}
|
||||
|
||||
void Audio_ClearSariaBgm2(void) {
|
||||
|
@ -3686,16 +3697,16 @@ void Audio_ClearSariaBgm2(void) {
|
|||
|
||||
void func_800F5510(u16 seqId) {
|
||||
func_800F5550(seqId);
|
||||
func_800F5E18(0, seqId, 0, 0, 1);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, seqId, 0, 0, 1);
|
||||
}
|
||||
|
||||
void func_800F5550(u16 seqId) {
|
||||
u8 sp27 = 0;
|
||||
u16 nv;
|
||||
|
||||
if (func_800FA0B4(0) != NA_BGM_WINDMILL) {
|
||||
if (func_800FA0B4(3) == NA_BGM_LONLON) {
|
||||
func_800F9474(3, 0);
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_SUB) == NA_BGM_LONLON) {
|
||||
func_800F9474(SEQ_PLAYER_BGM_SUB, 0);
|
||||
Audio_QueueCmdS32(0xF8000000, 0);
|
||||
}
|
||||
|
||||
|
@ -3705,12 +3716,12 @@ void func_800F5550(u16 seqId) {
|
|||
sp27 = 0x1E;
|
||||
}
|
||||
|
||||
func_800F5E18(0, seqId, sp27, 7, D_8013062C);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, seqId, sp27, 7, D_8013062C);
|
||||
|
||||
D_8013062C = 0;
|
||||
} else {
|
||||
nv = (D_80130658[(seqId & 0xFF) & 0xFF] & 0x40) ? 1 : 0xFF;
|
||||
func_800F5E18(0, seqId, 0, 7, nv);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, seqId, 0, 7, nv);
|
||||
if (!(D_80130658[seqId] & 0x20)) {
|
||||
D_8013062C = 0xC0;
|
||||
}
|
||||
|
@ -3723,11 +3734,11 @@ void func_800F56A8(void) {
|
|||
u16 temp_v0;
|
||||
u8 bvar;
|
||||
|
||||
temp_v0 = func_800FA0B4(0);
|
||||
temp_v0 = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
bvar = temp_v0 & 0xFF;
|
||||
if ((temp_v0 != NA_BGM_DISABLED) && ((D_80130658[bvar] & 0x10) != 0)) {
|
||||
if (D_8013062C != 0xC0) {
|
||||
D_8013062C = gAudioContext.seqPlayers->soundScriptIO[3];
|
||||
D_8013062C = gAudioContext.seqPlayers[SEQ_PLAYER_BGM_MAIN].soundScriptIO[3];
|
||||
} else {
|
||||
D_8013062C = 0;
|
||||
}
|
||||
|
@ -3735,23 +3746,23 @@ void func_800F56A8(void) {
|
|||
}
|
||||
|
||||
void func_800F5718(void) {
|
||||
if (func_800FA0B4(0) != NA_BGM_WINDMILL) {
|
||||
Audio_StartSeq(0, 0, NA_BGM_WINDMILL);
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_WINDMILL) {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_WINDMILL);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F574C(f32 arg0, u8 arg2) {
|
||||
if (arg0 == 1.0f) {
|
||||
Audio_SeqCmdB40(0, arg2, 0);
|
||||
Audio_SeqCmdB40(SEQ_PLAYER_BGM_MAIN, arg2, 0);
|
||||
} else {
|
||||
Audio_SeqCmdC(1, 0x30, arg2, arg0 * 100.0f);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x30, arg2, arg0 * 100.0f);
|
||||
}
|
||||
Audio_SeqCmdC(1, 0xA0, arg2, arg0 * 100.0f);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0xA0, arg2, arg0 * 100.0f);
|
||||
}
|
||||
|
||||
void func_800F5918(void) {
|
||||
if (func_800FA0B4(0) == NA_BGM_MINI_GAME_2 && func_800FA11C(0, 0xF0000000)) {
|
||||
Audio_SeqCmdB(0, 5, 0, 0xD2);
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_MINI_GAME_2 && func_800FA11C(0, 0xF0000000)) {
|
||||
Audio_SeqCmdB(SEQ_PLAYER_BGM_MAIN, 5, 0, 0xD2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3761,11 +3772,11 @@ void func_800F595C(u16 arg0) {
|
|||
if (D_80130658[arg0b] & 2) {
|
||||
Audio_PlayFanfare(arg0);
|
||||
} else if (D_80130658[arg0b] & 4) {
|
||||
Audio_StartSeq(1, 0, arg0);
|
||||
Audio_StartSeq(SEQ_PLAYER_FANFARE, 0, arg0);
|
||||
|
||||
} else {
|
||||
func_800F5E18(0, arg0, 0, 7, -1);
|
||||
Audio_SeqCmd1(1, 0);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, arg0, 0, 7, -1);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3773,11 +3784,11 @@ void func_800F59E8(u16 arg0) {
|
|||
u8 arg0b = arg0 & 0xFF;
|
||||
|
||||
if (D_80130658[arg0b] & 2) {
|
||||
Audio_SeqCmd1(1, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
} else if (D_80130658[arg0b] & 4) {
|
||||
Audio_SeqCmd1(1, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
} else {
|
||||
Audio_SeqCmd1(0, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3800,7 +3811,7 @@ s32 func_800F5A58(u8 arg0) {
|
|||
void func_800F5ACC(u16 seqId) {
|
||||
u16 temp_v0;
|
||||
|
||||
temp_v0 = func_800FA0B4(0);
|
||||
temp_v0 = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
if ((temp_v0 & 0xFF) != NA_BGM_GANON_TOWER && (temp_v0 & 0xFF) != NA_BGM_ESCAPE && temp_v0 != seqId) {
|
||||
func_800F5E90(3);
|
||||
if (temp_v0 != NA_BGM_DISABLED) {
|
||||
|
@ -3808,17 +3819,17 @@ void func_800F5ACC(u16 seqId) {
|
|||
} else {
|
||||
osSyncPrintf("Middle Boss BGM Start not stack \n");
|
||||
}
|
||||
Audio_StartSeq(0, 0, seqId);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, seqId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F5B58(void) {
|
||||
if ((func_800FA0B4(0) != NA_BGM_DISABLED) && (D_80130628 != NA_BGM_DISABLED) &&
|
||||
(D_80130658[func_800FA0B4(0) & 0xFF] & 8)) {
|
||||
if ((func_800FA0B4(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) && (D_80130628 != NA_BGM_DISABLED) &&
|
||||
(D_80130658[func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF] & 8)) {
|
||||
if (D_80130628 == NA_BGM_DISABLED) {
|
||||
Audio_SeqCmd1(0, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
} else {
|
||||
Audio_StartSeq(0, 0, D_80130628);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, D_80130628);
|
||||
}
|
||||
D_80130628 = NA_BGM_DISABLED;
|
||||
}
|
||||
|
@ -3827,7 +3838,7 @@ void func_800F5B58(void) {
|
|||
void func_800F5BF0(u8 arg0) {
|
||||
u16 temp_v0;
|
||||
|
||||
temp_v0 = func_800FA0B4(0);
|
||||
temp_v0 = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
if (temp_v0 != NA_BGM_NATURE_BACKGROUND) {
|
||||
D_80130628 = temp_v0;
|
||||
}
|
||||
|
@ -3836,7 +3847,7 @@ void func_800F5BF0(u8 arg0) {
|
|||
|
||||
void func_800F5C2C(void) {
|
||||
if (D_80130628 != NA_BGM_DISABLED) {
|
||||
Audio_StartSeq(0, 0, D_80130628);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, D_80130628);
|
||||
}
|
||||
D_80130628 = NA_BGM_DISABLED;
|
||||
}
|
||||
|
@ -3847,14 +3858,14 @@ void Audio_PlayFanfare(u16 seqId) {
|
|||
u8* sp1C;
|
||||
u8* sp18;
|
||||
|
||||
sp26 = func_800FA0B4(1);
|
||||
sp26 = func_800FA0B4(SEQ_PLAYER_FANFARE);
|
||||
sp1C = func_800E5E84(sp26 & 0xFF, &sp20);
|
||||
sp18 = func_800E5E84(seqId & 0xFF, &sp20);
|
||||
if ((sp26 == NA_BGM_DISABLED) || (*sp1C == *sp18)) {
|
||||
D_8016B9F4 = 1;
|
||||
} else {
|
||||
D_8016B9F4 = 5;
|
||||
Audio_SeqCmd1(1, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, 0);
|
||||
}
|
||||
D_8016B9F6 = seqId;
|
||||
}
|
||||
|
@ -3869,23 +3880,23 @@ void func_800F5CF8(void) {
|
|||
if (D_8016B9F4 == 0) {
|
||||
Audio_QueueCmdS32(0xE3000000, SEQUENCE_TABLE);
|
||||
Audio_QueueCmdS32(0xE3000000, FONT_TABLE);
|
||||
func_800FA0B4(0);
|
||||
sp26 = func_800FA0B4(1);
|
||||
sp22 = func_800FA0B4(3);
|
||||
func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
sp26 = func_800FA0B4(SEQ_PLAYER_FANFARE);
|
||||
sp22 = func_800FA0B4(SEQ_PLAYER_BGM_SUB);
|
||||
if (sp26 == NA_BGM_DISABLED) {
|
||||
Audio_SetVolScale(0, 1, 0, 5);
|
||||
Audio_SetVolScale(3, 1, 0, 5);
|
||||
Audio_SeqCmdC(1, 0x80, 1, 0xA);
|
||||
Audio_SeqCmdC(1, 0x83, 1, 0xA);
|
||||
Audio_SeqCmdC(1, 0x90, 0, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 5);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 5);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x80, 1, 0xA);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x83, 1, 0xA);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x90, 0, 0);
|
||||
if (sp22 != NA_BGM_LONLON) {
|
||||
Audio_SeqCmdC(1, 0x93, 0, 0);
|
||||
Audio_SeqCmdC(SEQ_PLAYER_FANFARE, 0x93, 0, 0);
|
||||
}
|
||||
}
|
||||
Audio_StartSeq(1, 1, D_8016B9F6);
|
||||
Audio_StartSeq(SEQ_PLAYER_FANFARE, 1, D_8016B9F6);
|
||||
Audio_SeqCmdA(0, 0xFFFF);
|
||||
if (sp22 != NA_BGM_LONLON) {
|
||||
Audio_SeqCmdA(3, 0xFFFF);
|
||||
Audio_SeqCmdA(SEQ_PLAYER_BGM_SUB, 0xFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3906,8 +3917,8 @@ void func_800F5E90(u8 arg0) {
|
|||
if (sAudioCutsceneFlag) {
|
||||
arg0 = 3;
|
||||
}
|
||||
phi_t1 = D_8016E750[0].unk_254;
|
||||
if (phi_t1 == NA_BGM_FIELD_LOGIC && func_800FA0B4(3) == (NA_BGM_ENEMY | 0x800)) {
|
||||
phi_t1 = D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254;
|
||||
if (phi_t1 == NA_BGM_FIELD_LOGIC && func_800FA0B4(SEQ_PLAYER_BGM_SUB) == (NA_BGM_ENEMY | 0x800)) {
|
||||
arg0 = 3;
|
||||
}
|
||||
|
||||
|
@ -3915,27 +3926,27 @@ void func_800F5E90(u8 arg0) {
|
|||
if ((phi_t1 == NA_BGM_DISABLED) || ((D_80130658[phi_a3] & 1) != 0) || ((D_8013061C & 0x7F) == 1)) {
|
||||
if (arg0 != (D_8013061C & 0x7F)) {
|
||||
if (arg0 == 1) {
|
||||
if (D_8016E750[3].volScales[1] - sAudioEnemyVol < 0) {
|
||||
phi_t0 = -(D_8016E750[3].volScales[1] - sAudioEnemyVol);
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol < 0) {
|
||||
phi_t0 = -(D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol);
|
||||
} else {
|
||||
phi_t0 = D_8016E750[3].volScales[1] - sAudioEnemyVol;
|
||||
phi_t0 = D_8016E750[SEQ_PLAYER_BGM_SUB].volScales[1] - sAudioEnemyVol;
|
||||
}
|
||||
Audio_SetVolScale(3, 3, sAudioEnemyVol, phi_t0);
|
||||
Audio_StartSeq(3, 10, NA_BGM_ENEMY | 0x800);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, phi_t0);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 10, NA_BGM_ENEMY | 0x800);
|
||||
if (phi_t1 != NA_BGM_NATURE_BACKGROUND) {
|
||||
Audio_SetVolScale(0, 3, (0x7F - sAudioEnemyVol) & 0xFF, 0xA);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol) & 0xFF, 0xA);
|
||||
func_800F510C(sAudioEnemyVol);
|
||||
}
|
||||
} else {
|
||||
if ((D_8013061C & 0x7F) == 1) {
|
||||
Audio_SeqCmd1(3, 10);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, 10);
|
||||
if (arg0 == 3) {
|
||||
phi_a3 = 0;
|
||||
} else {
|
||||
phi_a3 = 10;
|
||||
}
|
||||
|
||||
Audio_SetVolScale(0, 3, 0x7F, phi_a3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F, phi_a3);
|
||||
func_800F510C(0);
|
||||
}
|
||||
}
|
||||
|
@ -3958,7 +3969,7 @@ void func_800F5E90(u8 arg0) {
|
|||
}
|
||||
|
||||
D_8013061C = arg0;
|
||||
Audio_SeqCmd7(0, 2, arg0);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 2, arg0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3977,12 +3988,12 @@ void func_800F6114(f32 dist) {
|
|||
}
|
||||
|
||||
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
|
||||
Audio_SetVolScale(3, 3, sAudioEnemyVol, 0xA);
|
||||
if (D_8016E750[0].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
Audio_SetVolScale(0, 3, (0x7F - sAudioEnemyVol), 0xA);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 3, sAudioEnemyVol, 0xA);
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, (0x7F - sAudioEnemyVol), 0xA);
|
||||
}
|
||||
}
|
||||
if (D_8016E750[0].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) {
|
||||
func_800F510C(sAudioEnemyVol);
|
||||
}
|
||||
}
|
||||
|
@ -3997,7 +4008,7 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
sAudioHasMalonBgm = true;
|
||||
sAudioMalonBgmDist = dist;
|
||||
if (D_8016B9F2 == 0) {
|
||||
temp_a0 = (s8)(func_800FA0B4(0) & 0xFF);
|
||||
temp_a0 = (s8)(func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF);
|
||||
if (temp_a0 == (arg1 & 0xFF)) {
|
||||
if ((arg1 & 0xFF) == NA_BGM_LONLON) {
|
||||
|
||||
|
@ -4009,18 +4020,18 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
phi_v1 = (s8)(((dist - 200.0f) * 127.0f) / 1800.0f);
|
||||
}
|
||||
// Transition volume of channels 0, 1 and 13 on seq player 0 over 3 frames
|
||||
Audio_SeqCmd6(0, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(0, 3, 1, 127 - phi_v1);
|
||||
Audio_SeqCmd6(0, 3, 13, phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 1, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_MAIN, 3, 13, phi_v1);
|
||||
if (D_8016B9D8 == 0) {
|
||||
D_8016B9D8++;
|
||||
}
|
||||
}
|
||||
} else if ((temp_a0 == NA_BGM_NATURE_BACKGROUND) && ((arg1 & 0xFF) == NA_BGM_LONLON)) {
|
||||
temp_a0 = (s8)(func_800FA0B4(3) & 0xFF);
|
||||
temp_a0 = (s8)(func_800FA0B4(SEQ_PLAYER_BGM_SUB) & 0xFF);
|
||||
if ((temp_a0 != (arg1 & 0xFF)) && (D_8016B9D8 < 10)) {
|
||||
func_800F5E18(3, NA_BGM_LONLON, 0, 0, 0);
|
||||
Audio_SeqCmdA(3, 0xFFFC);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_SUB, NA_BGM_LONLON, 0, 0, 0);
|
||||
Audio_SeqCmdA(SEQ_PLAYER_BGM_SUB, 0xFFFC);
|
||||
D_8016B9D8 = 10;
|
||||
}
|
||||
|
||||
|
@ -4032,8 +4043,8 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
phi_v1 = (s8)(((dist - 200.0f) * 127.0f) / 1800.0f);
|
||||
}
|
||||
// Transition volume of channels 0 and 1 on seq player 0 over 3 frames
|
||||
Audio_SeqCmd6(3, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(3, 3, 1, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_SUB, 3, 0, 127 - phi_v1);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_BGM_SUB, 3, 1, 127 - phi_v1);
|
||||
}
|
||||
|
||||
if (D_8016B9D8 < 10) {
|
||||
|
@ -4058,11 +4069,11 @@ void func_800F6584(u8 arg0) {
|
|||
u16 sp34;
|
||||
|
||||
D_8016B9F2 = arg0;
|
||||
if ((func_800FA0B4(0) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = 0;
|
||||
if ((func_800FA0B4(SEQ_PLAYER_BGM_MAIN) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = SEQ_PLAYER_BGM_MAIN;
|
||||
sp34 = 0;
|
||||
} else if ((func_800FA0B4(3) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = 3;
|
||||
} else if ((func_800FA0B4(SEQ_PLAYER_BGM_SUB) & 0xFF) == NA_BGM_LONLON) {
|
||||
playerIdx = SEQ_PLAYER_BGM_SUB;
|
||||
sp34 = 0xFFFC;
|
||||
} else {
|
||||
return;
|
||||
|
@ -4071,16 +4082,16 @@ void func_800F6584(u8 arg0) {
|
|||
if (arg0 != 0) {
|
||||
Audio_SeqCmd6(playerIdx, 1, 0, 0);
|
||||
Audio_SeqCmd6(playerIdx, 1, 1, 0);
|
||||
if (playerIdx == 3) {
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
Audio_SeqCmdA(playerIdx, sp34 | 3);
|
||||
}
|
||||
} else {
|
||||
if (playerIdx == 3) {
|
||||
func_800F5E18(3, NA_BGM_LONLON, 0, 0, 0);
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
func_800F5E18(SEQ_PLAYER_BGM_SUB, NA_BGM_LONLON, 0, 0, 0);
|
||||
}
|
||||
Audio_SeqCmd6(playerIdx, 1, 0, 0x7F);
|
||||
Audio_SeqCmd6(playerIdx, 1, 1, 0x7F);
|
||||
if (playerIdx == 3) {
|
||||
if (playerIdx == SEQ_PLAYER_BGM_SUB) {
|
||||
Audio_SeqCmdA(playerIdx, sp34);
|
||||
}
|
||||
}
|
||||
|
@ -4118,7 +4129,7 @@ void func_800F6700(s8 arg0) {
|
|||
break;
|
||||
}
|
||||
|
||||
Audio_SeqCmdE0(0, sp1F);
|
||||
Audio_SeqCmdE0(SEQ_PLAYER_BGM_MAIN, sp1F);
|
||||
}
|
||||
|
||||
void Audio_SetBaseFilter(u8 filter) {
|
||||
|
@ -4139,11 +4150,11 @@ void Audio_SetExtraFilter(u8 filter) {
|
|||
|
||||
sAudioExtraFilter2 = filter;
|
||||
sAudioExtraFilter = filter;
|
||||
if (D_8016E750[0].unk_254 == NA_BGM_NATURE_BACKGROUND) {
|
||||
if (D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_NATURE_BACKGROUND) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
t = i;
|
||||
// CHAN_UPD_SCRIPT_IO (seq player 0, all channels, slot 6)
|
||||
Audio_QueueCmdS8(0x6000000 | ((t & 0xFF) << 8) | 6, filter);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | ((t & 0xFF) << 8) | 6, filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4166,8 +4177,8 @@ void func_800F6964(u16 arg0) {
|
|||
s32 skip;
|
||||
u8 i;
|
||||
|
||||
Audio_SeqCmd1(0, (arg0 * 3) / 2);
|
||||
Audio_SeqCmd1(1, (arg0 * 3) / 2);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, (arg0 * 3) / 2);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, (arg0 * 3) / 2);
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
skip = false;
|
||||
switch (i) {
|
||||
|
@ -4183,30 +4194,30 @@ void func_800F6964(u16 arg0) {
|
|||
}
|
||||
|
||||
if (!skip) {
|
||||
Audio_SeqCmd6(2, arg0 >> 1, i, 0);
|
||||
Audio_SeqCmd6(SEQ_PLAYER_SFX, arg0 >> 1, i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Audio_SeqCmd1(3, (arg0 * 3) / 2);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, (arg0 * 3) / 2);
|
||||
}
|
||||
|
||||
void func_800F6AB0(u16 arg0) {
|
||||
Audio_SeqCmd1(0, arg0);
|
||||
Audio_SeqCmd1(1, arg0);
|
||||
Audio_SeqCmd1(3, arg0);
|
||||
Audio_SetVolScale(0, 3, 0x7F, 0);
|
||||
Audio_SetVolScale(0, 1, 0x7F, 0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_MAIN, arg0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_FANFARE, arg0);
|
||||
Audio_SeqCmd1(SEQ_PLAYER_BGM_SUB, arg0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 3, 0x7F, 0);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 0);
|
||||
}
|
||||
|
||||
void func_800F6B3C(void) {
|
||||
func_800F9280(2, 0, 0xFF, 5);
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0xFF, 5);
|
||||
}
|
||||
|
||||
void Audio_DisableAllSeq(void) {
|
||||
Audio_DisableSeq(0, 0);
|
||||
Audio_DisableSeq(1, 0);
|
||||
Audio_DisableSeq(2, 0);
|
||||
Audio_DisableSeq(3, 0);
|
||||
Audio_DisableSeq(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
Audio_DisableSeq(SEQ_PLAYER_FANFARE, 0);
|
||||
Audio_DisableSeq(SEQ_PLAYER_SFX, 0);
|
||||
Audio_DisableSeq(SEQ_PLAYER_BGM_SUB, 0);
|
||||
Audio_ScheduleProcessCmds();
|
||||
}
|
||||
|
||||
|
@ -4251,7 +4262,7 @@ void func_800F6C34(void) {
|
|||
sSpecReverb = sSpecReverbs[gAudioSpecId];
|
||||
D_80130608 = 0;
|
||||
D_80130628 = NA_BGM_DISABLED;
|
||||
Audio_QueueCmdS8(0x46000000, -1);
|
||||
Audio_QueueCmdS8(0x46 << 24 | SEQ_PLAYER_BGM_MAIN << 16, -1);
|
||||
sSariaBgmPtr = NULL;
|
||||
D_8016B9F4 = 0;
|
||||
D_8016B9F3 = 1;
|
||||
|
@ -4263,13 +4274,13 @@ void func_800F6D58(u8 arg0, u8 arg1, u8 arg2) {
|
|||
u8 temp_a0;
|
||||
u8 i;
|
||||
|
||||
if ((D_8016E750[0].unk_254 != NA_BGM_NATURE_BACKGROUND) && func_800FA11C(1, 0xF00000FF)) {
|
||||
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 != NA_BGM_NATURE_BACKGROUND) && func_800FA11C(1, 0xF00000FF)) {
|
||||
sAudioNatureFailed = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (((arg0 << 8) + arg1) == 0x101) {
|
||||
if (func_800FA0B4(3) != NA_BGM_LONLON) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_SUB) != NA_BGM_LONLON) {
|
||||
D_8016B9D8 = 0;
|
||||
}
|
||||
}
|
||||
|
@ -4281,7 +4292,7 @@ void func_800F6D58(u8 arg0, u8 arg1, u8 arg2) {
|
|||
}
|
||||
|
||||
for (i = t; i <= temp_a0; i++) {
|
||||
Audio_SeqCmd8(0, arg1, i, arg2);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, arg1, i, arg2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4289,30 +4300,30 @@ void func_800F6E7C(u16 arg0, u16 arg1) {
|
|||
u8 i;
|
||||
u32 t;
|
||||
|
||||
if (func_800FA0B4(0) == NA_BGM_WINDMILL) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_WINDMILL) {
|
||||
func_800F3F3C(0xF);
|
||||
return;
|
||||
}
|
||||
Audio_SeqCmd7(0, 0, 1);
|
||||
Audio_SeqCmd7(0, 4, arg0 >> 8);
|
||||
Audio_SeqCmd7(0, 5, arg0 & 0xFF);
|
||||
Audio_SetVolScale(0, 0, 0x7F, 1);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 0, 1);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 4, arg0 >> 8);
|
||||
Audio_SeqCmd7(SEQ_PLAYER_BGM_MAIN, 5, arg0 & 0xFF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 0, 0x7F, 1);
|
||||
|
||||
i = 0;
|
||||
if (D_80133408 != 0) {
|
||||
i = 1;
|
||||
Audio_SeqCmdE01(0, 0);
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
}
|
||||
|
||||
Audio_StartSeq(0, 0, NA_BGM_NATURE_BACKGROUND);
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_NATURE_BACKGROUND);
|
||||
|
||||
if (i != 0) {
|
||||
Audio_SeqCmdE01(0, 1);
|
||||
Audio_SeqCmdE01(SEQ_PLAYER_BGM_MAIN, 1);
|
||||
}
|
||||
|
||||
for (i = 0; i < 0x10; i++) {
|
||||
if (!(arg1 & (1 << i)) && (arg0 & (1 << i))) {
|
||||
Audio_SeqCmd8(0, 1, i, 1);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, 1, i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4323,17 +4334,18 @@ void func_800F6FB4(u8 arg0) {
|
|||
u8 b1;
|
||||
u8 b2;
|
||||
|
||||
if ((D_8016E750[0].unk_254 == NA_BGM_DISABLED) || ((D_80130658[((u8)D_8016E750[0].unk_254) & 0xFF] & 0x80) == 0)) {
|
||||
if ((D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254 == NA_BGM_DISABLED) ||
|
||||
((D_80130658[((u8)D_8016E750[SEQ_PLAYER_BGM_MAIN].unk_254) & 0xFF] & 0x80) == 0)) {
|
||||
func_800F6E7C(D_801306DC[arg0].unk_00, D_801306DC[arg0].unk_02);
|
||||
while ((D_801306DC[arg0].unk_04[i] != 0xFF) && (i < 100)) {
|
||||
// Probably a fake match, using Audio_SeqCmd8 doesn't work.
|
||||
b0 = D_801306DC[arg0].unk_04[i++];
|
||||
b1 = D_801306DC[arg0].unk_04[i++];
|
||||
b2 = D_801306DC[arg0].unk_04[i++];
|
||||
Audio_QueueSeqCmd(0x80000000 | (b1 << 0x10) | (b0 << 8) | b2);
|
||||
Audio_QueueSeqCmd(0x80000000 | (SEQ_PLAYER_BGM_MAIN << 24) | (b1 << 0x10) | (b0 << 8) | b2);
|
||||
}
|
||||
|
||||
Audio_SeqCmd8(0, 0x07, 13, D_80130604);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_MAIN, 0x07, 13, D_80130604);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4347,11 +4359,11 @@ void Audio_InitSound(void) {
|
|||
Audio_ResetSfxChannelState();
|
||||
func_800FAEB4();
|
||||
Audio_ResetSounds();
|
||||
func_800F9280(2, 0, 0x70, 10);
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 10);
|
||||
}
|
||||
|
||||
void func_800F7170(void) {
|
||||
func_800F9280(2, 0, 0x70, 1);
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
Audio_QueueCmdS32(0xF2000000, 1);
|
||||
Audio_ScheduleProcessCmds();
|
||||
Audio_QueueCmdS32(0xF8000000, 0);
|
||||
|
@ -4371,5 +4383,5 @@ void func_800F7208(void) {
|
|||
Audio_QueueCmdS32(0xF2000000, 1);
|
||||
func_800F6C34();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800F9280(2, 0, 0x70, 1);
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 1);
|
||||
}
|
||||
|
|
|
@ -108,15 +108,15 @@ void Audio_SetSoundBanksMute(u16 muteMask) {
|
|||
|
||||
void Audio_QueueSeqCmdMute(u8 channelIdx) {
|
||||
D_801333D0 |= (1 << channelIdx);
|
||||
Audio_SetVolScale(0, 2, 0x40, 0xF);
|
||||
Audio_SetVolScale(3, 2, 0x40, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 2, 0x40, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 2, 0x40, 0xF);
|
||||
}
|
||||
|
||||
void Audio_ClearBGMMute(u8 channelIdx) {
|
||||
D_801333D0 &= ((1 << channelIdx) ^ 0xFFFF);
|
||||
if (D_801333D0 == 0) {
|
||||
Audio_SetVolScale(0, 2, 0x7F, 0xF);
|
||||
Audio_SetVolScale(3, 2, 0x7F, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 2, 0x7F, 0xF);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 2, 0x7F, 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -496,7 +496,7 @@ void Audio_PlayActiveSounds(u8 bankId) {
|
|||
entryIndex = gActiveSounds[bankId][i].entryIndex;
|
||||
if (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
channel = gAudioContext.seqPlayers[2].channels[sCurSfxPlayerChannelIdx];
|
||||
channel = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[sCurSfxPlayerChannelIdx];
|
||||
if (entry->state == SFX_STATE_READY) {
|
||||
entry->channelIdx = sCurSfxPlayerChannelIdx;
|
||||
if (entry->sfxParams & 8) {
|
||||
|
@ -519,10 +519,11 @@ void Audio_PlayActiveSounds(u8 bankId) {
|
|||
}
|
||||
}
|
||||
Audio_SetSoundProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
|
||||
Audio_QueueCmdS8(0x06020000 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8), 1);
|
||||
Audio_QueueCmdS8(0x06020000 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 4, entry->sfxId & 0xFF);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8), 1);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 4,
|
||||
entry->sfxId & 0xFF);
|
||||
if (gIsLargeSoundBank[bankId]) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 5,
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 5,
|
||||
(entry->sfxId & 0x100) >> 8);
|
||||
}
|
||||
if (entry->sfxId & 0xC00) {
|
||||
|
@ -554,7 +555,7 @@ void Audio_StopSfxByBank(u8 bankId) {
|
|||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
|
@ -574,7 +575,7 @@ void func_800F8884(u8 bankId, Vec3f* pos) {
|
|||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
if (entry->posX == &pos->x) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
|
@ -616,7 +617,7 @@ void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId) {
|
|||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->posX == &pos->x && entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
|
@ -644,7 +645,7 @@ void Audio_StopSfxByTokenAndId(u8 token, u16 sfxId) {
|
|||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->token == token && entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
|
@ -671,7 +672,7 @@ void Audio_StopSfxById(u32 sfxId) {
|
|||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x06020000 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
|
@ -715,7 +716,7 @@ void Audio_StepUnusedBankLerp(u8 bankId) {
|
|||
void func_800F8F88(void) {
|
||||
u8 bankId;
|
||||
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[2].channels[0])) {
|
||||
if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[0])) {
|
||||
sCurSfxPlayerChannelIdx = 0;
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
|
||||
Audio_ChooseActiveSounds(bankId);
|
||||
|
|
|
@ -27,7 +27,7 @@ void func_800F9280(u8 playerIdx, u8 seqId, u8 arg2, u16 fadeTimer) {
|
|||
u16 dur;
|
||||
s32 pad;
|
||||
|
||||
if (D_80133408 == 0 || playerIdx == 2) {
|
||||
if (D_80133408 == 0 || playerIdx == SEQ_PLAYER_SFX) {
|
||||
arg2 &= 0x7F;
|
||||
if (arg2 == 0x7F) {
|
||||
dur = (fadeTimer >> 3) * 60 * gAudioContext.audioBufferParameters.updatesPerFrame;
|
||||
|
@ -60,10 +60,10 @@ void func_800F9280(u8 playerIdx, u8 seqId, u8 arg2, u16 fadeTimer) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_800F9474(u8 arg0, u16 arg1) {
|
||||
Audio_QueueCmdS32(0x83000000 | ((u8)arg0 << 16),
|
||||
void func_800F9474(u8 playerIdx, u16 arg1) {
|
||||
Audio_QueueCmdS32(0x83000000 | ((u8)playerIdx << 16),
|
||||
(arg1 * (u16)gAudioContext.audioBufferParameters.updatesPerFrame) / 4);
|
||||
D_8016E750[arg0].unk_254 = NA_BGM_DISABLED;
|
||||
D_8016E750[playerIdx].unk_254 = NA_BGM_DISABLED;
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
|
@ -387,18 +387,18 @@ s32 func_800FA11C(u32 arg0, u32 arg1) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void func_800FA174(u8 arg0) {
|
||||
D_8016E348[arg0] = 0;
|
||||
void func_800FA174(u8 playerIdx) {
|
||||
D_8016E348[playerIdx] = 0;
|
||||
}
|
||||
|
||||
void func_800FA18C(u8 arg0, u8 arg1) {
|
||||
void func_800FA18C(u8 playeridx, u8 arg1) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < D_8016E750[arg0].unk_4D; i++) {
|
||||
u8 unkb = (D_8016E750[arg0].unk_2C[i] & 0xF00000) >> 20;
|
||||
for (i = 0; i < D_8016E750[playeridx].unk_4D; i++) {
|
||||
u8 unkb = (D_8016E750[playeridx].unk_2C[i] & 0xF00000) >> 20;
|
||||
|
||||
if (unkb == arg1) {
|
||||
D_8016E750[arg0].unk_2C[i] = 0xFF000000;
|
||||
D_8016E750[playeridx].unk_2C[i] = 0xFF000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -435,54 +435,54 @@ void func_800FA3DC(void) {
|
|||
u32 dummy;
|
||||
f32 phi_f0;
|
||||
u8 phi_t0;
|
||||
u8 i;
|
||||
u8 playerIdx;
|
||||
u8 j;
|
||||
u8 k;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (D_8016E750[i].unk_260 != 0) {
|
||||
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
|
||||
if (D_8016E750[playerIdx].unk_260 != 0) {
|
||||
switch (func_800E5E20(&dummy)) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
D_8016E750[i].unk_260 = 0;
|
||||
Audio_ProcessSeqCmd(D_8016E750[i].unk_25C);
|
||||
D_8016E750[playerIdx].unk_260 = 0;
|
||||
Audio_ProcessSeqCmd(D_8016E750[playerIdx].unk_25C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_8016E750[i].fadeVolUpdate) {
|
||||
if (D_8016E750[playerIdx].fadeVolUpdate) {
|
||||
phi_f0 = 1.0f;
|
||||
for (j = 0; j < 4; j++) {
|
||||
phi_f0 *= (D_8016E750[i].volScales[j] / 127.0f);
|
||||
phi_f0 *= (D_8016E750[playerIdx].volScales[j] / 127.0f);
|
||||
}
|
||||
Audio_SeqCmd4(i, D_8016E750[i].volFadeTimer, (u8)(phi_f0 * 127.0f));
|
||||
D_8016E750[i].fadeVolUpdate = 0;
|
||||
Audio_SeqCmd4(playerIdx, D_8016E750[playerIdx].volFadeTimer, (u8)(phi_f0 * 127.0f));
|
||||
D_8016E750[playerIdx].fadeVolUpdate = 0;
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_0C != 0) {
|
||||
D_8016E750[i].unk_0C--;
|
||||
if (D_8016E750[playerIdx].unk_0C != 0) {
|
||||
D_8016E750[playerIdx].unk_0C--;
|
||||
|
||||
if (D_8016E750[i].unk_0C != 0) {
|
||||
D_8016E750[i].volCur = D_8016E750[i].volCur - D_8016E750[i].unk_08;
|
||||
if (D_8016E750[playerIdx].unk_0C != 0) {
|
||||
D_8016E750[playerIdx].volCur = D_8016E750[playerIdx].volCur - D_8016E750[playerIdx].unk_08;
|
||||
} else {
|
||||
D_8016E750[i].volCur = D_8016E750[i].volTarget;
|
||||
D_8016E750[playerIdx].volCur = D_8016E750[playerIdx].volTarget;
|
||||
}
|
||||
|
||||
Audio_QueueCmdF32(0x41000000 | _SHIFTL(i, 16, 8), D_8016E750[i].volCur);
|
||||
Audio_QueueCmdF32(0x41000000 | _SHIFTL(playerIdx, 16, 8), D_8016E750[playerIdx].volCur);
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_14 != 0) {
|
||||
temp_a1 = D_8016E750[i].unk_14;
|
||||
if (D_8016E750[playerIdx].unk_14 != 0) {
|
||||
temp_a1 = D_8016E750[playerIdx].unk_14;
|
||||
phi_t0 = (temp_a1 & 0xFF0000) >> 15;
|
||||
phi_a2 = temp_a1 & 0xFFF;
|
||||
if (phi_t0 == 0) {
|
||||
phi_t0++;
|
||||
}
|
||||
|
||||
if (gAudioContext.seqPlayers[i].enabled) {
|
||||
temp_lo = gAudioContext.seqPlayers[i].tempo / 0x30;
|
||||
if (gAudioContext.seqPlayers[playerIdx].enabled) {
|
||||
temp_lo = gAudioContext.seqPlayers[playerIdx].tempo / 0x30;
|
||||
temp_v0_4 = (temp_a1 & 0xF000) >> 12;
|
||||
switch (temp_v0_4) {
|
||||
case 1:
|
||||
|
@ -497,8 +497,8 @@ void func_800FA3DC(void) {
|
|||
phi_a2 = temp_lo * (phi_a2 / 100.0f);
|
||||
break;
|
||||
case 4:
|
||||
if (D_8016E750[i].unk_18) {
|
||||
phi_a2 = D_8016E750[i].unk_18;
|
||||
if (D_8016E750[playerIdx].unk_18) {
|
||||
phi_a2 = D_8016E750[playerIdx].unk_18;
|
||||
} else {
|
||||
phi_a2 = temp_lo;
|
||||
}
|
||||
|
@ -509,95 +509,95 @@ void func_800FA3DC(void) {
|
|||
phi_a2 = 300;
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_18 == 0) {
|
||||
D_8016E750[i].unk_18 = temp_lo;
|
||||
if (D_8016E750[playerIdx].unk_18 == 0) {
|
||||
D_8016E750[playerIdx].unk_18 = temp_lo;
|
||||
}
|
||||
|
||||
D_8016E750[i].unk_20 = phi_a2;
|
||||
D_8016E750[i].unk_1C = gAudioContext.seqPlayers[i].tempo / 0x30;
|
||||
D_8016E750[i].unk_24 = (D_8016E750[i].unk_1C - D_8016E750[i].unk_20) / phi_t0;
|
||||
D_8016E750[i].unk_28 = phi_t0;
|
||||
D_8016E750[i].unk_14 = 0;
|
||||
D_8016E750[playerIdx].unk_20 = phi_a2;
|
||||
D_8016E750[playerIdx].unk_1C = gAudioContext.seqPlayers[playerIdx].tempo / 0x30;
|
||||
D_8016E750[playerIdx].unk_24 = (D_8016E750[playerIdx].unk_1C - D_8016E750[playerIdx].unk_20) / phi_t0;
|
||||
D_8016E750[playerIdx].unk_28 = phi_t0;
|
||||
D_8016E750[playerIdx].unk_14 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_28 != 0) {
|
||||
D_8016E750[i].unk_28--;
|
||||
if (D_8016E750[i].unk_28 != 0) {
|
||||
D_8016E750[i].unk_1C = D_8016E750[i].unk_1C - D_8016E750[i].unk_24;
|
||||
if (D_8016E750[playerIdx].unk_28 != 0) {
|
||||
D_8016E750[playerIdx].unk_28--;
|
||||
if (D_8016E750[playerIdx].unk_28 != 0) {
|
||||
D_8016E750[playerIdx].unk_1C = D_8016E750[playerIdx].unk_1C - D_8016E750[playerIdx].unk_24;
|
||||
} else {
|
||||
D_8016E750[i].unk_1C = D_8016E750[i].unk_20;
|
||||
D_8016E750[playerIdx].unk_1C = D_8016E750[playerIdx].unk_20;
|
||||
}
|
||||
// set tempo
|
||||
Audio_QueueCmdS32(0x47000000 | _SHIFTL(i, 16, 8), D_8016E750[i].unk_1C);
|
||||
Audio_QueueCmdS32(0x47000000 | _SHIFTL(playerIdx, 16, 8), D_8016E750[playerIdx].unk_1C);
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_252 != 0) {
|
||||
if (D_8016E750[playerIdx].unk_252 != 0) {
|
||||
for (k = 0; k < 0x10; k++) {
|
||||
if (D_8016E750[i].unk_50[k].unk_0C != 0) {
|
||||
D_8016E750[i].unk_50[k].unk_0C--;
|
||||
if (D_8016E750[i].unk_50[k].unk_0C != 0) {
|
||||
D_8016E750[i].unk_50[k].unk_00 -= D_8016E750[i].unk_50[k].unk_08;
|
||||
if (D_8016E750[playerIdx].unk_50[k].unk_0C != 0) {
|
||||
D_8016E750[playerIdx].unk_50[k].unk_0C--;
|
||||
if (D_8016E750[playerIdx].unk_50[k].unk_0C != 0) {
|
||||
D_8016E750[playerIdx].unk_50[k].unk_00 -= D_8016E750[playerIdx].unk_50[k].unk_08;
|
||||
} else {
|
||||
D_8016E750[i].unk_50[k].unk_00 = D_8016E750[i].unk_50[k].unk_04;
|
||||
D_8016E750[i].unk_252 ^= (1 << k);
|
||||
D_8016E750[playerIdx].unk_50[k].unk_00 = D_8016E750[playerIdx].unk_50[k].unk_04;
|
||||
D_8016E750[playerIdx].unk_252 ^= (1 << k);
|
||||
}
|
||||
// CHAN_UPD_VOL_SCALE (i = seq, k = chan)
|
||||
Audio_QueueCmdF32(0x01000000 | _SHIFTL(i, 16, 8) | _SHIFTL(k, 8, 8),
|
||||
D_8016E750[i].unk_50[k].unk_00);
|
||||
// CHAN_UPD_VOL_SCALE (playerIdx = seq, k = chan)
|
||||
Audio_QueueCmdF32(0x01000000 | _SHIFTL(playerIdx, 16, 8) | _SHIFTL(k, 8, 8),
|
||||
D_8016E750[playerIdx].unk_50[k].unk_00);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_250 != 0) {
|
||||
if (D_8016E750[playerIdx].unk_250 != 0) {
|
||||
for (k = 0; k < 0x10; k++) {
|
||||
if (D_8016E750[i].unk_50[k].unk_1C != 0) {
|
||||
D_8016E750[i].unk_50[k].unk_1C--;
|
||||
if (D_8016E750[i].unk_50[k].unk_1C != 0) {
|
||||
D_8016E750[i].unk_50[k].unk_10 -= D_8016E750[i].unk_50[k].unk_18;
|
||||
if (D_8016E750[playerIdx].unk_50[k].unk_1C != 0) {
|
||||
D_8016E750[playerIdx].unk_50[k].unk_1C--;
|
||||
if (D_8016E750[playerIdx].unk_50[k].unk_1C != 0) {
|
||||
D_8016E750[playerIdx].unk_50[k].unk_10 -= D_8016E750[playerIdx].unk_50[k].unk_18;
|
||||
} else {
|
||||
D_8016E750[i].unk_50[k].unk_10 = D_8016E750[i].unk_50[k].unk_14;
|
||||
D_8016E750[i].unk_250 ^= (1 << k);
|
||||
D_8016E750[playerIdx].unk_50[k].unk_10 = D_8016E750[playerIdx].unk_50[k].unk_14;
|
||||
D_8016E750[playerIdx].unk_250 ^= (1 << k);
|
||||
}
|
||||
// CHAN_UPD_FREQ_SCALE
|
||||
Audio_QueueCmdF32(0x04000000 | _SHIFTL(i, 16, 8) | _SHIFTL(k, 8, 8),
|
||||
D_8016E750[i].unk_50[k].unk_10);
|
||||
Audio_QueueCmdF32(0x04000000 | _SHIFTL(playerIdx, 16, 8) | _SHIFTL(k, 8, 8),
|
||||
D_8016E750[playerIdx].unk_50[k].unk_10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_4D != 0) {
|
||||
if (D_8016E750[playerIdx].unk_4D != 0) {
|
||||
if (func_800FA11C(0xF0000000, 0xF0000000) == 0) {
|
||||
D_8016E750[i].unk_4D = 0;
|
||||
D_8016E750[playerIdx].unk_4D = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (D_8016E750[i].unk_4C != 0) {
|
||||
D_8016E750[i].unk_4C--;
|
||||
if (D_8016E750[playerIdx].unk_4C != 0) {
|
||||
D_8016E750[playerIdx].unk_4C--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gAudioContext.seqPlayers[i].enabled) {
|
||||
if (gAudioContext.seqPlayers[playerIdx].enabled) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < D_8016E750[i].unk_4D; j++) {
|
||||
temp_a0 = (D_8016E750[i].unk_2C[j] & 0x00F00000) >> 20;
|
||||
temp_s1 = (D_8016E750[i].unk_2C[j] & 0x000F0000) >> 16;
|
||||
temp_s0_3 = (D_8016E750[i].unk_2C[j] & 0xFF00) >> 8;
|
||||
temp_a3_3 = D_8016E750[i].unk_2C[j] & 0xFF;
|
||||
for (j = 0; j < D_8016E750[playerIdx].unk_4D; j++) {
|
||||
temp_a0 = (D_8016E750[playerIdx].unk_2C[j] & 0x00F00000) >> 20;
|
||||
temp_s1 = (D_8016E750[playerIdx].unk_2C[j] & 0x000F0000) >> 16;
|
||||
temp_s0_3 = (D_8016E750[playerIdx].unk_2C[j] & 0xFF00) >> 8;
|
||||
temp_a3_3 = D_8016E750[playerIdx].unk_2C[j] & 0xFF;
|
||||
|
||||
switch (temp_a0) {
|
||||
case 0:
|
||||
Audio_SetVolScale(temp_s1, 1, 0x7F, temp_a3_3);
|
||||
break;
|
||||
case 7:
|
||||
if (D_8016E348[i] == temp_a3_3) {
|
||||
if (D_8016E348[playerIdx] == temp_a3_3) {
|
||||
Audio_SetVolScale(temp_s1, 1, 0x7F, temp_s0_3);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
Audio_SeqCmd3(i, D_8016E750[i].unk_254);
|
||||
Audio_SeqCmd3(playerIdx, D_8016E750[playerIdx].unk_254);
|
||||
break;
|
||||
case 2:
|
||||
Audio_StartSeq(temp_s1, 1, D_8016E750[temp_s1].unk_254);
|
||||
|
@ -611,13 +611,13 @@ void func_800FA3DC(void) {
|
|||
Audio_SeqCmdB40(temp_s1, temp_a3_3, 0);
|
||||
break;
|
||||
case 5:
|
||||
temp_v1 = D_8016E750[i].unk_2C[j] & 0xFFFF;
|
||||
temp_v1 = D_8016E750[playerIdx].unk_2C[j] & 0xFFFF;
|
||||
Audio_StartSeq(temp_s1, D_8016E750[temp_s1].unk_4E, temp_v1);
|
||||
Audio_SetVolScale(temp_s1, 1, 0x7F, 0);
|
||||
D_8016E750[temp_s1].unk_4E = 0;
|
||||
break;
|
||||
case 6:
|
||||
D_8016E750[i].unk_4E = temp_s0_3;
|
||||
D_8016E750[playerIdx].unk_4E = temp_s0_3;
|
||||
break;
|
||||
case 8:
|
||||
Audio_SetVolScale(temp_s1, temp_s0_3, 0x7F, temp_a3_3);
|
||||
|
@ -634,7 +634,7 @@ void func_800FA3DC(void) {
|
|||
}
|
||||
break;
|
||||
case 9:
|
||||
temp_v1 = D_8016E750[i].unk_2C[j] & 0xFFFF;
|
||||
temp_v1 = D_8016E750[playerIdx].unk_2C[j] & 0xFFFF;
|
||||
Audio_SeqCmdA(temp_s1, temp_v1);
|
||||
break;
|
||||
case 10:
|
||||
|
@ -643,7 +643,7 @@ void func_800FA3DC(void) {
|
|||
}
|
||||
}
|
||||
|
||||
D_8016E750[i].unk_4D = 0;
|
||||
D_8016E750[playerIdx].unk_4D = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -668,37 +668,37 @@ u8 func_800FAD34(void) {
|
|||
}
|
||||
|
||||
void func_800FADF8(void) {
|
||||
u8 i, j;
|
||||
u8 playerIdx, j;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
D_8016E348[i] = 0;
|
||||
D_8016E750[i].unk_254 = NA_BGM_DISABLED;
|
||||
D_8016E750[i].unk_256 = NA_BGM_DISABLED;
|
||||
D_8016E750[i].unk_28 = 0;
|
||||
D_8016E750[i].unk_18 = 0;
|
||||
D_8016E750[i].unk_14 = 0;
|
||||
D_8016E750[i].unk_258 = 0;
|
||||
D_8016E750[i].unk_4D = 0;
|
||||
D_8016E750[i].unk_4E = 0;
|
||||
D_8016E750[i].unk_250 = 0;
|
||||
D_8016E750[i].unk_252 = 0;
|
||||
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
|
||||
D_8016E348[playerIdx] = 0;
|
||||
D_8016E750[playerIdx].unk_254 = NA_BGM_DISABLED;
|
||||
D_8016E750[playerIdx].unk_256 = NA_BGM_DISABLED;
|
||||
D_8016E750[playerIdx].unk_28 = 0;
|
||||
D_8016E750[playerIdx].unk_18 = 0;
|
||||
D_8016E750[playerIdx].unk_14 = 0;
|
||||
D_8016E750[playerIdx].unk_258 = 0;
|
||||
D_8016E750[playerIdx].unk_4D = 0;
|
||||
D_8016E750[playerIdx].unk_4E = 0;
|
||||
D_8016E750[playerIdx].unk_250 = 0;
|
||||
D_8016E750[playerIdx].unk_252 = 0;
|
||||
for (j = 0; j < 4; j++) {
|
||||
D_8016E750[i].volScales[j] = 0x7F;
|
||||
D_8016E750[playerIdx].volScales[j] = 0x7F;
|
||||
}
|
||||
D_8016E750[i].volFadeTimer = 1;
|
||||
D_8016E750[i].fadeVolUpdate = 1;
|
||||
D_8016E750[playerIdx].volFadeTimer = 1;
|
||||
D_8016E750[playerIdx].fadeVolUpdate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_800FAEB4(void) {
|
||||
u8 i, j;
|
||||
u8 playerIdx, j;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
D_8016E750[i].volCur = 1.0f;
|
||||
D_8016E750[i].unk_0C = 0;
|
||||
D_8016E750[i].fadeVolUpdate = 0;
|
||||
for (playerIdx = 0; playerIdx < 4; playerIdx++) {
|
||||
D_8016E750[playerIdx].volCur = 1.0f;
|
||||
D_8016E750[playerIdx].unk_0C = 0;
|
||||
D_8016E750[playerIdx].fadeVolUpdate = 0;
|
||||
for (j = 0; j < 4; j++) {
|
||||
D_8016E750[i].volScales[j] = 0x7F;
|
||||
D_8016E750[playerIdx].volScales[j] = 0x7F;
|
||||
}
|
||||
}
|
||||
func_800FADF8();
|
||||
|
|
|
@ -456,9 +456,9 @@ void Cutscene_Command_FadeBGM(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
var1 = cmd->endFrame - cmd->startFrame;
|
||||
|
||||
if (cmd->type == 3) {
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | 0x110000FF);
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | (0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF));
|
||||
} else {
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | 0x100000FF);
|
||||
Audio_QueueSeqCmd(var1 << 0x10 | (0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xFF));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1925,7 +1925,7 @@ void func_800758AC(GlobalContext* globalCtx) {
|
|||
func_800F6FB4(4);
|
||||
} else if (((void)0, gSaveContext.unk_140E) != NA_BGM_GENERAL_SFX) {
|
||||
if (!func_80077600()) {
|
||||
Audio_QueueSeqCmd((s32)((void)0, gSaveContext.unk_140E));
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | (s32)((void)0, gSaveContext.unk_140E));
|
||||
}
|
||||
gSaveContext.unk_140E = NA_BGM_GENERAL_SFX;
|
||||
} else if (globalCtx->soundCtx.seqIndex == NA_BGM_NO_MUSIC) {
|
||||
|
@ -1985,7 +1985,7 @@ void func_80075B44(GlobalContext* globalCtx) {
|
|||
case 1:
|
||||
if (gSaveContext.dayTime > 0xB71C) {
|
||||
if (globalCtx->envCtx.unk_EE[0] == 0 && globalCtx->envCtx.unk_F2[0] == 0) {
|
||||
Audio_QueueSeqCmd(0x10F000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xF000FF);
|
||||
}
|
||||
globalCtx->envCtx.unk_E0++;
|
||||
}
|
||||
|
@ -2419,7 +2419,7 @@ void func_80077684(GlobalContext* globalCtx) {
|
|||
func_800F6D58(14, 1, 0);
|
||||
func_800F6D58(15, 1, 0);
|
||||
|
||||
if (func_800FA0B4(0) == NA_BGM_NATURE_BACKGROUND) {
|
||||
if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_BACKGROUND) {
|
||||
gSaveContext.seqIndex = NA_BGM_NATURE_SFX_RAIN;
|
||||
func_800758AC(globalCtx);
|
||||
}
|
||||
|
|
|
@ -109,8 +109,8 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
globalCtx->csCtx.segment = D_808BB7A0;
|
||||
}
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(NA_BGM_MASTER_SWORD);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_MASTER_SWORD);
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
this->actor.parent = NULL;
|
||||
BgTokiSwd_SetupAction(this, func_808BB0AC);
|
||||
|
|
|
@ -321,7 +321,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
BossDodongo_Walk(this, globalCtx);
|
||||
|
||||
if (this->unk_196 == 1) {
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
}
|
||||
|
||||
if (this->unk_196 == 0) {
|
||||
|
@ -409,7 +409,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
SEGMENTED_TO_VIRTUAL(&object_kingdodongo_Blob_017410), 0xA0, 0xB4, 0x80,
|
||||
0x28);
|
||||
}
|
||||
Audio_QueueSeqCmd(NA_BGM_FIRE_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
|
||||
if (this->unk_198 == 0) {
|
||||
|
@ -1283,7 +1283,7 @@ void BossDodongo_SetupDeathCutscene(BossDodongo* this) {
|
|||
this->csState = 0;
|
||||
this->actor.flags &= ~5;
|
||||
this->unk_1BC = 1;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
}
|
||||
|
||||
void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
||||
|
@ -1598,7 +1598,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_1DA == 820) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART,
|
||||
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x,
|
||||
this->actor.world.pos.y,
|
||||
|
|
|
@ -190,7 +190,7 @@ void BossFd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
0);
|
||||
this->introState = BFD_CS_WAIT;
|
||||
if (this->introState == BFD_CS_NONE) {
|
||||
Audio_QueueSeqCmd(NA_BGM_FIRE_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
|
||||
this->actor.world.pos.x = this->actor.world.pos.z = 0.0f;
|
||||
|
@ -490,7 +490,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
|
||||
}
|
||||
if (this->timers[3] == 160) {
|
||||
Audio_QueueSeqCmd(NA_BGM_FIRE_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_FIRE_BOSS);
|
||||
}
|
||||
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
|
@ -745,7 +745,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
|
|||
if (this->skinSegments != 0) {
|
||||
this->skinSegments--;
|
||||
if (this->skinSegments == 0) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
} else {
|
||||
this->work[BFD_ACTION_STATE] = BOSSFD_BONES_FALL;
|
||||
|
|
|
@ -885,7 +885,7 @@ void BossFd2_CollisionCheck(BossFd2* this, GlobalContext* globalCtx) {
|
|||
BossFd2_SetupDeath(this, globalCtx);
|
||||
this->work[FD2_DAMAGE_FLASH_TIMER] = 10;
|
||||
this->work[FD2_INVINC_TIMER] = 30000;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_VALVAISA_DEAD);
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
} else if (damage) {
|
||||
|
|
|
@ -295,7 +295,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_339 = 4;
|
||||
if (this->unk_398 == 10) {
|
||||
func_80078914(&D_80906D6C, NA_SE_EV_STONE_BOUND);
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
}
|
||||
if (this->unk_398 == 20) {
|
||||
sZelda->unk_3C8 = 3;
|
||||
|
@ -444,7 +444,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.pos.x = -200.0f;
|
||||
this->actor.world.pos.y = this->actor.world.pos.y - 30.0f;
|
||||
this->actor.world.pos.z = -200.0f;
|
||||
Audio_QueueSeqCmd(NA_BGM_OPENING_GANON);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_OPENING_GANON);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
case 18:
|
||||
this->unk_339 = 6;
|
||||
if (this->unk_398 == 30) {
|
||||
Audio_QueueSeqCmd(NA_BGM_GANON_BATTLE_2);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_GANON_BATTLE_2);
|
||||
}
|
||||
Math_ApproachF(&this->unk_30C, 7.0f, 1.0f, 0.1f);
|
||||
Math_ApproachF(&this->unk_3A4.x, (this->actor.world.pos.x + 500.0f) - 350.0f, 0.1f, 1.0f);
|
||||
|
@ -1683,7 +1683,7 @@ void func_8090120C(BossGanon2* this, GlobalContext* globalCtx) {
|
|||
this->unk_3B0.z = D_80907050[phi_a1].z + player->actor.world.pos.z;
|
||||
}
|
||||
if (this->unk_398 > 80) {
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->unk_39C = 75;
|
||||
this->unk_398 = 0;
|
||||
this->unk_3A4.x = 112.0f;
|
||||
|
|
|
@ -930,7 +930,7 @@ void BossGanondrof_SetupDeath(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
Animation_PlayOnce(&this->skelAnime, &gPhantomGanonDeathBlowAnim);
|
||||
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonDeathBlowAnim);
|
||||
this->actionFunc = BossGanondrof_Death;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DEAD);
|
||||
this->deathState = DEATH_START;
|
||||
this->actor.flags &= ~1;
|
||||
|
@ -1101,7 +1101,7 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
holdCamera = true;
|
||||
bodyDecayLevel = 10;
|
||||
if (this->timers[0] == 150) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X,
|
||||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ void BossGoma_SetupDefeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
this->actor.flags &= ~5;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.shape.shadowScale = 0.0f;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_DEAD);
|
||||
}
|
||||
|
||||
|
@ -660,7 +660,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) {
|
|||
this->subCameraAt.y = this->actor.world.pos.y;
|
||||
this->subCameraAt.z = this->actor.world.pos.z;
|
||||
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -925,7 +925,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
|
|||
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
|
||||
}
|
||||
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
gSaveContext.eventChkInf[7] |= 1;
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
Math_SmoothStepToF(&this->subCameraAt.z, this->firstTailLimbWorldPos.z, 0.2f, 50.0f, 0.1f);
|
||||
|
||||
if (this->timer == 80) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
|
|
|
@ -360,7 +360,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
return;
|
||||
}
|
||||
if (gSaveContext.eventChkInf[7] & 0x10) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
this->tentMaxAngle = 5.0f;
|
||||
this->timers[0] = 50;
|
||||
} else {
|
||||
|
@ -1104,7 +1104,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 200.0f,
|
||||
-280.0f, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
Flags_SetClear(globalCtx, globalCtx->roomCtx.curRoom.num);
|
||||
}
|
||||
}
|
||||
|
@ -1238,7 +1238,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->actor.world.rot.y = 0x721A;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_READY;
|
||||
sMorphaTent1->timers[0] = 30000;
|
||||
Audio_QueueSeqCmd(0x103200FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x3200FF);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
} else {
|
||||
break;
|
||||
|
@ -1419,7 +1419,7 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->cameraAccel = 0.01f;
|
||||
}
|
||||
if (this->timers[2] == 150) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[2] == 130) {
|
||||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
|
@ -1773,7 +1773,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, GlobalContext* globalCtx) {
|
|||
if (((sMorphaTent1->csCamera == 0) && (sMorphaTent2 == NULL)) ||
|
||||
((sMorphaTent1->csCamera == 0) && (sMorphaTent2 != NULL) && (sMorphaTent2->csCamera == 0))) {
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->csState = MO_DEATH_START;
|
||||
sMorphaTent1->drawActor = false;
|
||||
sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_DEATH_START;
|
||||
|
@ -3573,11 +3573,11 @@ void BossMo_Unknown(void) {
|
|||
|
||||
if (BREG(32) != 0) {
|
||||
BREG(32)--;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
func_80078914(&zeroVec, unkSfx[BREG(33)]);
|
||||
}
|
||||
if (BREG(34) != 0) {
|
||||
BREG(34) = 0;
|
||||
Audio_QueueSeqCmd((u16)BREG(35));
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | (u16)BREG(35));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -385,7 +385,7 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &sCameraAt, &sCameraEye);
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->actionFunc = BossSst_HeadIntro;
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
|
|||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex), 160, 180, 128, 40);
|
||||
}
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
|
||||
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DISAPPEAR);
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ void BossSst_HeadSetupDeath(BossSst* this, GlobalContext* globalCtx) {
|
|||
this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
sCutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
|
||||
|
@ -1157,7 +1157,7 @@ void BossSst_HeadMelt(BossSst* this, GlobalContext* globalCtx) {
|
|||
void BossSst_HeadSetupFinish(BossSst* this) {
|
||||
this->actor.draw = BossSst_DrawEffect;
|
||||
this->timer = 40;
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
BossSst_SetCameraTargets(1.0 / 40, 6);
|
||||
this->actionFunc = BossSst_HeadFinish;
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.world.pos.x = -600.0f;
|
||||
this->actor.world.pos.y = 400.0f;
|
||||
this->actor.world.pos.z = 0.0f;
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
} else {
|
||||
BossTw_SetupCSWait(this, globalCtx);
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->workf[UNK_F9] = 0.0f;
|
||||
this->workf[UNK_F10] = 0.0f;
|
||||
this->workf[UNK_F11] = 600.0f;
|
||||
Audio_QueueSeqCmd(0x10C800FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xC800FF);
|
||||
this->work[CS_TIMER_2] = 0;
|
||||
// fallthrough
|
||||
case 1:
|
||||
|
@ -1642,7 +1642,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->timers[0] = 50;
|
||||
func_8002DF54(globalCtx, &this->actor, 2);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM);
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1783,7 +1783,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
if (this->csSfxTimer == 180) {
|
||||
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH);
|
||||
func_80078914(&D_8094A7D0, NA_SE_EN_TWINROBA_LAUGH2);
|
||||
Audio_QueueSeqCmd(NA_BGM_KOTAKE_KOUME);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
|
||||
}
|
||||
|
||||
this->csSfxTimer++;
|
||||
|
@ -2209,7 +2209,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] == 90) {
|
||||
Audio_QueueSeqCmd(0x105A00FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5A00FF);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] == 120) {
|
||||
|
@ -2220,7 +2220,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
|
||||
SEGMENTED_TO_VIRTUAL(object_tw_Blob_02E170), 0xA0, 0xB4, 0x80, 0x28);
|
||||
gSaveContext.eventChkInf[7] |= 0x20;
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_1] >= 160) {
|
||||
|
@ -2514,7 +2514,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->work[CS_TIMER_2] == 820) {
|
||||
msgId1 = 0x6057;
|
||||
Audio_QueueSeqCmd(0x105000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5000FF);
|
||||
}
|
||||
|
||||
if (this->work[CS_TIMER_2] == 860) {
|
||||
|
@ -2692,7 +2692,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
|
||||
this->subCamEye = mainCam->eye;
|
||||
this->subCamAt = mainCam->at;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
break;
|
||||
case 1:
|
||||
spD0.x = Math_SinS(this->actor.world.rot.y) * 200.0f;
|
||||
|
@ -2767,7 +2767,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
sKoumePtr->visible = 1;
|
||||
sKotakePtr->visible = 1;
|
||||
func_80078884(NA_SE_EN_TWINROBA_TRANSFORM);
|
||||
Audio_QueueSeqCmd(NA_BGM_KOTAKE_KOUME);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KOTAKE_KOUME);
|
||||
this->csState2 = 3;
|
||||
this->work[CS_TIMER_2] = 0;
|
||||
this->subCamYaw = this->subCamYawStep = this->actor.speedXZ = this->subCamDistStep = 0.0f;
|
||||
|
@ -2815,7 +2815,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
this->subCamId = 0;
|
||||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 600.0f, 230.0f,
|
||||
0.0f, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0);
|
||||
|
|
|
@ -959,7 +959,7 @@ void BossVa_BodyIntro(BossVa* this, GlobalContext* globalCtx) {
|
|||
globalCtx->envCtx.unk_BF = 1;
|
||||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
} else if (this->timer >= 35000) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
|
||||
this->timer += this->unk_1F2;
|
||||
|
@ -1514,7 +1514,7 @@ void BossVa_BodyPhase4(BossVa* this, GlobalContext* globalCtx) {
|
|||
void BossVa_SetupBodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
||||
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f);
|
||||
this->actor.flags &= ~5;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
this->vaCamRotMod = 0xC31;
|
||||
sCsState = DEATH_START;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
@ -1600,7 +1600,7 @@ void BossVa_BodyDeath(BossVa* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case DEATH_CORE_BURST:
|
||||
if (this->timer == 13) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
}
|
||||
|
||||
this->timer--;
|
||||
|
|
|
@ -382,7 +382,7 @@ void DoorWarp1_ChooseInitialAction(DoorWarp1* this, GlobalContext* globalCtx) {
|
|||
void DoorWarp1_AwaitClearFlag(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetTempClear(globalCtx, this->actor.room)) {
|
||||
this->warpTimer = 200;
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS_CLEAR);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
|
||||
DoorWarp1_SetupAction(this, func_809995D4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
if (!(gSaveContext.itemGetInf[1] & 0x4000)) {
|
||||
reaction = DNT_SIGNAL_CELEBRATE;
|
||||
this->prize = DNT_PRIZE_STICK;
|
||||
Audio_QueueSeqCmd(NA_BGM_SARIA_THEME);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SARIA_THEME);
|
||||
break;
|
||||
}
|
||||
case PLAYER_MASK_TRUTH:
|
||||
|
@ -208,17 +208,17 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
this->action = sResultValues[resultIdx][1];
|
||||
switch (this->action) {
|
||||
case DNT_ACTION_LOW_RUPEES:
|
||||
Audio_QueueSeqCmd(NA_BGM_COURTYARD);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_COURTYARD);
|
||||
break;
|
||||
case DNT_ACTION_ATTACK:
|
||||
if (this->subCamera != SUBCAM_FREE) {
|
||||
this->subCamera = SUBCAM_FREE;
|
||||
OnePointCutscene_Init(globalCtx, 2350, -99, &this->scrubs[3]->actor, MAIN_CAM);
|
||||
}
|
||||
Audio_QueueSeqCmd(NA_BGM_ENEMY | 0x800);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
break;
|
||||
case DNT_ACTION_DANCE:
|
||||
Audio_QueueSeqCmd(NA_BGM_SHOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_SHOP);
|
||||
break;
|
||||
}
|
||||
osSyncPrintf("\n\n");
|
||||
|
|
|
@ -361,7 +361,7 @@ void EnDntJiji_Return(EnDntJiji* this, GlobalContext* globalCtx) {
|
|||
if ((this->stage->actor.update != NULL) && (this->stage->leaderSignal == DNT_SIGNAL_NONE)) {
|
||||
this->stage->leaderSignal = DNT_SIGNAL_HIDE;
|
||||
this->stage->action = DNT_ACTION_ATTACK;
|
||||
Audio_QueueSeqCmd(NA_BGM_ENEMY | 0x800);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
}
|
||||
}
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
|
|
@ -54,7 +54,7 @@ void func_809FFDC8(EnEg* this, GlobalContext* globalCtx) {
|
|||
// Void the player out
|
||||
Gameplay_TriggerRespawn(globalCtx);
|
||||
gSaveContext.respawnFlag = -2;
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
globalCtx->fadeTransition = 2;
|
||||
EnEg_PlayVoidOutSFX();
|
||||
voided = true;
|
||||
|
|
|
@ -2530,7 +2530,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
|
|||
if ((globalCtx->interfaceCtx.hbaAmmo == 0) || (this->hbaFlags & 2)) {
|
||||
if (this->hbaFlags & 4) {
|
||||
this->hbaFlags &= ~4;
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
|
|||
if (this->playerFinish > 0) {
|
||||
this->result = INGORACE_PLAYER_WIN;
|
||||
this->finishTimer = 55;
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -198,7 +198,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
|
|||
this->result = INGORACE_INGO_WIN;
|
||||
this->finishTimer = 70;
|
||||
ingoHorse->stateFlags |= ENHORSE_INGO_WON;
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -206,12 +206,12 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
|
|||
}
|
||||
}
|
||||
if (((player2->rideActor != NULL) && AT_RANCH_EXIT(player2->rideActor)) || AT_RANCH_EXIT(&player2->actor)) {
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
this->result = INGORACE_INGO_WIN;
|
||||
this->finishTimer = 20;
|
||||
}
|
||||
if ((gSaveContext.timer1Value >= 180) && (this->startFlags & 2)) {
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
this->result = INGORACE_TIME_UP;
|
||||
this->finishTimer = 20;
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, GlobalContext*
|
|||
this->finishTimer = 30;
|
||||
} else if (this->fenceCheck[15] == 1) {
|
||||
this->lapCount = 2;
|
||||
Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HORSE_GOAL);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->result = MALONRACE_SUCCESS;
|
||||
this->finishTimer = 70;
|
||||
|
|
|
@ -94,7 +94,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx
|
|||
globalCtx->envCtx.unk_F2[0] = 0;
|
||||
if (globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
func_80077684(globalCtx);
|
||||
} else if (func_800FA0B4(0) == NA_BGM_NATURE_BACKGROUND) {
|
||||
} else if (func_800FA0B4(SEQ_PLAYER_BGM_MAIN) == NA_BGM_NATURE_BACKGROUND) {
|
||||
func_800F6D58(0xF, 1, 0);
|
||||
func_800F6D58(0xE, 1, 0);
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
if ((this->unk_3EE & 0x3F) == 0) {
|
||||
func_80ACA62C(this, globalCtx);
|
||||
} else {
|
||||
|
@ -553,7 +553,7 @@ void func_80ACB03C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 8);
|
||||
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
func_80ACA62C(this, globalCtx);
|
||||
this->actor.flags &= ~0x10000;
|
||||
}
|
||||
|
@ -582,7 +582,7 @@ void EnOwl_WaitZoraRiver(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ACB148(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
Flags_SetSwitch(globalCtx, 0x23);
|
||||
|
@ -602,7 +602,7 @@ void EnOwl_WaitHyliaShortcut(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
func_80ACA5C8(this);
|
||||
this->actionFunc = func_80ACC30C;
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ACB274(EnOwl* this, GlobalContext* globalCtx) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
Audio_QueueSeqCmd(0x110000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF);
|
||||
this->actionFunc = EnOwl_WaitDeathMountainShortcut;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -711,7 +711,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
|
|||
this->unk_2E0 &= ~0x10;
|
||||
this->unk_2E0 &= ~0x100;
|
||||
gSaveContext.eventInf[0] |= 0x100;
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
this->unk_2E0 &= ~0x200;
|
||||
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
|
||||
return;
|
||||
|
@ -740,7 +740,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (gSaveContext.timer1Value == 0 && !Gameplay_InCsMode(globalCtx)) {
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
this->unk_2E0 &= ~0x200;
|
||||
func_80078884(NA_SE_SY_FOUND);
|
||||
gSaveContext.timer1State = 0;
|
||||
|
|
|
@ -241,7 +241,7 @@ void EnViewer_UpdateImpl(EnViewer* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
if (globalCtx->csCtx.frames == 1020) {
|
||||
Audio_QueueSeqCmd(0x1000000 | NA_BGM_OPENING_GANON);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_FANFARE << 24 | NA_BGM_OPENING_GANON);
|
||||
}
|
||||
if (globalCtx->csCtx.frames == 960) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
|
|
|
@ -88,7 +88,7 @@ void EnZl3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B53468(void) {
|
||||
Audio_QueueSeqCmd(NA_BGM_ESCAPE);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ESCAPE);
|
||||
}
|
||||
|
||||
BossGanon2* func_80B53488(EnZl3* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -146,7 +146,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
if (this->timers[0] == 51) {
|
||||
Audio_PlayActorSound2(this->actor.child, NA_SE_EV_SPEAR_FENCE);
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
EnfHG_SetupApproach(this, globalCtx, Rand_ZeroOne() * 5.99f);
|
||||
|
@ -162,7 +162,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
|||
this->cutsceneState = INTRO_FENCE;
|
||||
this->timers[0] = 60;
|
||||
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF);
|
||||
gSaveContext.eventChkInf[7] |= 4;
|
||||
Flags_SetSwitch(globalCtx, 0x23);
|
||||
case INTRO_FENCE:
|
||||
|
@ -198,7 +198,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 9);
|
||||
}
|
||||
if (this->timers[0] == 1) {
|
||||
Audio_QueueSeqCmd(NA_BGM_OPENING_GANON);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_OPENING_GANON);
|
||||
}
|
||||
Math_ApproachF(&this->cameraEye.x, GND_BOSSROOM_CENTER_X + 40.0f, 0.05f, this->cameraSpeedMod * 20.0f);
|
||||
Math_ApproachF(&this->cameraEye.y, GND_BOSSROOM_CENTER_Y + 37.0f, 0.05f, this->cameraSpeedMod * 20.0f);
|
||||
|
@ -286,7 +286,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
|||
this->bossGndSignal = FHG_RIDE;
|
||||
}
|
||||
if (this->timers[0] == 130) {
|
||||
Audio_QueueSeqCmd(0x105000FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x5000FF);
|
||||
}
|
||||
if (this->timers[0] == 30) {
|
||||
bossGnd->work[GND_EYE_STATE] = GND_EYESTATE_BRIGHTEN;
|
||||
|
@ -299,7 +299,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
|
|||
func_80078914(&audioVec, NA_SE_EN_FANTOM_ST_LAUGH);
|
||||
}
|
||||
if (this->timers[0] == 20) {
|
||||
Audio_QueueSeqCmd(NA_BGM_BOSS);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS);
|
||||
}
|
||||
if (this->timers[0] == 2) {
|
||||
this->cameraSpeedMod = 0.0f;
|
||||
|
|
|
@ -869,7 +869,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
D_80B7E0AC = 0;
|
||||
D_80B7E0A6 = 10;
|
||||
|
||||
Audio_QueueSeqCmd(0x100100FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x0100FF);
|
||||
|
||||
if (sLinkAge == 1) {
|
||||
if ((HIGH_SCORE(HS_FISHING) & 0x7F) != 0) {
|
||||
|
@ -3586,7 +3586,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->unk_198 = 1.7f;
|
||||
this->unk_19C = 7000.0f;
|
||||
D_80B7E124 = 1;
|
||||
Audio_QueueSeqCmd(NA_BGM_ENEMY | 0x800);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ENEMY | 0x800);
|
||||
D_80B7E0A6 = 0;
|
||||
|
||||
if (this->unk_150 == 1) {
|
||||
|
@ -3791,7 +3791,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
} else {
|
||||
D_80B7E086 = 0x4082;
|
||||
func_800A9F6C(0.0f, 1, 3, 1);
|
||||
Audio_QueueSeqCmd(0x100A00FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x0A00FF);
|
||||
}
|
||||
|
||||
this->unk_158 = this->unk_15A = 0;
|
||||
|
@ -3859,7 +3859,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
}
|
||||
|
||||
if (this->unk_17A[0] == 90) {
|
||||
Audio_QueueSeqCmd(NA_BGM_HEART_GET | 0x900);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_HEART_GET | 0x900);
|
||||
D_80B7A67C = 40;
|
||||
|
||||
if (this->unk_150 == 0) {
|
||||
|
@ -3971,7 +3971,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
D_80B7E148 = 520.0f;
|
||||
D_80B7E144 = 195.0f;
|
||||
Audio_QueueSeqCmd(0x100A00FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA00FF);
|
||||
D_80B7E0A6 = 20;
|
||||
D_80B7A6CC = 3;
|
||||
}
|
||||
|
@ -5207,7 +5207,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
D_80B7A6CC = 20;
|
||||
func_800A9F6C(0.0f, 150, 10, 10);
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
Audio_QueueSeqCmd(0x101400FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x1400FF);
|
||||
}
|
||||
|
||||
if (KREG(0) != 0) {
|
||||
|
@ -5216,7 +5216,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
D_80B7A6CC = 20;
|
||||
func_800A9F6C(0.0f, 150, 10, 10);
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
Audio_QueueSeqCmd(0x101400FF);
|
||||
Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x1400FF);
|
||||
}
|
||||
|
||||
if (D_80B7A6D0 != 0) {
|
||||
|
@ -5432,7 +5432,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
case 22:
|
||||
if (D_80B7A6D0 == 30) {
|
||||
Audio_QueueSeqCmd(NA_BGM_ITEM_GET | 0x900);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_ITEM_GET | 0x900);
|
||||
}
|
||||
|
||||
D_80B7A6D4 = 1;
|
||||
|
@ -5745,15 +5745,15 @@ void Fishing_DrawOwner(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (D_80B7E0A6 == 0) {
|
||||
if (sLinkAge != 1) {
|
||||
Audio_QueueSeqCmd(NA_BGM_KAKARIKO_ADULT);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(NA_BGM_KAKARIKO_KID);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
}
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
Audio_QueueSeqCmd(NA_BGM_KAKARIKO_ADULT);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_ADULT);
|
||||
} else {
|
||||
Audio_QueueSeqCmd(NA_BGM_KAKARIKO_KID);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_KAKARIKO_KID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1881,6 +1881,6 @@ void FileChoose_Init(GameState* thisx) {
|
|||
this->state.destroy = FileChoose_Destroy;
|
||||
FileChoose_InitContext(&this->state);
|
||||
Font_LoadOrderedFont(&this->font);
|
||||
Audio_QueueSeqCmd(0xF000000A);
|
||||
func_800F5E18(0, 0x57, 0, 7, 1);
|
||||
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
|
||||
func_800F5E18(SEQ_PLAYER_BGM_MAIN, NA_BGM_FILE_SELECT, 0, 7, 1);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
Audio_QueueSeqCmd(NA_BGM_STOP);
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
gSaveContext.entranceIndex = entranceIndex;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = -1;
|
||||
|
|
|
@ -3379,7 +3379,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
|
|||
gSaveContext.respawnFlag = -2;
|
||||
gSaveContext.nextTransition = 2;
|
||||
gSaveContext.health = 0x30;
|
||||
Audio_QueueSeqCmd(0xF000000A);
|
||||
Audio_QueueSeqCmd(0xF << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0xA);
|
||||
gSaveContext.healthAccumulator = 0;
|
||||
gSaveContext.unk_13F0 = 0;
|
||||
gSaveContext.unk_13F2 = 0;
|
||||
|
|
Loading…
Reference in a new issue