mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 23:14:37 +00:00
Rename "Sound" to "Sfx" (#1292)
* First attempt * More * rename * more sound -> sfx / sound effect (#7) * PR Suggestions * PR Suggestions * Small fix Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
1652b7e5d7
commit
1d19f37b26
321 changed files with 2879 additions and 2904 deletions
|
@ -1,12 +1,12 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
// sSoundRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
|
||||
u8 gSoundRequestWriteIndex = 0;
|
||||
u8 gSoundRequestReadIndex = 0;
|
||||
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
|
||||
u8 gSfxRequestWriteIndex = 0;
|
||||
u8 gSfxRequestReadIndex = 0;
|
||||
|
||||
/**
|
||||
* Array of pointers to arrays of SoundBankEntry of sizes: 9, 12, 22, 20, 8, 3, 5
|
||||
* Array of pointers to arrays of SfxBankEntry of sizes: 9, 12, 22, 20, 8, 3, 5
|
||||
*
|
||||
* 0 : Player Bank size 9
|
||||
* 1 : Item Bank size 12
|
||||
|
@ -16,11 +16,11 @@ u8 gSoundRequestReadIndex = 0;
|
|||
* 5 : Ocarina Bank size 3
|
||||
* 6 : Voice Bank size 5
|
||||
*/
|
||||
SoundBankEntry* gSoundBanks[7] = {
|
||||
SfxBankEntry* gSfxBanks[7] = {
|
||||
D_8016BAD0, D_8016BC80, D_8016BEC0, D_8016C2E0, D_8016C6A0, D_8016C820, D_8016C8B0,
|
||||
};
|
||||
|
||||
u8 gSoundBankSizes[ARRAY_COUNT(gSoundBanks)] = {
|
||||
u8 gSfxBankSizes[ARRAY_COUNT(gSfxBanks)] = {
|
||||
ARRAY_COUNT(D_8016BAD0), ARRAY_COUNT(D_8016BC80), ARRAY_COUNT(D_8016BEC0), ARRAY_COUNT(D_8016C2E0),
|
||||
ARRAY_COUNT(D_8016C6A0), ARRAY_COUNT(D_8016C820), ARRAY_COUNT(D_8016C8B0),
|
||||
};
|
||||
|
|
|
@ -5,37 +5,37 @@
|
|||
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \
|
||||
(((randParam) << SFX_PARAM_67_SHIFT) & SFX_PARAM_67_MASK) | (flags)) },
|
||||
|
||||
SoundParams sEnemyBankParams[] = {
|
||||
SfxParams sEnemyBankParams[] = {
|
||||
#include "tables/sfx/enemybank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sPlayerBankParams[] = {
|
||||
SfxParams sPlayerBankParams[] = {
|
||||
#include "tables/sfx/playerbank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sItemBankParams[] = {
|
||||
SfxParams sItemBankParams[] = {
|
||||
#include "tables/sfx/itembank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sEnvBankParams[] = {
|
||||
SfxParams sEnvBankParams[] = {
|
||||
#include "tables/sfx/environmentbank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sSystemBankParams[] = {
|
||||
SfxParams sSystemBankParams[] = {
|
||||
#include "tables/sfx/systembank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sOcarinaBankParams[] = {
|
||||
SfxParams sOcarinaBankParams[] = {
|
||||
#include "tables/sfx/ocarinabank_table.h"
|
||||
};
|
||||
|
||||
SoundParams sVoiceBankParams[] = {
|
||||
SfxParams sVoiceBankParams[] = {
|
||||
#include "tables/sfx/voicebank_table.h"
|
||||
};
|
||||
|
||||
#undef DEFINE_SFX
|
||||
|
||||
SoundParams* gSoundParams[7] = {
|
||||
SfxParams* gSfxParams[7] = {
|
||||
sPlayerBankParams, sItemBankParams, sEnvBankParams, sEnemyBankParams,
|
||||
sSystemBankParams, sOcarinaBankParams, sVoiceBankParams,
|
||||
};
|
|
@ -93,7 +93,7 @@ typedef struct {
|
|||
s8 y;
|
||||
} OcarinaStick;
|
||||
|
||||
u8 gIsLargeSoundBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
|
||||
u8 gIsLargeSfxBank[7] = { 0, 0, 0, 1, 0, 0, 0 };
|
||||
|
||||
// Only the first row of these is supported by sequence 0. (gSfxChannelLayout is always 0.)
|
||||
u8 gChannelsPerBank[4][7] = {
|
||||
|
@ -1739,8 +1739,8 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
|
|||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, sOcarinaInstrumentId - 1);
|
||||
// Sets pitch to io port 5
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, sCurOcarinaPitch);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sRelativeOcarinaVolume,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sRelativeOcarinaVolume,
|
||||
&gSfxDefaultReverb);
|
||||
} else if ((sPrevOcarinaPitch != OCARINA_PITCH_NONE) && (sCurOcarinaPitch == OCARINA_PITCH_NONE)) {
|
||||
// Stops ocarina sound when transitioning from playing to not playing a note
|
||||
Audio_StopSfxById(NA_SE_OC_OCARINA);
|
||||
|
@ -1778,7 +1778,7 @@ void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) {
|
|||
|
||||
AudioOcarina_PlayControllerInput(false);
|
||||
Audio_StopSfxById(NA_SE_OC_OCARINA);
|
||||
Audio_SetSoundBanksMute(0);
|
||||
Audio_SetSfxBanksMute(0);
|
||||
sPlaybackState = 0;
|
||||
sPlaybackStaffPos = 0;
|
||||
sIsOcarinaInputEnabled = false;
|
||||
|
@ -1912,8 +1912,8 @@ void AudioOcarina_PlaybackSong(void) {
|
|||
// Sets sPlaybackPitch to channelIdx io port 5
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5,
|
||||
sPlaybackPitch & 0x3F);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend,
|
||||
&sRelativeNotePlaybackVolume, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend,
|
||||
&sRelativeNotePlaybackVolume, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_StopSfxById(NA_SE_OC_OCARINA);
|
||||
}
|
||||
|
@ -2276,7 +2276,7 @@ void AudioOcarina_PlayLongScarecrowAfterCredits(void) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
Audio_SetSoundBanksMute(0);
|
||||
Audio_SetSfxBanksMute(0);
|
||||
AudioOcarina_SetInstrument(sScarecrowAfterCreditsIntrumentId);
|
||||
AudioOcarina_SetPlaybackSong(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
sScarecrowAfterCreditsIntrumentId++;
|
||||
|
@ -2339,7 +2339,7 @@ char sAudioDebugPageNames[15][23] = {
|
|||
};
|
||||
u16 sAudioSndContWork[11] = { 0 };
|
||||
u16 sAudioSndContWorkLims[11] = { 128, 128, 7, 512, 4, 2, 16, 32, 2, 2, 2 };
|
||||
char sSoundBankNames[7][11] = { "PLAYER", "ITEM", "ENVIROMENT", "ENEMY", "SYSTEM", "OCARINA", "VOICE" };
|
||||
char sSfxBankNames[7][11] = { "PLAYER", "ITEM", "ENVIROMENT", "ENEMY", "SYSTEM", "OCARINA", "VOICE" };
|
||||
char sSoundModeNames[5][10] = { "W-STEREO", "HEADPHONE", "3D SOUND", "MONO", "" };
|
||||
s8 sAudioIntInfoX = 0;
|
||||
s8 sAudioIntInfoY = 0;
|
||||
|
@ -2480,17 +2480,17 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
GfxPrint_Printf(printer, "PUSH CONT-4 A-BTN");
|
||||
|
||||
ind = (s8)sAudioSndContWork[2];
|
||||
i = gSoundBanks[ind][0].next;
|
||||
i = gSfxBanks[ind][0].next;
|
||||
j = 0;
|
||||
SETCOL(255, 255, 255);
|
||||
GfxPrint_SetPos(printer, 3, 6);
|
||||
GfxPrint_Printf(printer, "SE HANDLE:%s", sSoundBankNames[ind]);
|
||||
GfxPrint_Printf(printer, "SE HANDLE:%s", sSfxBankNames[ind]);
|
||||
|
||||
while (i != 0xFF) {
|
||||
GfxPrint_SetPos(printer, 3, 7 + j++);
|
||||
GfxPrint_Printf(printer, "%02x %04x %02x %08x", i, gSoundBanks[ind][i].sfxId, gSoundBanks[ind][i].state,
|
||||
gSoundBanks[ind][i].priority);
|
||||
i = gSoundBanks[ind][i].next;
|
||||
GfxPrint_Printf(printer, "%02x %04x %02x %08x", i, gSfxBanks[ind][i].sfxId, gSfxBanks[ind][i].state,
|
||||
gSfxBanks[ind][i].priority);
|
||||
i = gSfxBanks[ind][i].next;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2507,7 +2507,7 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
GfxPrint_Printf(printer, "Seq 1 : %2x", sAudioSndContWork[1]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 6);
|
||||
GfxPrint_Printf(printer, "SE HD : %2x %s", sAudioSndContWork[2], sSoundBankNames[sAudioSndContWork[2]]);
|
||||
GfxPrint_Printf(printer, "SE HD : %2x %s", sAudioSndContWork[2], sSfxBankNames[sAudioSndContWork[2]]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 7);
|
||||
GfxPrint_Printf(printer, "SE No. :%3x", sAudioSndContWork[3]);
|
||||
|
@ -2543,11 +2543,11 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
SETCOL(255, 255, 255);
|
||||
}
|
||||
GfxPrint_SetPos(printer, 2 + sAudioIntInfoX, 4 + ind + sAudioIntInfoY);
|
||||
GfxPrint_Printf(printer, "%s <%d>", sSoundBankNames[k], sAudioIntInfoBankPage[k]);
|
||||
GfxPrint_Printf(printer, "%s <%d>", sSfxBankNames[k], sAudioIntInfoBankPage[k]);
|
||||
|
||||
for (k2 = 0; k2 < gChannelsPerBank[gSfxChannelLayout][k]; k2++) {
|
||||
#define entryIndex (gActiveSounds[k][k2].entryIndex)
|
||||
#define entry (&gSoundBanks[k][entryIndex])
|
||||
#define entryIndex (gActiveSfx[k][k2].entryIndex)
|
||||
#define entry (&gSfxBanks[k][entryIndex])
|
||||
#define chan (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[entry->channelIdx])
|
||||
GfxPrint_SetPos(printer, 2 + sAudioIntInfoX, 5 + ind + sAudioIntInfoY);
|
||||
if (sAudioIntInfoBankPage[k] == 1) {
|
||||
|
@ -2613,25 +2613,25 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
GfxPrint_Printf(printer, "Color : %d", sAudioScrPrtWork[2]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 7);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[0], sAudioScrPrtWork[3]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[0], sAudioScrPrtWork[3]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 8);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[1], sAudioScrPrtWork[4]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[1], sAudioScrPrtWork[4]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 9);
|
||||
GfxPrint_Printf(printer, "ENVRONM : %d", sAudioScrPrtWork[5]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 10);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[3], sAudioScrPrtWork[6]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[3], sAudioScrPrtWork[6]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 11);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[4], sAudioScrPrtWork[7]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[4], sAudioScrPrtWork[7]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 12);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[5], sAudioScrPrtWork[8]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[5], sAudioScrPrtWork[8]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 13);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSoundBankNames[6], sAudioScrPrtWork[9]);
|
||||
GfxPrint_Printf(printer, "%s : %d", sSfxBankNames[6], sAudioScrPrtWork[9]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 14);
|
||||
GfxPrint_Printf(printer, "SEQ ENT : %d", sAudioScrPrtWork[10]);
|
||||
|
@ -3000,22 +3000,22 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
SETCOL(255, 255, 255);
|
||||
GfxPrint_SetPos(printer, 3, 4);
|
||||
GfxPrint_Printf(printer, "SE HD : %02x %s", sAudioSfxParamChgWork[0],
|
||||
sSoundBankNames[sAudioSfxParamChgWork[0]]);
|
||||
sSfxBankNames[sAudioSfxParamChgWork[0]]);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 5);
|
||||
GfxPrint_Printf(printer, "SE No. : %02x", sAudioSfxParamChgWork[1]);
|
||||
|
||||
GfxPrint_SetPos(printer, 20, 6);
|
||||
GfxPrint_Printf(printer, " : %04x",
|
||||
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params);
|
||||
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params);
|
||||
|
||||
GfxPrint_SetPos(printer, 3, 6);
|
||||
GfxPrint_Printf(
|
||||
printer, "SE SW %s",
|
||||
AudioDebug_ToStringBinary(gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params, 16));
|
||||
AudioDebug_ToStringBinary(gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params, 16));
|
||||
|
||||
SETCOL(127, 255, 127);
|
||||
digitStr[0] = (char)('0' + ((gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params >>
|
||||
digitStr[0] = (char)('0' + ((gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params >>
|
||||
(15 - sAudioSfxParamChgBitSel)) &
|
||||
1));
|
||||
GfxPrint_SetPos(printer, 12 + sAudioSfxParamChgBitSel, 6);
|
||||
|
@ -3024,7 +3024,7 @@ void AudioDebug_Draw(GfxPrint* printer) {
|
|||
SETCOL(255, 255, 255);
|
||||
GfxPrint_SetPos(printer, 3, 7);
|
||||
GfxPrint_Printf(printer, "SE PR : %02x",
|
||||
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance);
|
||||
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance);
|
||||
break;
|
||||
|
||||
case PAGE_FREE_AREA:
|
||||
|
@ -3161,9 +3161,9 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
Audio_PlaySoundGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG,
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
case 4:
|
||||
func_800F6700(sAudioSndContWork[sAudioSndContSel]);
|
||||
|
@ -3185,7 +3185,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
|
|||
case 9:
|
||||
break;
|
||||
case 10:
|
||||
Audio_SetSoundBanksMute(sAudioSndContWork[sAudioSndContSel] * 0x7F);
|
||||
Audio_SetSfxBanksMute(sAudioSndContWork[sAudioSndContSel] * 0x7F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3537,7 +3537,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
|
|||
sAudioSfxParamChgWork[sAudioSfxParamChgSel] &= 0x1FF;
|
||||
}
|
||||
} else if (sAudioSfxParamChgSel == 3) {
|
||||
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance -= step;
|
||||
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance -= step;
|
||||
} else {
|
||||
sAudioSfxParamChgBitSel = (sAudioSfxParamChgBitSel - 1) & 0xF;
|
||||
}
|
||||
|
@ -3556,7 +3556,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
|
|||
sAudioSfxParamChgWork[sAudioSfxParamChgSel] &= 0x1FF;
|
||||
}
|
||||
} else if (sAudioSfxParamChgSel == 3) {
|
||||
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance += step;
|
||||
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].importance += step;
|
||||
} else {
|
||||
sAudioSfxParamChgBitSel = (sAudioSfxParamChgBitSel + 1) & 0xF;
|
||||
}
|
||||
|
@ -3564,8 +3564,8 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
|
|||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
|
||||
sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG;
|
||||
Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
|
@ -3574,7 +3574,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
|
|||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_CDOWN)) {
|
||||
if (sAudioSfxParamChgSel == 2) {
|
||||
gSoundParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params ^=
|
||||
gSfxParams[sAudioSfxParamChgWork[0]][sAudioSfxParamChgWork[1]].params ^=
|
||||
(1 << (0xF - sAudioSfxParamChgBitSel));
|
||||
}
|
||||
}
|
||||
|
@ -3615,7 +3615,7 @@ void AudioDebug_ProcessInput(void) {
|
|||
}
|
||||
|
||||
if (sAudioSfxMuted) {
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
Audio_SetSfxBanksMute(0x6F);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_L)) {
|
||||
|
@ -3654,7 +3654,7 @@ void AudioDebug_ProcessInput(void) {
|
|||
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {
|
||||
sAudioSfxMuted ^= 1;
|
||||
if (!sAudioSfxMuted) {
|
||||
Audio_SetSoundBanksMute(0);
|
||||
Audio_SetSfxBanksMute(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -3712,7 +3712,7 @@ void func_800F3054(void) {
|
|||
if (gAudioSpecId == 7) {
|
||||
Audio_ClearSariaBgm();
|
||||
}
|
||||
Audio_ProcessSoundRequests();
|
||||
Audio_ProcessSfxRequests();
|
||||
Audio_ProcessSeqCmds();
|
||||
func_800F8F88();
|
||||
func_800FA3DC();
|
||||
|
@ -3734,8 +3734,8 @@ void func_800F314C(s8 arg0) {
|
|||
Audio_QueueCmdS32(0x82 << 24 | SEQ_PLAYER_BGM_MAIN << 16 | (((u8)arg0 & 0xFF) << 8), 1);
|
||||
}
|
||||
|
||||
f32 Audio_ComputeSoundVolume(u8 bankId, u8 entryIdx) {
|
||||
SoundBankEntry* bankEntry = &gSoundBanks[bankId][entryIdx];
|
||||
f32 Audio_ComputeSfxVolume(u8 bankId, u8 entryIdx) {
|
||||
SfxBankEntry* bankEntry = &gSfxBanks[bankId][entryIdx];
|
||||
f32 minDist;
|
||||
f32 baseDist;
|
||||
f32 ret;
|
||||
|
@ -3779,10 +3779,10 @@ f32 Audio_ComputeSoundVolume(u8 bankId, u8 entryIdx) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
s8 Audio_ComputeSoundReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
||||
s8 Audio_ComputeSfxReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
||||
s8 distAdd = 0;
|
||||
s32 scriptAdd = 0;
|
||||
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
|
||||
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
|
||||
s32 reverb;
|
||||
|
||||
if (!(entry->sfxParams & SFX_FLAG_12)) {
|
||||
|
@ -3812,7 +3812,7 @@ s8 Audio_ComputeSoundReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
|||
return reverb;
|
||||
}
|
||||
|
||||
s8 Audio_ComputeSoundPanSigned(f32 x, f32 z, u8 token) {
|
||||
s8 Audio_ComputeSfxPanSigned(f32 x, f32 z, u8 token) {
|
||||
f32 absX;
|
||||
f32 absZ;
|
||||
f32 pan;
|
||||
|
@ -3855,9 +3855,9 @@ s8 Audio_ComputeSoundPanSigned(f32 x, f32 z, u8 token) {
|
|||
return (s8)((pan * 127.0f) + 0.5f);
|
||||
}
|
||||
|
||||
f32 Audio_ComputeSoundFreqScale(u8 bankId, u8 entryIdx) {
|
||||
f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) {
|
||||
s32 phi_v0 = 0;
|
||||
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
|
||||
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
|
||||
f32 unk1C;
|
||||
f32 freq = 1.0f;
|
||||
|
||||
|
@ -3908,7 +3908,7 @@ f32 Audio_ComputeSoundFreqScale(u8 bankId, u8 entryIdx) {
|
|||
return freq;
|
||||
}
|
||||
|
||||
u8 func_800F37B8(f32 behindScreenZ, SoundBankEntry* arg1, s8 arg2) {
|
||||
u8 func_800F37B8(f32 behindScreenZ, SfxBankEntry* arg1, s8 arg2) {
|
||||
s8 phi_v0;
|
||||
u8 phi_v1;
|
||||
f32 phi_f0;
|
||||
|
@ -3968,7 +3968,7 @@ s8 func_800F3990(f32 arg0, u16 sfxParams) {
|
|||
return ret | 1;
|
||||
}
|
||||
|
||||
void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
||||
void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
||||
f32 vol = 1.0f;
|
||||
s8 volS8;
|
||||
s8 reverb = 0;
|
||||
|
@ -3979,7 +3979,7 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
|||
s8 sp38 = 0;
|
||||
f32 behindScreenZ;
|
||||
u8 baseFilter = 0;
|
||||
SoundBankEntry* entry = &gSoundBanks[bankId][entryIdx];
|
||||
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
|
||||
|
||||
switch (bankId) {
|
||||
case BANK_PLAYER:
|
||||
|
@ -3993,10 +3993,10 @@ void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx) {
|
|||
FALLTHROUGH;
|
||||
case BANK_OCARINA:
|
||||
entry->dist = sqrtf(entry->dist);
|
||||
vol = Audio_ComputeSoundVolume(bankId, entryIdx) * *entry->vol;
|
||||
reverb = Audio_ComputeSoundReverb(bankId, entryIdx, channelIdx);
|
||||
panSigned = Audio_ComputeSoundPanSigned(*entry->posX, *entry->posZ, entry->token);
|
||||
freqScale = Audio_ComputeSoundFreqScale(bankId, entryIdx) * *entry->freqScale;
|
||||
vol = Audio_ComputeSfxVolume(bankId, entryIdx) * *entry->vol;
|
||||
reverb = Audio_ComputeSfxReverb(bankId, entryIdx, channelIdx);
|
||||
panSigned = Audio_ComputeSfxPanSigned(*entry->posX, *entry->posZ, entry->token);
|
||||
freqScale = Audio_ComputeSfxFreqScale(bankId, entryIdx) * *entry->freqScale;
|
||||
|
||||
if (sSoundMode == SOUNDMODE_SURROUND) {
|
||||
behindScreenZ = sBehindScreenZ[(entry->sfxParams & SFX_FLAG_10) >> SFX_FLAG_10_SHIFT];
|
||||
|
@ -4092,7 +4092,7 @@ void Audio_ResetSfxChannelState(void) {
|
|||
}
|
||||
|
||||
void Audio_PlayCutsceneEffectsSequence(u8 csEffectType) {
|
||||
if (gSoundBankMuted[0] != 1) {
|
||||
if (gSfxBankMuted[0] != 1) {
|
||||
Audio_StartSeq(SEQ_PLAYER_BGM_SUB, 0, NA_BGM_CUTSCENE_EFFECTS);
|
||||
Audio_SeqCmd8(SEQ_PLAYER_BGM_SUB, 0, 0, csEffectType);
|
||||
}
|
||||
|
@ -4120,7 +4120,7 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
|
|||
|
||||
D_80131C8C = arg2;
|
||||
sp24 = func_800F3F84(arg2);
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
|
||||
|
||||
if ((sfxId & 0xF0) == 0xB0) {
|
||||
phi_f0 = 0.3f;
|
||||
|
@ -4138,23 +4138,23 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
|
|||
sfxId2 = NA_SE_PL_METALEFFECT_KID;
|
||||
}
|
||||
D_8016B7AC = (sp24 * 0.7) + 0.3;
|
||||
Audio_PlaySoundGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId2, pos, 4, &D_8016B7B0, &D_8016B7AC, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F4138(Vec3f* pos, u16 sfxId, f32 arg2) {
|
||||
func_800F3F84(arg2);
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4190(Vec3f* pos, u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4);
|
||||
}
|
||||
void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
|
||||
void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
|
||||
u8 offset = Audio_NextRandom() % randLim;
|
||||
|
||||
Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4254(Vec3f* pos, u8 level) {
|
||||
|
@ -4163,12 +4163,12 @@ void func_800F4254(Vec3f* pos, u8 level) {
|
|||
D_801305F4 = D_801305E4[level];
|
||||
switch (level) {
|
||||
case 1:
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
case 2:
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4176,8 +4176,8 @@ void func_800F4254(Vec3f* pos, u8 level) {
|
|||
}
|
||||
|
||||
if (level != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4189,14 +4189,14 @@ void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2) {
|
|||
}
|
||||
|
||||
if (D_8016B7D8 > 0.5f) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F4414(Vec3f* pos, u16 sfxId, f32 arg2) {
|
||||
D_801305B8--;
|
||||
if (D_801305B8 == 0) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (arg2 > 2.0f) {
|
||||
arg2 = 2.0f;
|
||||
|
@ -4213,12 +4213,12 @@ void func_800F44EC(s8 arg0, s8 arg1) {
|
|||
|
||||
void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2) {
|
||||
D_8016B7DC = arg2;
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC);
|
||||
}
|
||||
|
||||
void func_800F4578(Vec3f* pos, u16 sfxId, f32 arg2) {
|
||||
D_8016B7E0 = arg2;
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F45D0(f32 arg0) {
|
||||
|
@ -4226,7 +4226,7 @@ void func_800F45D0(f32 arg0) {
|
|||
func_800F436C(&gSfxDefaultPos, 0, (0.15f * arg0) + 1.4f);
|
||||
}
|
||||
|
||||
void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
|
||||
void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale) {
|
||||
if (!Audio_IsSfxPlaying(NA_SE_EV_RIVER_STREAM - SFX_FLAG)) {
|
||||
sRiverFreqScaleLerp.value = freqScale;
|
||||
} else if (freqScale != sRiverFreqScaleLerp.value) {
|
||||
|
@ -4234,11 +4234,11 @@ void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) {
|
|||
sRiverFreqScaleLerp.remainingFrames = 40;
|
||||
sRiverFreqScaleLerp.step = (sRiverFreqScaleLerp.target - sRiverFreqScaleLerp.value) / 40;
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
|
||||
void Audio_PlaySfxWaterfall(Vec3f* pos, f32 freqScale) {
|
||||
if (!Audio_IsSfxPlaying(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG)) {
|
||||
sWaterfallFreqScaleLerp.value = freqScale;
|
||||
} else if (freqScale != sWaterfallFreqScaleLerp.value) {
|
||||
|
@ -4246,8 +4246,8 @@ void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) {
|
|||
sWaterfallFreqScaleLerp.remainingFrames = 40;
|
||||
sWaterfallFreqScaleLerp.step = (sWaterfallFreqScaleLerp.target - sWaterfallFreqScaleLerp.value) / 40;
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value,
|
||||
&sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value,
|
||||
&sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void Audio_StepFreqLerp(FreqLerp* lerp) {
|
||||
|
@ -4389,9 +4389,9 @@ void Audio_UpdateRiverSoundVolumes(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gPitchFrequencies[semitones[sAudioIncreasingTranspose] + 39],
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
void Audio_PlaySfxIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) {
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &gPitchFrequencies[semitones[sAudioIncreasingTranspose] + 39],
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (sAudioIncreasingTranspose < 15) {
|
||||
sAudioIncreasingTranspose++;
|
||||
|
@ -4402,9 +4402,9 @@ void Audio_ResetIncreasingTranspose(void) {
|
|||
sAudioIncreasingTranspose = 0;
|
||||
}
|
||||
|
||||
void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gPitchFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
void Audio_PlaySfxTransposed(Vec3f* pos, u16 sfxId, s8 semitone) {
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &gPitchFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) {
|
||||
|
@ -4418,14 +4418,14 @@ 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)) {
|
||||
if ((gActiveSfx[bankId][i].entryIndex != 0xFF) &&
|
||||
(sfxId == gSfxBanks[bankId][gActiveSfx[bankId][i].entryIndex].sfxId)) {
|
||||
Audio_QueueCmdS8(
|
||||
_SHIFTL(0x6, 24, 8) | _SHIFTL(SEQ_PLAYER_SFX, 16, 8) | _SHIFTL(phi_s1, 8, 8) | _SHIFTL(6, 0, 8), arg2);
|
||||
}
|
||||
phi_s1++;
|
||||
}
|
||||
Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F4E30(Vec3f* pos, f32 arg1) {
|
||||
|
@ -4958,12 +4958,12 @@ void func_800F6268(f32 dist, u16 arg1) {
|
|||
void func_800F64E0(u8 arg0) {
|
||||
D_80130608 = arg0;
|
||||
if (arg0 != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_QueueCmdS32(0xF1000000, 0);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_QueueCmdS32(0xF2000000, 0);
|
||||
}
|
||||
}
|
||||
|
@ -5044,8 +5044,8 @@ void Audio_SetBaseFilter(u8 filter) {
|
|||
if (filter == 0) {
|
||||
Audio_StopSfxById(NA_SE_PL_IN_BUBBLE);
|
||||
} else if (sAudioBaseFilter == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
sAudioBaseFilter = filter;
|
||||
|
@ -5071,15 +5071,15 @@ void Audio_SetCutsceneFlag(s8 flag) {
|
|||
sAudioCutsceneFlag = flag;
|
||||
}
|
||||
|
||||
void Audio_PlaySoundGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32* freqScale, f32* arg4, s8* reverbAdd) {
|
||||
void Audio_PlaySfxGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32* freqScale, f32* arg4, s8* reverbAdd) {
|
||||
if (!sAudioCutsceneFlag) {
|
||||
Audio_PlaySoundGeneral(sfxId, pos, arg2, freqScale, arg4, reverbAdd);
|
||||
Audio_PlaySfxGeneral(sfxId, pos, arg2, freqScale, arg4, reverbAdd);
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_PlaySoundIfNotInCutscene(u16 sfxId) {
|
||||
Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
void Audio_PlaySfxIfNotInCutscene(u16 sfxId) {
|
||||
Audio_PlaySfxGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800F6964(u16 arg0) {
|
||||
|
@ -5272,7 +5272,7 @@ void Audio_InitSound(void) {
|
|||
AudioOcarina_ResetStaffs();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800FAEB4();
|
||||
Audio_ResetSounds();
|
||||
Audio_ResetSfx();
|
||||
func_800F9280(SEQ_PLAYER_SFX, 0, 0x70, 10);
|
||||
}
|
||||
|
||||
|
@ -5289,7 +5289,7 @@ void func_800F71BC(s32 arg0) {
|
|||
AudioOcarina_ResetStaffs();
|
||||
Audio_ResetSfxChannelState();
|
||||
func_800FADF8();
|
||||
Audio_ResetSounds();
|
||||
Audio_ResetSfx();
|
||||
}
|
||||
|
||||
void func_800F7208(void) {
|
||||
|
|
|
@ -9,7 +9,7 @@ typedef struct {
|
|||
/* 0x0C */ f32* freqScale;
|
||||
/* 0x10 */ f32* vol;
|
||||
/* 0x14 */ s8* reverbAdd;
|
||||
} SoundRequest; // size = 0x18
|
||||
} SfxRequest; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 value;
|
||||
|
@ -18,33 +18,33 @@ typedef struct {
|
|||
/* 0x0C */ u16 remainingFrames;
|
||||
} UnusedBankLerp; // size = 0x10
|
||||
|
||||
SoundBankEntry D_8016BAD0[9];
|
||||
SoundBankEntry D_8016BC80[12];
|
||||
SoundBankEntry D_8016BEC0[22];
|
||||
SoundBankEntry D_8016C2E0[20];
|
||||
SoundBankEntry D_8016C6A0[8];
|
||||
SoundBankEntry D_8016C820[3];
|
||||
SoundBankEntry D_8016C8B0[5];
|
||||
SoundRequest sSoundRequests[0x100];
|
||||
u8 sSoundBankListEnd[7];
|
||||
u8 sSoundBankFreeListStart[7];
|
||||
u8 sSoundBankUnused[7];
|
||||
ActiveSound gActiveSounds[7][3];
|
||||
SfxBankEntry D_8016BAD0[9];
|
||||
SfxBankEntry D_8016BC80[12];
|
||||
SfxBankEntry D_8016BEC0[22];
|
||||
SfxBankEntry D_8016C2E0[20];
|
||||
SfxBankEntry D_8016C6A0[8];
|
||||
SfxBankEntry D_8016C820[3];
|
||||
SfxBankEntry D_8016C8B0[5];
|
||||
SfxRequest sSfxRequests[0x100];
|
||||
u8 sSfxBankListEnd[7];
|
||||
u8 sSfxBankFreeListStart[7];
|
||||
u8 sSfxBankUnused[7];
|
||||
ActiveSfx gActiveSfx[7][3];
|
||||
u8 sCurSfxPlayerChannelIdx;
|
||||
u8 gSoundBankMuted[7];
|
||||
u8 gSfxBankMuted[7];
|
||||
UnusedBankLerp sUnusedBankLerp[7];
|
||||
u16 gAudioSfxSwapSource[10];
|
||||
u16 gAudioSfxSwapTarget[10];
|
||||
u8 gAudioSfxSwapMode[10];
|
||||
|
||||
void Audio_SetSoundBanksMute(u16 muteMask) {
|
||||
void Audio_SetSfxBanksMute(u16 muteMask) {
|
||||
u8 bankId;
|
||||
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
|
||||
if (muteMask & 1) {
|
||||
gSoundBankMuted[bankId] = true;
|
||||
gSfxBankMuted[bankId] = true;
|
||||
} else {
|
||||
gSoundBankMuted[bankId] = false;
|
||||
gSfxBankMuted[bankId] = false;
|
||||
}
|
||||
muteMask = muteMask >> 1;
|
||||
}
|
||||
|
@ -64,12 +64,12 @@ void Audio_ClearBGMMute(u8 channelIdx) {
|
|||
}
|
||||
}
|
||||
|
||||
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
|
||||
void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
|
||||
u8 i;
|
||||
SoundRequest* req;
|
||||
SfxRequest* req;
|
||||
|
||||
if (!gSoundBankMuted[SFX_BANK_SHIFT(sfxId)]) {
|
||||
req = &sSoundRequests[gSoundRequestWriteIndex];
|
||||
if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) {
|
||||
req = &sSfxRequests[gSfxRequestWriteIndex];
|
||||
if (!gAudioSfxSwapOff) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (sfxId == gAudioSfxSwapSource[i]) {
|
||||
|
@ -82,8 +82,8 @@ void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32
|
|||
req->freqScale = freqScale;
|
||||
req->vol = vol;
|
||||
req->reverbAdd = reverbAdd;
|
||||
gSoundRequestWriteIndex++;
|
||||
req = &sSoundRequests[gSoundRequestWriteIndex];
|
||||
gSfxRequestWriteIndex++;
|
||||
req = &sSfxRequests[gSfxRequestWriteIndex];
|
||||
}
|
||||
i = 10; // "break;"
|
||||
}
|
||||
|
@ -95,18 +95,18 @@ void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32
|
|||
req->freqScale = freqScale;
|
||||
req->vol = vol;
|
||||
req->reverbAdd = reverbAdd;
|
||||
gSoundRequestWriteIndex++;
|
||||
gSfxRequestWriteIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_RemoveMatchingSoundRequests(u8 aspect, SoundBankEntry* cmp) {
|
||||
SoundRequest* req;
|
||||
void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* cmp) {
|
||||
SfxRequest* req;
|
||||
s32 remove;
|
||||
u8 i = gSoundRequestReadIndex;
|
||||
u8 i = gSfxRequestReadIndex;
|
||||
|
||||
for (; i != gSoundRequestWriteIndex; i++) {
|
||||
for (; i != gSfxRequestWriteIndex; i++) {
|
||||
remove = false;
|
||||
req = &sSoundRequests[i];
|
||||
req = &sSfxRequests[i];
|
||||
switch (aspect) {
|
||||
case 0:
|
||||
if (SFX_BANK_MASK(req->sfxId) == SFX_BANK_MASK(cmp->sfxId)) {
|
||||
|
@ -145,18 +145,18 @@ void Audio_RemoveMatchingSoundRequests(u8 aspect, SoundBankEntry* cmp) {
|
|||
}
|
||||
}
|
||||
|
||||
void Audio_ProcessSoundRequest(void) {
|
||||
void Audio_ProcessSfxRequest(void) {
|
||||
u16 sfxId;
|
||||
u8 count;
|
||||
u8 index;
|
||||
SoundRequest* req;
|
||||
SoundBankEntry* entry;
|
||||
SoundParams* soundParams;
|
||||
SfxRequest* req;
|
||||
SfxBankEntry* entry;
|
||||
SfxParams* sfxParams;
|
||||
s32 bankId;
|
||||
u8 evictImportance;
|
||||
u8 evictIndex;
|
||||
|
||||
req = &sSoundRequests[gSoundRequestReadIndex];
|
||||
req = &sSfxRequests[gSfxRequestReadIndex];
|
||||
evictIndex = 0x80;
|
||||
if (req->sfxId == 0) {
|
||||
return;
|
||||
|
@ -167,29 +167,29 @@ void Audio_ProcessSoundRequest(void) {
|
|||
bankId = SFX_BANK(req->sfxId);
|
||||
}
|
||||
count = 0;
|
||||
index = gSoundBanks[bankId][0].next;
|
||||
index = gSfxBanks[bankId][0].next;
|
||||
while (index != 0xFF && index != 0) {
|
||||
if (gSoundBanks[bankId][index].posX == &req->pos->x) {
|
||||
if ((gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].params & SFX_FLAG_5) &&
|
||||
gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance ==
|
||||
gSoundBanks[bankId][index].sfxImportance) {
|
||||
if (gSfxBanks[bankId][index].posX == &req->pos->x) {
|
||||
if ((gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].params & SFX_FLAG_5) &&
|
||||
gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance ==
|
||||
gSfxBanks[bankId][index].sfxImportance) {
|
||||
return;
|
||||
}
|
||||
if (gSoundBanks[bankId][index].sfxId == req->sfxId) {
|
||||
if (gSfxBanks[bankId][index].sfxId == req->sfxId) {
|
||||
count = gUsedChannelsPerBank[gSfxChannelLayout][bankId];
|
||||
} else {
|
||||
if (count == 0) {
|
||||
evictIndex = index;
|
||||
sfxId = gSoundBanks[bankId][index].sfxId & 0xFFFF;
|
||||
evictImportance = gSoundParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
|
||||
} else if (gSoundBanks[bankId][index].sfxImportance < evictImportance) {
|
||||
sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF;
|
||||
evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
|
||||
} else if (gSfxBanks[bankId][index].sfxImportance < evictImportance) {
|
||||
evictIndex = index;
|
||||
sfxId = gSoundBanks[bankId][index].sfxId & 0xFFFF;
|
||||
evictImportance = gSoundParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
|
||||
sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF;
|
||||
evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance;
|
||||
}
|
||||
count++;
|
||||
if (count == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) {
|
||||
if (gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance >= evictImportance) {
|
||||
if (gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance >= evictImportance) {
|
||||
index = evictIndex;
|
||||
} else {
|
||||
index = 0;
|
||||
|
@ -197,34 +197,34 @@ void Audio_ProcessSoundRequest(void) {
|
|||
}
|
||||
}
|
||||
if (count == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) {
|
||||
soundParams = &gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
|
||||
if ((req->sfxId & 0xC00) || (soundParams->params & SFX_FLAG_2) || (index == evictIndex)) {
|
||||
if ((gSoundBanks[bankId][index].sfxParams & SFX_FLAG_3) &&
|
||||
gSoundBanks[bankId][index].state != SFX_STATE_QUEUED) {
|
||||
Audio_ClearBGMMute(gSoundBanks[bankId][index].channelIdx);
|
||||
sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
|
||||
if ((req->sfxId & 0xC00) || (sfxParams->params & SFX_FLAG_2) || (index == evictIndex)) {
|
||||
if ((gSfxBanks[bankId][index].sfxParams & SFX_FLAG_3) &&
|
||||
gSfxBanks[bankId][index].state != SFX_STATE_QUEUED) {
|
||||
Audio_ClearBGMMute(gSfxBanks[bankId][index].channelIdx);
|
||||
}
|
||||
gSoundBanks[bankId][index].token = req->token;
|
||||
gSoundBanks[bankId][index].sfxId = req->sfxId;
|
||||
gSoundBanks[bankId][index].state = SFX_STATE_QUEUED;
|
||||
gSoundBanks[bankId][index].freshness = 2;
|
||||
gSoundBanks[bankId][index].freqScale = req->freqScale;
|
||||
gSoundBanks[bankId][index].vol = req->vol;
|
||||
gSoundBanks[bankId][index].reverbAdd = req->reverbAdd;
|
||||
gSoundBanks[bankId][index].sfxParams = soundParams->params;
|
||||
gSoundBanks[bankId][index].sfxImportance = soundParams->importance;
|
||||
} else if (gSoundBanks[bankId][index].state == SFX_STATE_PLAYING_2) {
|
||||
gSoundBanks[bankId][index].state = SFX_STATE_PLAYING_1;
|
||||
gSfxBanks[bankId][index].token = req->token;
|
||||
gSfxBanks[bankId][index].sfxId = req->sfxId;
|
||||
gSfxBanks[bankId][index].state = SFX_STATE_QUEUED;
|
||||
gSfxBanks[bankId][index].freshness = 2;
|
||||
gSfxBanks[bankId][index].freqScale = req->freqScale;
|
||||
gSfxBanks[bankId][index].vol = req->vol;
|
||||
gSfxBanks[bankId][index].reverbAdd = req->reverbAdd;
|
||||
gSfxBanks[bankId][index].sfxParams = sfxParams->params;
|
||||
gSfxBanks[bankId][index].sfxImportance = sfxParams->importance;
|
||||
} else if (gSfxBanks[bankId][index].state == SFX_STATE_PLAYING_2) {
|
||||
gSfxBanks[bankId][index].state = SFX_STATE_PLAYING_1;
|
||||
}
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
if (index != 0) {
|
||||
index = gSoundBanks[bankId][index].next;
|
||||
index = gSfxBanks[bankId][index].next;
|
||||
}
|
||||
}
|
||||
if (gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].next != 0xFF && index != 0) {
|
||||
index = sSoundBankFreeListStart[bankId];
|
||||
entry = &gSoundBanks[bankId][index];
|
||||
if (gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next != 0xFF && index != 0) {
|
||||
index = sSfxBankFreeListStart[bankId];
|
||||
entry = &gSfxBanks[bankId][index];
|
||||
entry->posX = &req->pos->x;
|
||||
entry->posY = &req->pos->y;
|
||||
entry->posZ = &req->pos->z;
|
||||
|
@ -232,85 +232,85 @@ void Audio_ProcessSoundRequest(void) {
|
|||
entry->freqScale = req->freqScale;
|
||||
entry->vol = req->vol;
|
||||
entry->reverbAdd = req->reverbAdd;
|
||||
soundParams = &gSoundParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
|
||||
entry->sfxParams = soundParams->params;
|
||||
entry->sfxImportance = soundParams->importance;
|
||||
sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)];
|
||||
entry->sfxParams = sfxParams->params;
|
||||
entry->sfxImportance = sfxParams->importance;
|
||||
entry->sfxId = req->sfxId;
|
||||
entry->state = SFX_STATE_QUEUED;
|
||||
entry->freshness = 2;
|
||||
entry->prev = sSoundBankListEnd[bankId];
|
||||
gSoundBanks[bankId][sSoundBankListEnd[bankId]].next = sSoundBankFreeListStart[bankId];
|
||||
sSoundBankListEnd[bankId] = sSoundBankFreeListStart[bankId];
|
||||
sSoundBankFreeListStart[bankId] = gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].next;
|
||||
gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].prev = 0xFF;
|
||||
entry->prev = sSfxBankListEnd[bankId];
|
||||
gSfxBanks[bankId][sSfxBankListEnd[bankId]].next = sSfxBankFreeListStart[bankId];
|
||||
sSfxBankListEnd[bankId] = sSfxBankFreeListStart[bankId];
|
||||
sSfxBankFreeListStart[bankId] = gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next;
|
||||
gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = 0xFF;
|
||||
entry->next = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_RemoveSoundBankEntry(u8 bankId, u8 entryIndex) {
|
||||
SoundBankEntry* entry = &gSoundBanks[bankId][entryIndex];
|
||||
void Audio_RemoveSfxBankEntry(u8 bankId, u8 entryIndex) {
|
||||
SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex];
|
||||
u8 i;
|
||||
|
||||
if (entry->sfxParams & SFX_FLAG_3) {
|
||||
Audio_ClearBGMMute(entry->channelIdx);
|
||||
}
|
||||
if (entryIndex == sSoundBankListEnd[bankId]) {
|
||||
sSoundBankListEnd[bankId] = entry->prev;
|
||||
if (entryIndex == sSfxBankListEnd[bankId]) {
|
||||
sSfxBankListEnd[bankId] = entry->prev;
|
||||
} else {
|
||||
gSoundBanks[bankId][entry->next].prev = entry->prev;
|
||||
gSfxBanks[bankId][entry->next].prev = entry->prev;
|
||||
}
|
||||
gSoundBanks[bankId][entry->prev].next = entry->next;
|
||||
entry->next = sSoundBankFreeListStart[bankId];
|
||||
gSfxBanks[bankId][entry->prev].next = entry->next;
|
||||
entry->next = sSfxBankFreeListStart[bankId];
|
||||
entry->prev = 0xFF;
|
||||
gSoundBanks[bankId][sSoundBankFreeListStart[bankId]].prev = entryIndex;
|
||||
sSoundBankFreeListStart[bankId] = entryIndex;
|
||||
gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = entryIndex;
|
||||
sSfxBankFreeListStart[bankId] = entryIndex;
|
||||
entry->state = SFX_STATE_EMPTY;
|
||||
|
||||
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
|
||||
if (gActiveSounds[bankId][i].entryIndex == entryIndex) {
|
||||
gActiveSounds[bankId][i].entryIndex = 0xFF;
|
||||
if (gActiveSfx[bankId][i].entryIndex == entryIndex) {
|
||||
gActiveSfx[bankId][i].entryIndex = 0xFF;
|
||||
i = gChannelsPerBank[gSfxChannelLayout][bankId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_ChooseActiveSounds(u8 bankId) {
|
||||
u8 numChosenSounds;
|
||||
void Audio_ChooseActiveSfx(u8 bankId) {
|
||||
u8 numChosenSfx;
|
||||
u8 numChannels;
|
||||
u8 entryIndex;
|
||||
u8 i;
|
||||
u8 j;
|
||||
u8 k;
|
||||
u8 sfxImportance;
|
||||
u8 needNewSound;
|
||||
u8 needNewSfx;
|
||||
u8 chosenEntryIndex;
|
||||
u16 temp3;
|
||||
f32 tempf1;
|
||||
SoundBankEntry* entry;
|
||||
ActiveSound chosenSounds[MAX_CHANNELS_PER_BANK];
|
||||
ActiveSound* activeSound;
|
||||
SfxBankEntry* entry;
|
||||
ActiveSfx chosenSfx[MAX_CHANNELS_PER_BANK];
|
||||
ActiveSfx* activeSfx;
|
||||
s32 pad;
|
||||
|
||||
numChosenSounds = 0;
|
||||
numChosenSfx = 0;
|
||||
for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) {
|
||||
chosenSounds[i].priority = 0x7FFFFFFF;
|
||||
chosenSounds[i].entryIndex = 0xFF;
|
||||
chosenSfx[i].priority = 0x7FFFFFFF;
|
||||
chosenSfx[i].entryIndex = 0xFF;
|
||||
}
|
||||
entryIndex = gSoundBanks[bankId][0].next;
|
||||
entryIndex = gSfxBanks[bankId][0].next;
|
||||
k = 0;
|
||||
while (entryIndex != 0xFF) {
|
||||
if ((gSoundBanks[bankId][entryIndex].state == SFX_STATE_QUEUED) &&
|
||||
(gSoundBanks[bankId][entryIndex].sfxId & 0xC00)) {
|
||||
gSoundBanks[bankId][entryIndex].freshness--;
|
||||
} else if (!(gSoundBanks[bankId][entryIndex].sfxId & 0xC00) &&
|
||||
(gSoundBanks[bankId][entryIndex].state == SFX_STATE_PLAYING_2)) {
|
||||
Audio_QueueCmdS8((gSoundBanks[bankId][entryIndex].channelIdx << 8) | 0x6020000, 0);
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
if ((gSfxBanks[bankId][entryIndex].state == SFX_STATE_QUEUED) &&
|
||||
(gSfxBanks[bankId][entryIndex].sfxId & 0xC00)) {
|
||||
gSfxBanks[bankId][entryIndex].freshness--;
|
||||
} else if (!(gSfxBanks[bankId][entryIndex].sfxId & 0xC00) &&
|
||||
(gSfxBanks[bankId][entryIndex].state == SFX_STATE_PLAYING_2)) {
|
||||
Audio_QueueCmdS8((gSfxBanks[bankId][entryIndex].channelIdx << 8) | 0x6020000, 0);
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
}
|
||||
if (gSoundBanks[bankId][entryIndex].freshness == 0) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
} else if (gSoundBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
if (gSfxBanks[bankId][entryIndex].freshness == 0) {
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
} else if (gSfxBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) {
|
||||
entry = &gSfxBanks[bankId][entryIndex];
|
||||
|
||||
if (&gSfxDefaultPos.x == entry[0].posX) {
|
||||
entry->dist = 0.0f;
|
||||
|
@ -338,33 +338,33 @@ void Audio_ChooseActiveSounds(u8 bankId) {
|
|||
if (entry->state == SFX_STATE_PLAYING_1) {
|
||||
Audio_QueueCmdS8((entry->channelIdx << 8) | 0x6020000, 0);
|
||||
if (entry->sfxId & 0xC00) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
entryIndex = k;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
numChannels = gChannelsPerBank[gSfxChannelLayout][bankId];
|
||||
for (i = 0; i < numChannels; i++) {
|
||||
if (chosenSounds[i].priority >= entry->priority) {
|
||||
if (numChosenSounds < gChannelsPerBank[gSfxChannelLayout][bankId]) {
|
||||
numChosenSounds++;
|
||||
if (chosenSfx[i].priority >= entry->priority) {
|
||||
if (numChosenSfx < gChannelsPerBank[gSfxChannelLayout][bankId]) {
|
||||
numChosenSfx++;
|
||||
}
|
||||
for (j = numChannels - 1; j > i; j--) {
|
||||
chosenSounds[j].priority = chosenSounds[j - 1].priority;
|
||||
chosenSounds[j].entryIndex = chosenSounds[j - 1].entryIndex;
|
||||
chosenSfx[j].priority = chosenSfx[j - 1].priority;
|
||||
chosenSfx[j].entryIndex = chosenSfx[j - 1].entryIndex;
|
||||
}
|
||||
chosenSounds[i].priority = entry->priority;
|
||||
chosenSounds[i].entryIndex = entryIndex;
|
||||
chosenSfx[i].priority = entry->priority;
|
||||
chosenSfx[i].entryIndex = entryIndex;
|
||||
i = numChannels; // "break;"
|
||||
}
|
||||
}
|
||||
}
|
||||
k = entryIndex;
|
||||
}
|
||||
entryIndex = gSoundBanks[bankId][k].next;
|
||||
entryIndex = gSfxBanks[bankId][k].next;
|
||||
}
|
||||
for (i = 0; i < numChosenSounds; i++) {
|
||||
entry = &gSoundBanks[bankId][chosenSounds[i].entryIndex];
|
||||
for (i = 0; i < numChosenSfx; i++) {
|
||||
entry = &gSfxBanks[bankId][chosenSfx[i].entryIndex];
|
||||
if (entry->state == SFX_STATE_QUEUED) {
|
||||
entry->state = SFX_STATE_READY;
|
||||
} else if (entry->state == SFX_STATE_PLAYING_1) {
|
||||
|
@ -375,72 +375,72 @@ void Audio_ChooseActiveSounds(u8 bankId) {
|
|||
// Pick something to play for all channels.
|
||||
numChannels = gChannelsPerBank[gSfxChannelLayout][bankId];
|
||||
for (i = 0; i < numChannels; i++) {
|
||||
needNewSound = false;
|
||||
activeSound = &gActiveSounds[bankId][i];
|
||||
needNewSfx = false;
|
||||
activeSfx = &gActiveSfx[bankId][i];
|
||||
|
||||
if (activeSound->entryIndex == 0xFF) {
|
||||
needNewSound = true;
|
||||
if (activeSfx->entryIndex == 0xFF) {
|
||||
needNewSfx = true;
|
||||
} else {
|
||||
entry = &gSoundBanks[bankId][activeSound[0].entryIndex];
|
||||
entry = &gSfxBanks[bankId][activeSfx[0].entryIndex];
|
||||
if (entry->state == SFX_STATE_PLAYING_1) {
|
||||
if (entry->sfxId & 0xC00) {
|
||||
Audio_RemoveSoundBankEntry(bankId, activeSound->entryIndex);
|
||||
Audio_RemoveSfxBankEntry(bankId, activeSfx->entryIndex);
|
||||
} else {
|
||||
entry->state = SFX_STATE_QUEUED;
|
||||
}
|
||||
needNewSound = true;
|
||||
needNewSfx = true;
|
||||
} else if (entry->state == SFX_STATE_EMPTY) {
|
||||
activeSound->entryIndex = 0xFF;
|
||||
needNewSound = true;
|
||||
activeSfx->entryIndex = 0xFF;
|
||||
needNewSfx = true;
|
||||
} else {
|
||||
// Sound is already playing as it should, nothing to do.
|
||||
// Sfx is already playing as it should, nothing to do.
|
||||
for (j = 0; j < numChannels; j++) {
|
||||
if (activeSound->entryIndex == chosenSounds[j].entryIndex) {
|
||||
chosenSounds[j].entryIndex = 0xFF;
|
||||
if (activeSfx->entryIndex == chosenSfx[j].entryIndex) {
|
||||
chosenSfx[j].entryIndex = 0xFF;
|
||||
j = numChannels;
|
||||
}
|
||||
}
|
||||
numChosenSounds--;
|
||||
numChosenSfx--;
|
||||
}
|
||||
}
|
||||
|
||||
if (needNewSound == true) {
|
||||
if (needNewSfx == true) {
|
||||
for (j = 0; j < numChannels; j++) {
|
||||
chosenEntryIndex = chosenSounds[j].entryIndex;
|
||||
chosenEntryIndex = chosenSfx[j].entryIndex;
|
||||
if ((chosenEntryIndex != 0xFF) &&
|
||||
(gSoundBanks[bankId][chosenEntryIndex].state != SFX_STATE_PLAYING_REFRESH)) {
|
||||
(gSfxBanks[bankId][chosenEntryIndex].state != SFX_STATE_PLAYING_REFRESH)) {
|
||||
for (k = 0; k < numChannels; k++) {
|
||||
if (chosenEntryIndex == gActiveSounds[bankId][k].entryIndex) {
|
||||
needNewSound = false;
|
||||
if (chosenEntryIndex == gActiveSfx[bankId][k].entryIndex) {
|
||||
needNewSfx = false;
|
||||
k = numChannels; // "break;"
|
||||
}
|
||||
}
|
||||
if (needNewSound == true) {
|
||||
activeSound->entryIndex = chosenEntryIndex;
|
||||
chosenSounds[j].entryIndex = 0xFF;
|
||||
if (needNewSfx == true) {
|
||||
activeSfx->entryIndex = chosenEntryIndex;
|
||||
chosenSfx[j].entryIndex = 0xFF;
|
||||
j = numChannels + 1;
|
||||
numChosenSounds--;
|
||||
numChosenSfx--;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j == numChannels) {
|
||||
// nothing found
|
||||
activeSound->entryIndex = 0xFF;
|
||||
activeSfx->entryIndex = 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_PlayActiveSounds(u8 bankId) {
|
||||
void Audio_PlayActiveSfx(u8 bankId) {
|
||||
u8 entryIndex;
|
||||
SequenceChannel* channel;
|
||||
SoundBankEntry* entry;
|
||||
SfxBankEntry* entry;
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) {
|
||||
entryIndex = gActiveSounds[bankId][i].entryIndex;
|
||||
entryIndex = gActiveSfx[bankId][i].entryIndex;
|
||||
if (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
entry = &gSfxBanks[bankId][entryIndex];
|
||||
channel = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[sCurSfxPlayerChannelIdx];
|
||||
if (entry->state == SFX_STATE_READY) {
|
||||
entry->channelIdx = sCurSfxPlayerChannelIdx;
|
||||
|
@ -463,11 +463,11 @@ void Audio_PlayActiveSounds(u8 bankId) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
Audio_SetSoundProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
|
||||
Audio_SetSfxProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
|
||||
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]) {
|
||||
if (gIsLargeSfxBank[bankId]) {
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((sCurSfxPlayerChannelIdx & 0xFF) << 8) | 5,
|
||||
(entry->sfxId & 0x100) >> 8);
|
||||
}
|
||||
|
@ -477,9 +477,9 @@ void Audio_PlayActiveSounds(u8 bankId) {
|
|||
entry->state = SFX_STATE_PLAYING_2;
|
||||
}
|
||||
} else if ((u8)channel->soundScriptIO[1] == 0xFF) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
} else if (entry->state == SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_SetSoundProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
|
||||
Audio_SetSfxProperties(bankId, entryIndex, sCurSfxPlayerChannelIdx);
|
||||
if (entry->sfxId & 0xC00) {
|
||||
entry->state = SFX_STATE_PLAYING_1;
|
||||
} else {
|
||||
|
@ -492,149 +492,149 @@ void Audio_PlayActiveSounds(u8 bankId) {
|
|||
}
|
||||
|
||||
void Audio_StopSfxByBank(u8 bankId) {
|
||||
SoundBankEntry* entry;
|
||||
SfxBankEntry* entry;
|
||||
s32 pad;
|
||||
SoundBankEntry cmp;
|
||||
u8 entryIndex = gSoundBanks[bankId][0].next;
|
||||
SfxBankEntry cmp;
|
||||
u8 entryIndex = gSfxBanks[bankId][0].next;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
entry = &gSfxBanks[bankId][entryIndex];
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
}
|
||||
entryIndex = gSoundBanks[bankId][0].next;
|
||||
entryIndex = gSfxBanks[bankId][0].next;
|
||||
}
|
||||
cmp.sfxId = bankId << 12;
|
||||
Audio_RemoveMatchingSoundRequests(0, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(0, &cmp);
|
||||
}
|
||||
|
||||
void func_800F8884(u8 bankId, Vec3f* pos) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[bankId][0].next;
|
||||
SfxBankEntry* entry;
|
||||
u8 entryIndex = gSfxBanks[bankId][0].next;
|
||||
u8 prevEntryIndex = 0;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[bankId][entryIndex];
|
||||
entry = &gSfxBanks[bankId][entryIndex];
|
||||
if (entry->posX == &pos->x) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | ((entry->channelIdx & 0xFF) << 8), 0);
|
||||
}
|
||||
if (entry->state != SFX_STATE_EMPTY) {
|
||||
Audio_RemoveSoundBankEntry(bankId, entryIndex);
|
||||
Audio_RemoveSfxBankEntry(bankId, entryIndex);
|
||||
}
|
||||
} else {
|
||||
prevEntryIndex = entryIndex;
|
||||
}
|
||||
entryIndex = gSoundBanks[bankId][prevEntryIndex].next;
|
||||
entryIndex = gSfxBanks[bankId][prevEntryIndex].next;
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_StopSfxByPosAndBank(u8 bankId, Vec3f* pos) {
|
||||
SoundBankEntry cmp;
|
||||
SfxBankEntry cmp;
|
||||
|
||||
func_800F8884(bankId, pos);
|
||||
cmp.sfxId = bankId << 12;
|
||||
cmp.posX = &pos->x;
|
||||
Audio_RemoveMatchingSoundRequests(1, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(1, &cmp);
|
||||
}
|
||||
|
||||
void Audio_StopSfxByPos(Vec3f* pos) {
|
||||
u8 i;
|
||||
SoundBankEntry cmp;
|
||||
SfxBankEntry cmp;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSoundBanks); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSfxBanks); i++) {
|
||||
func_800F8884(i, pos);
|
||||
}
|
||||
cmp.posX = &pos->x;
|
||||
Audio_RemoveMatchingSoundRequests(2, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(2, &cmp);
|
||||
}
|
||||
|
||||
void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
SfxBankEntry* entry;
|
||||
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
|
||||
u8 prevEntryIndex = 0;
|
||||
SoundBankEntry cmp;
|
||||
SfxBankEntry cmp;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->posX == &pos->x && entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
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);
|
||||
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
}
|
||||
entryIndex = 0xFF;
|
||||
} else {
|
||||
prevEntryIndex = entryIndex;
|
||||
}
|
||||
if (entryIndex != 0xFF) {
|
||||
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
}
|
||||
}
|
||||
cmp.posX = &pos->x;
|
||||
cmp.sfxId = sfxId;
|
||||
Audio_RemoveMatchingSoundRequests(3, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(3, &cmp);
|
||||
}
|
||||
|
||||
void Audio_StopSfxByTokenAndId(u8 token, u16 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
SfxBankEntry* entry;
|
||||
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
|
||||
u8 prevEntryIndex = 0;
|
||||
SoundBankEntry cmp;
|
||||
SfxBankEntry cmp;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->token == token && entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
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);
|
||||
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
}
|
||||
} else {
|
||||
prevEntryIndex = entryIndex;
|
||||
}
|
||||
if (entryIndex != 0xFF) {
|
||||
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
}
|
||||
}
|
||||
cmp.token = token;
|
||||
cmp.sfxId = sfxId;
|
||||
Audio_RemoveMatchingSoundRequests(4, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(4, &cmp);
|
||||
}
|
||||
|
||||
void Audio_StopSfxById(u32 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
SfxBankEntry* entry;
|
||||
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
|
||||
u8 prevEntryIndex = 0;
|
||||
SoundBankEntry cmp;
|
||||
SfxBankEntry cmp;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->sfxId == sfxId) {
|
||||
if (entry->state >= SFX_STATE_PLAYING_REFRESH) {
|
||||
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);
|
||||
Audio_RemoveSfxBankEntry(SFX_BANK(sfxId), entryIndex);
|
||||
}
|
||||
} else {
|
||||
prevEntryIndex = entryIndex;
|
||||
}
|
||||
entryIndex = gSoundBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next;
|
||||
}
|
||||
cmp.sfxId = sfxId;
|
||||
Audio_RemoveMatchingSoundRequests(5, &cmp);
|
||||
Audio_RemoveMatchingSfxRequests(5, &cmp);
|
||||
}
|
||||
|
||||
void Audio_ProcessSoundRequests(void) {
|
||||
while (gSoundRequestWriteIndex != gSoundRequestReadIndex) {
|
||||
Audio_ProcessSoundRequest();
|
||||
gSoundRequestReadIndex++;
|
||||
void Audio_ProcessSfxRequests(void) {
|
||||
while (gSfxRequestWriteIndex != gSfxRequestReadIndex) {
|
||||
Audio_ProcessSfxRequest();
|
||||
gSfxRequestReadIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,20 +663,20 @@ void func_800F8F88(void) {
|
|||
|
||||
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);
|
||||
Audio_PlayActiveSounds(bankId);
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
|
||||
Audio_ChooseActiveSfx(bankId);
|
||||
Audio_PlayActiveSfx(bankId);
|
||||
Audio_StepUnusedBankLerp(bankId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 Audio_IsSfxPlaying(u32 sfxId) {
|
||||
SoundBankEntry* entry;
|
||||
u8 entryIndex = gSoundBanks[SFX_BANK(sfxId)][0].next;
|
||||
SfxBankEntry* entry;
|
||||
u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next;
|
||||
|
||||
while (entryIndex != 0xFF) {
|
||||
entry = &gSoundBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex];
|
||||
if (entry->sfxId == sfxId) {
|
||||
return true;
|
||||
}
|
||||
|
@ -685,36 +685,36 @@ u8 Audio_IsSfxPlaying(u32 sfxId) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void Audio_ResetSounds(void) {
|
||||
void Audio_ResetSfx(void) {
|
||||
u8 bankId;
|
||||
u8 i;
|
||||
u8 entryIndex;
|
||||
|
||||
gSoundRequestWriteIndex = 0;
|
||||
gSoundRequestReadIndex = 0;
|
||||
gSfxRequestWriteIndex = 0;
|
||||
gSfxRequestReadIndex = 0;
|
||||
D_801333D0 = 0;
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
|
||||
sSoundBankListEnd[bankId] = 0;
|
||||
sSoundBankFreeListStart[bankId] = 1;
|
||||
sSoundBankUnused[bankId] = 0;
|
||||
gSoundBankMuted[bankId] = false;
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
|
||||
sSfxBankListEnd[bankId] = 0;
|
||||
sSfxBankFreeListStart[bankId] = 1;
|
||||
sSfxBankUnused[bankId] = 0;
|
||||
gSfxBankMuted[bankId] = false;
|
||||
sUnusedBankLerp[bankId].value = 1.0f;
|
||||
sUnusedBankLerp[bankId].remainingFrames = 0;
|
||||
}
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
|
||||
for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) {
|
||||
gActiveSounds[bankId][i].entryIndex = 0xFF;
|
||||
gActiveSfx[bankId][i].entryIndex = 0xFF;
|
||||
}
|
||||
}
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSoundBanks); bankId++) {
|
||||
gSoundBanks[bankId][0].prev = 0xFF;
|
||||
gSoundBanks[bankId][0].next = 0xFF;
|
||||
for (i = 1; i < gSoundBankSizes[bankId] - 1; i++) {
|
||||
gSoundBanks[bankId][i].prev = i - 1;
|
||||
gSoundBanks[bankId][i].next = i + 1;
|
||||
for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) {
|
||||
gSfxBanks[bankId][0].prev = 0xFF;
|
||||
gSfxBanks[bankId][0].next = 0xFF;
|
||||
for (i = 1; i < gSfxBankSizes[bankId] - 1; i++) {
|
||||
gSfxBanks[bankId][i].prev = i - 1;
|
||||
gSfxBanks[bankId][i].next = i + 1;
|
||||
}
|
||||
gSoundBanks[bankId][i].prev = i - 1;
|
||||
gSoundBanks[bankId][i].next = 0xFF;
|
||||
gSfxBanks[bankId][i].prev = i - 1;
|
||||
gSfxBanks[bankId][i].next = 0xFF;
|
||||
}
|
||||
if (D_801333F8 == 0) {
|
||||
for (bankId = 0; bankId < 10; bankId++) {
|
||||
|
|
|
@ -361,8 +361,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (dbCamera->sub.nPoints < 6) {
|
||||
if (sDbCamAnim.unk_0A != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
}
|
||||
func_8006376C(0x11, 0x17, 3, D_8012CEE0[0]);
|
||||
|
@ -376,8 +376,8 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam) {
|
|||
!func_800BB2B4(&sDbCamAnim.lookAtPos, &sDbCamAnim.roll, &sDbCamAnim.fov, dbCamera->sub.lookAt,
|
||||
&sDbCamAnim.keyframe, &sDbCamAnim.curFrame) &&
|
||||
sDbCamAnim.unk_0A == 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCamAnim.unk_04++;
|
||||
|
||||
if (dbCamera->sub.nFrames > 0 && dbCamera->sub.nFrames < sDbCamAnim.unk_04) {
|
||||
|
@ -605,8 +605,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
dbCamera->unk_40 = -1;
|
||||
dbCamera->sub.demoCtrlActionIdx = 0;
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (dbCamera->unk_38 == -1) {
|
||||
dbCamera->unk_38 = 1;
|
||||
} else {
|
||||
|
@ -926,25 +926,25 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
dbCamera->unk_1C.z = 0.0f;
|
||||
dbCamera->unk_1C.y = 1.0f;
|
||||
} else if (dbCamera->sub.unk_08 == 2) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.unk_08 = 0;
|
||||
func_800B41DC(dbCamera, dbCamera->sub.unkIdx, cam);
|
||||
} else {
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.nPoints = dbCamera->sub.unkIdx + 1;
|
||||
func_800B4088(dbCamera, cam);
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R)) {
|
||||
if (dbCamera->sub.unkIdx == 0x80) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
func_800B42C0(dbCamera, cam);
|
||||
if (dbCamera->sub.unkIdx == (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
|
@ -997,8 +997,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
} else {
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CRIGHT) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
|
||||
DbCamera_PrintPoints("Lookat", dbCamera->sub.nPoints, dbCamera->sub.lookAt);
|
||||
DbCamera_PrintPoints("Position", dbCamera->sub.nPoints, dbCamera->sub.position);
|
||||
|
@ -1007,15 +1007,15 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", dbCamera->sub.mode);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CUP) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx > 0) {
|
||||
dbCamera->sub.unkIdx--;
|
||||
} else {
|
||||
|
@ -1023,8 +1023,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx > 0) {
|
||||
dbCamera->sub.unkIdx--;
|
||||
} else {
|
||||
|
@ -1045,8 +1045,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
} else {
|
||||
|
@ -1054,8 +1054,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
} else {
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) {
|
||||
dbCamera->sub.unkIdx++;
|
||||
} else {
|
||||
|
@ -1124,8 +1124,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
case 1:
|
||||
dbCamera->unk_3C = true;
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unk_0A == 0) {
|
||||
dbCamera->sub.unk_0A = 5;
|
||||
} else {
|
||||
|
@ -1133,8 +1133,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.unk_0A == 5) {
|
||||
dbCamera->sub.unk_0A = 0;
|
||||
} else {
|
||||
|
@ -1142,8 +1142,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
case 1:
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L)) {
|
||||
|
@ -1192,9 +1192,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_DLEFT)) {
|
||||
if ((D_8012D10C++ % 5) == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
|
@ -1231,8 +1230,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
case 1:
|
||||
|
@ -1281,9 +1280,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_DRIGHT)) {
|
||||
if ((D_8012D10C++ % 5) == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
switch (dbCamera->sub.unk_0A) {
|
||||
|
@ -1435,8 +1433,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) {
|
|||
dbCamera->fov = 60.0f;
|
||||
dbCamera->rollDegrees = dbCamera->roll * 1.40625f;
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3;
|
||||
dbCamera->unk_38 = -1;
|
||||
}
|
||||
|
@ -1717,8 +1715,8 @@ void DbCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorIndex) {
|
|||
void DbCamera_PrintAllCuts(Camera* cam) {
|
||||
s32 i;
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
|
||||
|
@ -1865,8 +1863,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
if ((1 << sCurFileIdx) & sMempakFiles) {
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT) ||
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlToggleSwitch ^= 1;
|
||||
}
|
||||
D_8012CEE0[41][9] = sCurFileIdx + 'A';
|
||||
|
@ -1879,12 +1877,12 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
|
||||
if (dbCamera->sub.demoCtrlToggleSwitch == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu++;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1900,8 +1898,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1937,8 +1935,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (dbCamera->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
}
|
||||
|
@ -1960,8 +1958,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A) ||
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu -= 9;
|
||||
}
|
||||
block_2:
|
||||
|
@ -1995,8 +1993,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
sp74[i * 2 + 1] = '\0';
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx >= 4) {
|
||||
sCurFileIdx = 0;
|
||||
} else {
|
||||
|
@ -2012,8 +2010,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx <= 0) {
|
||||
sCurFileIdx = 4;
|
||||
} else {
|
||||
|
@ -2055,25 +2053,25 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
func_8006376C(0x14, 0x1A, 5, D_8012CF70);
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlToggleSwitch = 0;
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(dbCamera->sub.demoCtrlActionIdx, MENU_INFO);
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
return 1;
|
||||
}
|
||||
|
@ -2085,8 +2083,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP) ||
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
}
|
||||
return 2;
|
||||
|
@ -2098,15 +2096,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
default: {
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
sCurFileIdx = 0;
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
|
||||
sCurFileIdx = 0;
|
||||
|
@ -2145,8 +2143,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
if (func_800B91B0(cam, dbCamera) == 0) {
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
OLib_Vec3fDiffToVecSphGeo(&sp5C, &dbCamera->eye, &dbCamera->at);
|
||||
DbCamera_CalcUpFromPitchYawRoll(&dbCamera->unk_1C, sp5C.pitch, sp5C.yaw,
|
||||
|
@ -2164,8 +2162,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
sDbCamAnim.unk_0A = 1;
|
||||
sDbCamAnim.unk_0C = 0;
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_L)) {
|
||||
|
@ -2181,15 +2179,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
if (sLastFileIdx != -1) {
|
||||
switch (sp74[sCurFileIdx]) {
|
||||
case '?':
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sDbCameraCuts[idx1] = sDbCameraCuts[idx2];
|
||||
sp74[sCurFileIdx] = '?'; // useless
|
||||
DbCamera_ResetCut(idx2, false);
|
||||
break;
|
||||
case '-':
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
sp64 = sDbCameraCuts[idx2];
|
||||
if (sLastFileIdx < sCurFileIdx) {
|
||||
|
@ -2211,8 +2209,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2221,8 +2219,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_A)) {
|
||||
if (sp74[sCurFileIdx] == '?') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sp74[sCurFileIdx] = DbCamera_InitCut(idx1, &dbCamera->sub);
|
||||
if (sp74[sCurFileIdx] == '?') {
|
||||
func_8006376C(0xF, 0x18, 7, D_8012CF48);
|
||||
|
@ -2232,8 +2230,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_B)) {
|
||||
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sp74[sCurFileIdx] = '?';
|
||||
DbCamera_ResetCut(idx1, true);
|
||||
}
|
||||
|
@ -2241,8 +2239,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_R)) {
|
||||
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
for (i = 0; i < sDbCameraCuts[idx1].nPoints; i++) {
|
||||
dbCamera->sub.lookAt[i] = sDbCameraCuts[idx1].lookAt[i];
|
||||
|
@ -2264,8 +2262,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (sCurFileIdx == 0x1E) {
|
||||
sCurFileIdx = 0;
|
||||
} else {
|
||||
|
@ -2273,8 +2271,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
}
|
||||
}
|
||||
if (CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
|
||||
}
|
||||
|
||||
|
@ -2288,8 +2286,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
DbCamera_PrintAllCuts(cam);
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[2].cur.button, BTN_L) &&
|
||||
CHECK_BTN_ALL(sPlay->state.input[2].press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
for (i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++) {
|
||||
if (sDbCameraCuts[i].nPoints != 0) {
|
||||
osSyncPrintf("\n@@@ /* CUT [%d]\t*/", i);
|
||||
|
@ -2305,8 +2303,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
Interface_ChangeAlpha(50);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
func_8006376C(4, 7, 5, D_8012CF50[0]);
|
||||
|
|
|
@ -1688,11 +1688,11 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
|
|||
}
|
||||
|
||||
void func_8002F7DC(Actor* actor, u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
|
||||
void Audio_PlayActorSfx2(Actor* actor, u16 sfxId) {
|
||||
func_80078914(&actor->projectedPos, sfxId);
|
||||
}
|
||||
|
||||
|
@ -1753,7 +1753,7 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
|
|||
if (func_80041D4C(&play->colCtx, poly, bgId) == 8) {
|
||||
play->roomCtx.unk_74[0] = 1;
|
||||
CollisionCheck_BlueBlood(play, NULL, pos);
|
||||
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_IT_WALL_HIT_BUYO);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2235,8 +2235,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
|
|||
|
||||
void func_80030ED8(Actor* actor) {
|
||||
if (actor->flags & ACTOR_FLAG_19) {
|
||||
Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (actor->flags & ACTOR_FLAG_20) {
|
||||
func_80078884(actor->sfx);
|
||||
} else if (actor->flags & ACTOR_FLAG_21) {
|
||||
|
@ -3033,7 +3033,7 @@ Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory) {
|
|||
*/
|
||||
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
|
||||
play->actorCtx.freezeFlashTimer = 5;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
SfxSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
}
|
||||
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
|
@ -3617,7 +3617,7 @@ void func_8003424C(PlayState* play, Vec3f* arg1) {
|
|||
|
||||
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration) {
|
||||
if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
|
||||
}
|
||||
|
||||
actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
|
||||
|
@ -4984,8 +4984,8 @@ void func_80036E50(u16 textId, s16 arg1) {
|
|||
Flags_SetInfTable(INFTABLE_0C);
|
||||
return;
|
||||
case 0x1033:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Flags_SetEventChkInf(EVENTCHKINF_04);
|
||||
Flags_SetInfTable(INFTABLE_0E);
|
||||
return;
|
||||
|
@ -5448,8 +5448,8 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
|
|||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
|
||||
ret = true;
|
||||
}
|
||||
|
|
|
@ -1564,36 +1564,36 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
|||
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(play, hitPos);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesMetalSound(play, hitPos, &collider->actor->projectedPos);
|
||||
CollisionCheck_SpawnShieldParticlesMetalSfx(play, hitPos, &collider->actor->projectedPos);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_HARD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_WOOD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1604,17 +1604,17 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
|||
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
|
||||
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
|
||||
if (acInfo->elemType == ELEMTYPE_UNK0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &at->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
|
||||
Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -1651,8 +1651,8 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
|
|||
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
|
||||
if (at->actor == NULL) {
|
||||
CollisionCheck_SpawnShieldParticles(play, hitPos);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
|
||||
}
|
||||
|
@ -1665,11 +1665,11 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
|
|||
} else {
|
||||
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
|
||||
if (ac->actor == NULL) {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3391,32 +3391,32 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Spawns streaks of light and makes a metallic sound
|
||||
* Spawns streaks of light and plays a metallic sound effect
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
|
||||
CollisionCheck_SpawnShieldParticles(play, v);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns streaks of light and makes a metallic sound at the specified position
|
||||
* Spawns streaks of light and plays a metallic sound effect at the specified position
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSfx(PlayState* play, Vec3f* v, Vec3f* pos) {
|
||||
CollisionCheck_SpawnShieldParticles(play, v);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns streaks of light and makes a metallic sound
|
||||
* Spawns streaks of light and plays a metallic sound effect
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetal2(PlayState* play, Vec3f* v) {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(play, v);
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns streaks of light and makes a wooden sound
|
||||
* Spawns streaks of light and plays a wooden sound effect
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* actorPos) {
|
||||
static EffectShieldParticleInit woodInit = {
|
||||
|
@ -3445,8 +3445,8 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
|
|||
woodInit.lightPoint.z = woodInit.position.z;
|
||||
|
||||
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &woodInit);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -495,8 +495,8 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
temp = 1;
|
||||
}
|
||||
|
||||
|
@ -827,7 +827,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
break;
|
||||
case 54:
|
||||
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
Audio_SetSfxBanksMute(0x6F);
|
||||
play->linkAgeOnLoad = LINK_AGE_CHILD;
|
||||
play->nextEntranceIndex = ENTR_SPOT09_0;
|
||||
gSaveContext.cutsceneIndex = 0xFFF2;
|
||||
|
@ -1208,7 +1208,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
break;
|
||||
case 117:
|
||||
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
|
||||
Audio_SetSoundBanksMute(0x6F);
|
||||
Audio_SetSfxBanksMute(0x6F);
|
||||
play->linkAgeOnLoad = LINK_AGE_ADULT;
|
||||
play->nextEntranceIndex = ENTR_SPOT00_0;
|
||||
gSaveContext.cutsceneIndex = 0xFFF7;
|
||||
|
@ -1249,13 +1249,13 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
|
|||
if (cmd->base == 1) {
|
||||
play->envCtx.screenFillColor[3] = 255.0f * temp;
|
||||
if ((temp == 0.0f) && (gSaveContext.entranceIndex == ENTR_KENJYANOMA_0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if ((temp == 0.0f) && ((gSaveContext.entranceIndex == ENTR_TOKINOMA_0) ||
|
||||
(gSaveContext.entranceIndex == ENTR_SPOT15_0) ||
|
||||
(gSaveContext.entranceIndex == ENTR_YOUSEI_IZUMI_YOKO_0))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if ((temp == 0.0f) && (play->sceneNum == SCENE_GANONTIKA)) {
|
||||
func_800788CC(NA_SE_EV_WHITE_OUT);
|
||||
}
|
||||
|
|
|
@ -888,7 +888,7 @@ void EffectSsEnIce_SpawnFlyingVec3f(PlayState* play, Actor* actor, Vec3f* pos, s
|
|||
initParams.scale = scale;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
|
||||
|
@ -914,7 +914,7 @@ void EffectSsEnIce_SpawnFlyingVec3s(PlayState* play, Actor* actor, Vec3s* pos, s
|
|||
initParams.scale = scale;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
|
||||
|
@ -993,7 +993,7 @@ void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 sc
|
|||
initParams.bodyPart = bodyPart;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
|
||||
|
@ -1014,7 +1014,7 @@ void EffectSsEnFire_SpawnVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 sc
|
|||
initParams.bodyPart = bodyPart;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
|
||||
|
@ -1051,7 +1051,7 @@ void EffectSsFCircle_Spawn(PlayState* play, Actor* actor, Vec3f* pos, s16 radius
|
|||
|
||||
void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
|
||||
s32 arg14, s16 playSound) {
|
||||
s32 arg14, s16 playSfx) {
|
||||
EffectSsDeadDbInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
|
@ -1068,7 +1068,7 @@ void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a
|
|||
initParams.envColor.b = envB;
|
||||
initParams.unused = unused;
|
||||
initParams.unk_34 = arg14;
|
||||
initParams.playSound = playSound;
|
||||
initParams.playSfx = playSfx;
|
||||
|
||||
EffectSs_Spawn(play, EFFECT_SS_DEAD_DB, 120, &initParams);
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ void EnAObj_Block(EnAObj* this, PlayState* play) {
|
|||
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
|
||||
|
||||
if (this->dyna.actor.speedXZ != 0.0f) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
}
|
||||
|
||||
this->dyna.unk_154 = 0.0f;
|
||||
|
|
|
@ -715,8 +715,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (getItemId != GI_NONE) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
|
@ -724,8 +724,8 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
return;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Flags_SetCollectible(play, this->collectibleFlag);
|
||||
|
|
|
@ -81,8 +81,8 @@ void TransitionCircle_Start(void* thisx) {
|
|||
} else {
|
||||
this->texY = 0x1F4;
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
guPerspective(&this->projection, &this->normal, 60.0f, (4.0f / 3.0f), 10.0f, 12800.0f, 1.0f);
|
||||
|
@ -107,8 +107,8 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
|
|||
if (this->direction != 0) {
|
||||
if (this->texY == 0) {
|
||||
if (this->appearanceType == TCA_RIPPLE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
this->texY += this->speed * 3 / updateRate;
|
||||
|
|
|
@ -583,16 +583,15 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
|
|||
}
|
||||
|
||||
void func_80078884(u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_800788CC(u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
void func_80078914(Vec3f* arg0, u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
|
|
@ -403,11 +403,11 @@ void Minimap_Draw(PlayState* play) {
|
|||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
|
||||
osSyncPrintf("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
|
||||
// clang-format off
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -489,11 +489,11 @@ void Minimap_Draw(PlayState* play) {
|
|||
|
||||
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
|
||||
// clang-format off
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
|
|
@ -158,8 +158,8 @@ u8 Message_ShouldAdvance(PlayState* play) {
|
|||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
return CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
||||
|
@ -183,8 +183,8 @@ void Message_CloseTextbox(PlayState* play) {
|
|||
msgCtx->stateTimer = 2;
|
||||
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,8 +199,8 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
|
|||
if (msgCtx->choiceIndex > 128) {
|
||||
msgCtx->choiceIndex = 0;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
|
@ -208,8 +208,8 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
|
|||
if (msgCtx->choiceIndex > numChoices) {
|
||||
msgCtx->choiceIndex = numChoices;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (ABS(input->rel.stick_y) < 30) {
|
||||
sAnalogStickHeld = false;
|
||||
|
@ -743,7 +743,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
|
|||
MessageContext* msgCtx = &play->msgCtx;
|
||||
|
||||
// clang-format off
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4,
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -898,8 +898,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
case MESSAGE_BOX_BREAK:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
if (!sTextboxSkipped) {
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
} else {
|
||||
|
@ -916,8 +916,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
case MESSAGE_TEXTID:
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
}
|
||||
|
@ -986,9 +986,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
// "Sound (SE)"
|
||||
osSyncPrintf("サウンド(SE)\n");
|
||||
sfxHi = msgCtx->msgBufDecoded[i + 1] << 8;
|
||||
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
i += 2;
|
||||
break;
|
||||
|
@ -997,7 +996,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
break;
|
||||
case MESSAGE_BACKGROUND:
|
||||
// clang-format off
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4,
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -1083,8 +1082,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
|
||||
if (play->csCtx.state == 0) {
|
||||
Interface_SetDoAction(play, DO_ACTION_RETURN);
|
||||
|
@ -1114,8 +1113,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
return;
|
||||
case MESSAGE_PERSISTENT:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
|
||||
}
|
||||
|
@ -1126,16 +1125,16 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
*gfxP = gfx;
|
||||
return;
|
||||
default:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
|
||||
msgCtx->textDelayTimer == msgCtx->textDelay) {
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
|
||||
charTexIdx += FONT_CHAR_TEX_SIZE;
|
||||
|
@ -1795,8 +1794,8 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
|||
osSyncPrintf("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
|
||||
msgCtx->ocarinaAction = ocarinaActionId;
|
||||
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) {
|
||||
Message_OpenText(play, 0x86F); // Ocarina
|
||||
|
@ -2124,9 +2123,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
|
||||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW_SPAWN) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
} else {
|
||||
// "Ocarina_Flog Correct Example Performance"
|
||||
|
@ -2135,17 +2134,17 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else {
|
||||
|
@ -2155,9 +2154,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
|
@ -2167,25 +2166,25 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
Interface_ChangeAlpha(1);
|
||||
} else {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
}
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
|
||||
|
@ -2408,7 +2407,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
AudioOcarina_SetPlaybackSong(msgCtx->lastPlayedSong + 1, 1);
|
||||
if (msgCtx->lastPlayedSong != OCARINA_SONG_SCARECROW_SPAWN) {
|
||||
Audio_PlayFanfare(sOcarinaSongFanfares[msgCtx->lastPlayedSong]);
|
||||
Audio_SetSoundBanksMute(0x20);
|
||||
Audio_SetSfxBanksMute(0x20);
|
||||
}
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
|
@ -2562,11 +2561,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
osSyncPrintf("z_message.c 取得メロディ=%d\n", ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
|
||||
osSyncPrintf(VT_RST);
|
||||
msgCtx->stateTimer = 20;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
|
||||
}
|
||||
|
@ -2620,8 +2619,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->ocarinaStaff->state);
|
||||
gSaveContext.scarecrowLongSongSet = true;
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("aaaaaaaaaaaaaa\n");
|
||||
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
|
||||
msgCtx->stateTimer = 10;
|
||||
|
@ -2691,8 +2690,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->stateTimer = 20;
|
||||
gSaveContext.scarecrowSpawnSongSet = true;
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("\n====================================================================\n");
|
||||
MemCpy(gSaveContext.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
|
||||
|
@ -2707,8 +2706,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
// "Played an existing song!!!"
|
||||
osSyncPrintf("すでに存在する曲吹いた!!! \n");
|
||||
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_CloseTextbox(play);
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_FAILED;
|
||||
}
|
||||
|
@ -2733,8 +2732,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
break;
|
||||
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
|
||||
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
|
||||
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
|
||||
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
|
||||
|
@ -2744,12 +2743,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
if (msgCtx->stateTimer == 0) {
|
||||
if (msgCtx->ocarinaStaff->state == 0) {
|
||||
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
msgCtx->msgMode++;
|
||||
}
|
||||
|
@ -2767,8 +2765,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
}
|
||||
break;
|
||||
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
|
||||
if (msgCtx->ocarinaStaff->pos && sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
|
||||
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->buttonIndex;
|
||||
|
@ -2779,15 +2777,15 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
// "Musical round failed!!!!!!!!!"
|
||||
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
|
||||
} else if (msgCtx->ocarinaStaff->state == OCARINA_SONG_MEMORY_GAME) {
|
||||
// "Musical round succeeded!!!!!!!!!"
|
||||
osSyncPrintf("輪唱成功!!!!!!!!!\n");
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
|
||||
msgCtx->stateTimer = 30;
|
||||
}
|
||||
|
@ -2803,8 +2801,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
if (AudioOcarina_MemoryGameNextNote() != 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
|
||||
Message_ResetOcarinaNoteState();
|
||||
|
@ -3171,7 +3169,7 @@ void Message_Update(PlayState* play) {
|
|||
} else {
|
||||
Message_GrowTextbox(msgCtx);
|
||||
// TODO: this may be NA_SE_PL_WALK_GROUND - SFX_FLAG, or not, investigate sfxId=0
|
||||
Audio_PlaySoundIfNotInCutscene(0);
|
||||
Audio_PlaySfxIfNotInCutscene(0);
|
||||
msgCtx->stateTimer = 0;
|
||||
msgCtx->msgMode = MSGMODE_TEXT_BOX_GROWING;
|
||||
}
|
||||
|
@ -3248,12 +3246,12 @@ void Message_Update(PlayState* play) {
|
|||
} else if (Message_ShouldAdvanceSilent(play)) {
|
||||
osSyncPrintf("select=%d\n", msgCtx->textboxEndType);
|
||||
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_ContinueTextbox(play, sNextTextId);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2115,7 +2115,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
|
|||
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
|
||||
(play->csCtx.state == CS_STATE_IDLE)) {
|
||||
// clang-format off
|
||||
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
|
||||
if (naviCallState == 0x1E) { Audio_PlaySfxGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -2167,7 +2167,7 @@ s32 Health_ChangeBy(PlayState* play, s16 amount) {
|
|||
gSaveContext.healthCapacity);
|
||||
|
||||
// clang-format off
|
||||
if (amount > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
if (amount > 0) { Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (gSaveContext.doubleDefense && (amount < 0)) {
|
||||
amount >>= 1;
|
||||
|
@ -2302,8 +2302,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
|
|||
|
||||
if ((type != MAGIC_ADD) && (gSaveContext.magic - amount) < 0) {
|
||||
if (gSaveContext.magicCapacity != 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -2321,8 +2321,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
|
|||
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
|
||||
return true;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2339,8 +2339,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
|
|||
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
|
||||
return true;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2371,8 +2371,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
|
|||
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
|
||||
return true;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2440,8 +2440,8 @@ void Magic_Update(PlayState* play) {
|
|||
gSaveContext.magic += 4;
|
||||
|
||||
if (gSaveContext.gameMode == GAMEMODE_NORMAL && gSaveContext.sceneSetupIndex < 4) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
// "Storage MAGIC_NOW=%d (%d)"
|
||||
|
@ -2528,8 +2528,8 @@ void Magic_Update(PlayState* play) {
|
|||
!play->actorCtx.lensActive) {
|
||||
// Force lens off and set magic meter state to idle
|
||||
play->actorCtx.lensActive = false;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
gSaveContext.magicState = MAGIC_STATE_IDLE;
|
||||
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
|
||||
break;
|
||||
|
@ -2581,8 +2581,8 @@ void Magic_Update(PlayState* play) {
|
|||
case MAGIC_STATE_ADD:
|
||||
// Add magic until target is reached
|
||||
gSaveContext.magic += 4;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
if (gSaveContext.magic >= gSaveContext.magicTarget) {
|
||||
gSaveContext.magic = gSaveContext.magicTarget;
|
||||
gSaveContext.magicState = gSaveContext.prevMagicState;
|
||||
|
@ -3564,20 +3564,20 @@ void Interface_Draw(PlayState* play) {
|
|||
D_80125A5C = false;
|
||||
} else if (gSaveContext.timer1Value > 60) {
|
||||
if (timerDigits[4] == 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
} else if (gSaveContext.timer1Value >= 11) {
|
||||
if (timerDigits[4] & 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3625,9 +3625,9 @@ void Interface_Draw(PlayState* play) {
|
|||
D_8015FFE2 = 40;
|
||||
gSaveContext.timer1State = 15;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3745,20 +3745,20 @@ void Interface_Draw(PlayState* play) {
|
|||
}
|
||||
} else if (gSaveContext.timer2Value > 60) {
|
||||
if (timerDigits[4] == 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (gSaveContext.timer2Value > 10) {
|
||||
if (timerDigits[4] & 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
gSaveContext.timer2Value++;
|
||||
|
@ -3772,9 +3772,9 @@ void Interface_Draw(PlayState* play) {
|
|||
}
|
||||
|
||||
if ((gSaveContext.timer2Value % 60) == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4003,8 +4003,8 @@ void Interface_Update(PlayState* play) {
|
|||
gSaveContext.health += 4;
|
||||
|
||||
if ((gSaveContext.health & 0xF) < 4) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
osSyncPrintf("now_life=%d max_life=%d\n", gSaveContext.health, gSaveContext.healthCapacity);
|
||||
|
@ -4042,8 +4042,8 @@ void Interface_Update(PlayState* play) {
|
|||
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
|
||||
gSaveContext.rupeeAccumulator--;
|
||||
gSaveContext.rupees++;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
// "Rupee Amount MAX = %d"
|
||||
osSyncPrintf("ルピー数MAX = %d\n", CUR_CAPACITY(UPG_WALLET));
|
||||
|
@ -4059,13 +4059,13 @@ void Interface_Update(PlayState* play) {
|
|||
gSaveContext.rupees = 0;
|
||||
}
|
||||
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
gSaveContext.rupeeAccumulator++;
|
||||
gSaveContext.rupees--;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
gSaveContext.rupeeAccumulator = 0;
|
||||
|
|
|
@ -36,9 +36,9 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
|
|||
|
||||
if ((R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
// Play a sfx when the player toggles the camera
|
||||
Audio_PlaySoundGeneral((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP,
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP,
|
||||
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
Play_ChangeViewpointBgCamIndex(this);
|
||||
|
@ -259,7 +259,7 @@ void Play_Init(GameState* thisx) {
|
|||
func_80112098(this);
|
||||
Message_Init(this);
|
||||
GameOver_Init(this);
|
||||
SoundSource_InitAll(this);
|
||||
SfxSource_InitAll(this);
|
||||
Effect_InitContext(this);
|
||||
EffectSs_InitInfo(this, 0x55);
|
||||
CollisionCheck_InitContext(this, &this->colChkCtx);
|
||||
|
@ -752,9 +752,8 @@ void Play_Update(PlayState* this) {
|
|||
break;
|
||||
|
||||
case TRANS_MODE_SANDSTORM:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (this->envCtx.sandstormPrimA < 110) {
|
||||
|
@ -788,9 +787,8 @@ void Play_Update(PlayState* this) {
|
|||
break;
|
||||
|
||||
case TRANS_MODE_SANDSTORM_END:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->transitionTrigger == TRANS_TRIGGER_END) {
|
||||
if (this->envCtx.sandstormPrimA <= 0) {
|
||||
|
@ -922,8 +920,8 @@ void Play_Update(PlayState* this) {
|
|||
// "Changing viewpoint is prohibited during the cutscene"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "デモ中につき視点変更を禁止しております\n" VT_RST);
|
||||
} else if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
// C-Up toggle for houses, move between pivot camera and fixed camera
|
||||
// Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT
|
||||
|
@ -959,7 +957,7 @@ void Play_Update(PlayState* this) {
|
|||
AnimationContext_Update(this, &this->animationCtx);
|
||||
|
||||
PLAY_LOG(3771);
|
||||
SoundSource_UpdateAll(this);
|
||||
SfxSource_UpdateAll(this);
|
||||
|
||||
PLAY_LOG(3777);
|
||||
ShrinkWindow_Update(R_UPDATE_RATE);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#include "global.h"
|
||||
|
||||
void SoundSource_InitAll(PlayState* play) {
|
||||
SoundSource* sources = &play->soundSources[0];
|
||||
void SfxSource_InitAll(PlayState* play) {
|
||||
SfxSource* sources = &play->sfxSources[0];
|
||||
s32 i;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) { sources[i].countdown = 0; }
|
||||
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) { sources[i].countdown = 0; }
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
void SoundSource_UpdateAll(PlayState* play) {
|
||||
SoundSource* source = &play->soundSources[0];
|
||||
void SfxSource_UpdateAll(PlayState* play) {
|
||||
SfxSource* source = &play->sfxSources[0];
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) {
|
||||
if (source->countdown != 0) {
|
||||
if (DECR(source->countdown) == 0) {
|
||||
Audio_StopSfxByPos(&source->projectedPos);
|
||||
|
@ -26,20 +26,20 @@ void SoundSource_UpdateAll(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId) {
|
||||
void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 duration, u16 sfxId) {
|
||||
s32 countdown;
|
||||
SoundSource* source;
|
||||
SfxSource* source;
|
||||
s32 smallestCountdown = 0xFFFF;
|
||||
SoundSource* backupSource;
|
||||
SfxSource* backupSource;
|
||||
s32 i;
|
||||
|
||||
source = &play->soundSources[0];
|
||||
for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) {
|
||||
source = &play->sfxSources[0];
|
||||
for (i = 0; i < ARRAY_COUNT(play->sfxSources); i++) {
|
||||
if (source->countdown == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Store the sound source with the smallest remaining countdown
|
||||
// Store the sfx source with the smallest remaining countdown
|
||||
countdown = source->countdown;
|
||||
if (countdown < smallestCountdown) {
|
||||
smallestCountdown = countdown;
|
||||
|
@ -48,8 +48,8 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
|
|||
source++;
|
||||
}
|
||||
|
||||
// If no sound source is available, replace the sound source with the smallest remaining countdown
|
||||
if (i >= ARRAY_COUNT(play->soundSources)) {
|
||||
// If no sfx source is available, replace the sfx source with the smallest remaining countdown
|
||||
if (i >= ARRAY_COUNT(play->sfxSources)) {
|
||||
source = backupSource;
|
||||
Audio_StopSfxByPos(&source->projectedPos);
|
||||
}
|
||||
|
@ -58,6 +58,6 @@ void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 du
|
|||
source->countdown = duration;
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
|
||||
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Audio_PlaySfxGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue