diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/code_800EC960.c | 71 | ||||
| -rw-r--r-- | src/code/code_800F7260.c | 13 | ||||
| -rw-r--r-- | src/code/db_camera.c | 168 | ||||
| -rw-r--r-- | src/code/z_actor.c | 15 | ||||
| -rw-r--r-- | src/code/z_collision_check.c | 56 | ||||
| -rw-r--r-- | src/code/z_demo.c | 11 | ||||
| -rw-r--r-- | src/code/z_en_item00.c | 6 | ||||
| -rw-r--r-- | src/code/z_fbdemo_circle.c | 6 | ||||
| -rw-r--r-- | src/code/z_lib.c | 9 | ||||
| -rw-r--r-- | src/code/z_map_exp.c | 16 | ||||
| -rw-r--r-- | src/code/z_message_PAL.c | 136 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 85 | ||||
| -rw-r--r-- | src/code/z_play.c | 17 | ||||
| -rw-r--r-- | src/code/z_sound_source.c | 3 |
14 files changed, 358 insertions, 254 deletions
diff --git a/src/code/code_800EC960.c b/src/code/code_800EC960.c index a07583921..70ca112f5 100644 --- a/src/code/code_800EC960.c +++ b/src/code/code_800EC960.c @@ -1607,7 +1607,7 @@ void func_800ED458(s32 arg0) { if ((sCurOcarinaBtnVal != 0xFF) && (sPrevOcarinaNoteVal != sCurOcarinaBtnVal)) { Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1); Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sCurOcarinaBtnVal); - Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &D_80130F24, &D_80130F28, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &D_80130F24, &D_80130F28, &gSfxDefaultReverb); } else if ((sPrevOcarinaNoteVal != 0xFF) && (sCurOcarinaBtnVal == 0xFF)) { Audio_StopSfxById(NA_SE_OC_OCARINA); } @@ -1743,8 +1743,8 @@ void Audio_OcaPlayback(void) { sStaffPlaybackPos++; Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD07, D_80130F10 - 1); Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | 0xD05, sDisplayedNoteValue & 0x3F); - Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &D_801333D4, 4, &sNormalizedNotePlaybackTone, - &sNormalizedNotePlaybackVolume, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sNormalizedNotePlaybackTone, + &sNormalizedNotePlaybackVolume, &gSfxDefaultReverb); } else { Audio_StopSfxById(NA_SE_OC_OCARINA); } @@ -2961,7 +2961,8 @@ void AudioDebug_ProcessInput_SndCont(void) { case 2: case 3: Audio_PlaySoundGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG, - &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); break; case 4: func_800F6700(sAudioSndContWork[sAudioSndContSel]); @@ -3362,7 +3363,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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) { @@ -3913,7 +3915,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, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb); if ((sfxId & 0xF0) == 0xB0) { phi_f0 = 0.3f; @@ -3931,22 +3933,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, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7B0, &D_8016B7A8, &gSfxDefaultReverb); } void func_800F4190(Vec3f* pos, u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &D_801333E0, &D_801305B4); + Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801305B0, &gSfxDefaultFreqAndVolScale, &D_801305B4); } void Audio_PlaySoundRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) { u8 offset = Audio_NextRandom() % randLim; - Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } void func_800F4254(Vec3f* pos, u8 level) { @@ -3955,10 +3958,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, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_PL_SWORD_CHARGE, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); break; } @@ -3966,7 +3971,8 @@ void func_800F4254(Vec3f* pos, u8 level) { } if (level != 0) { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &D_801305F4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } @@ -3978,14 +3984,14 @@ void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2) { } if (D_8016B7D8 > 0.5f) { - Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &D_8016B7D8, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (arg2 > 2.0f) { arg2 = 2.0f; @@ -4002,17 +4008,17 @@ void func_800F44EC(s8 arg0, s8 arg1) { void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2) { D_8016B7DC = arg2; - Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_801333E0, &D_8016B7DC); + Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &D_8016B7DC); } void func_800F4578(Vec3f* pos, u16 sfxId, f32 arg2) { D_8016B7E0 = arg2; - Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_8016B7E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &D_8016B7E0, &gSfxDefaultReverb); } void func_800F45D0(f32 arg0) { - func_800F4414(&D_801333D4, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, arg0); - func_800F436C(&D_801333D4, 0, (0.15f * arg0) + 1.4f); + func_800F4414(&gSfxDefaultPos, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, arg0); + func_800F436C(&gSfxDefaultPos, 0, (0.15f * arg0) + 1.4f); } void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale) { @@ -4023,8 +4029,8 @@ 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, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) { @@ -4036,7 +4042,7 @@ void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale) { sWaterfallFreqScaleLerp.step = (sWaterfallFreqScaleLerp.target - sWaterfallFreqScaleLerp.value) / 40; } Audio_PlaySoundGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value, - &sWaterfallFreqScaleLerp.value, &D_801333E8); + &sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb); } void Audio_StepFreqLerp(FreqLerp* lerp) { @@ -4179,8 +4185,8 @@ void Audio_UpdateRiverSoundVolumes(void) { } void Audio_PlaySoundIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) { - Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39], &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitones[sAudioIncreasingTranspose] + 39], + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sAudioIncreasingTranspose < 15) { sAudioIncreasingTranspose++; @@ -4192,7 +4198,8 @@ void Audio_ResetIncreasingTranspose(void) { } void Audio_PlaySoundTransposed(Vec3f* pos, u16 sfxId, s8 semitone) { - Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &gNoteFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) { @@ -4213,7 +4220,7 @@ void func_800F4C58(Vec3f* pos, u16 sfxId, u8 arg2) { } phi_s1++; } - Audio_PlaySoundGeneral(sfxId, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } void func_800F4E30(Vec3f* pos, f32 arg1) { @@ -4746,10 +4753,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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Audio_QueueCmdS32(0xF1000000, 0); } else { - Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Audio_QueueCmdS32(0xF2000000, 0); } } @@ -4827,7 +4836,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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } sAudioBaseFilter = filter; @@ -4860,7 +4870,8 @@ void Audio_PlaySoundGeneralIfNotInCutscene(u16 sfxId, Vec3f* pos, u8 arg2, f32* } void Audio_PlaySoundIfNotInCutscene(u16 sfxId) { - Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneralIfNotInCutscene(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } void func_800F6964(u16 arg0) { diff --git a/src/code/code_800F7260.c b/src/code/code_800F7260.c index 188f6d8b2..6976e5466 100644 --- a/src/code/code_800F7260.c +++ b/src/code/code_800F7260.c @@ -79,13 +79,18 @@ u8 gSfxChannelLayout = 0; u16 D_801333D0 = 0; -Vec3f D_801333D4 = { 0.0f, 0.0f, 0.0f }; // default pos +// The center of the screen in projected coordinates. +// Gives the impression that the sfx has no specific location +Vec3f gSfxDefaultPos = { 0.0f, 0.0f, 0.0f }; -f32 D_801333E0 = 1.0f; // default freqScale +// Reused as either frequency or volume multiplicative scaling factor +// Does not alter or change frequency or volume +f32 gSfxDefaultFreqAndVolScale = 1.0f; s32 D_801333E4 = 0; // unused -s8 D_801333E8 = 0; // default reverbAdd +// Adds no reverb to the existing reverb +s8 gSfxDefaultReverb = 0; s32 D_801333EC = 0; // unused @@ -370,7 +375,7 @@ void Audio_ChooseActiveSounds(u8 bankId) { } else if (gSoundBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) { entry = &gSoundBanks[bankId][entryIndex]; - if (&D_801333D4.x == entry[0].posX) { + if (&gSfxDefaultPos.x == entry[0].posX) { entry->dist = 0.0f; } else { tempf1 = *entry->posY * 1; diff --git a/src/code/db_camera.c b/src/code/db_camera.c index 0fd8655df..9d33d3d65 100644 --- a/src/code/db_camera.c +++ b/src/code/db_camera.c @@ -361,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); sDbCamAnim.unk_0A = 0; } func_8006376C(0x11, 0x17, 3, D_8012CEE0[0]); @@ -375,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); sDbCamAnim.unk_04++; if (dbCamera->sub.nFrames > 0 && dbCamera->sub.nFrames < sDbCamAnim.unk_04) { @@ -603,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (dbCamera->unk_38 == -1) { dbCamera->unk_38 = 1; } else { @@ -923,22 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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(sGlobalCtx->state.input[2].press.button, BTN_R) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L)) { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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(sGlobalCtx->state.input[2].press.button, BTN_R)) { if (dbCamera->sub.unkIdx == 0x80) { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_PUTAWAY, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(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++; @@ -990,7 +996,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } else { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CRIGHT) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L)) { - Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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); @@ -999,13 +1006,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(sGlobalCtx->state.input[2].press.button, BTN_CLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3; } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CUP) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L)) { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unkIdx > 0) { dbCamera->sub.unkIdx--; } else { @@ -1013,8 +1022,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } } else { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CUP)) { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unkIdx > 0) { dbCamera->sub.unkIdx--; } else { @@ -1035,7 +1044,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CDOWN)) { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) { dbCamera->sub.unkIdx++; } else { @@ -1043,8 +1053,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } } else { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CDOWN)) { - Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1)) { dbCamera->sub.unkIdx++; } else { @@ -1113,8 +1123,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { case 1: dbCamera->unk_3C = true; if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP)) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unk_0A == 0) { dbCamera->sub.unk_0A = 5; } else { @@ -1122,8 +1132,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN)) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (dbCamera->sub.unk_0A == 5) { dbCamera->sub.unk_0A = 0; } else { @@ -1131,8 +1141,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); switch (dbCamera->sub.unk_0A) { case 1: if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L)) { @@ -1181,8 +1191,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DLEFT)) { if ((D_8012D10C++ % 5) == 0) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } switch (dbCamera->sub.unk_0A) { @@ -1219,8 +1230,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT)) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); switch (dbCamera->sub.unk_0A) { case 1: @@ -1268,8 +1279,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DRIGHT)) { if ((D_8012D10C++ % 5) == 0) { - Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } switch (dbCamera->sub.unk_0A) { @@ -1421,7 +1433,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { dbCamera->fov = 60.0f; dbCamera->rollDegrees = dbCamera->roll * 1.40625f; if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3; dbCamera->unk_38 = -1; } @@ -1702,7 +1715,8 @@ void DbCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorId) { void DbCamera_PrintAllCuts(Camera* cam) { s32 i; - Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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++) { @@ -1849,8 +1863,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if ((1 << sCurFileIdx) & sMempakFiles) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlToggleSwitch ^= 1; } D_8012CEE0[41][9] = sCurFileIdx + 'A'; @@ -1863,12 +1877,12 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A)) { if (dbCamera->sub.demoCtrlToggleSwitch == 0) { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlMenu++; } else { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlMenu = 0; } } @@ -1884,7 +1898,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { } } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B)) { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlMenu = 0; return 1; } @@ -1920,7 +1935,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B)) { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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; } @@ -1942,7 +1958,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B)) { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlMenu -= 9; } block_2: @@ -1976,8 +1993,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { sp74[i * 2 + 1] = '\0'; if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sCurFileIdx >= 4) { sCurFileIdx = 0; } else { @@ -1993,8 +2010,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { } } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sCurFileIdx <= 0) { sCurFileIdx = 4; } else { @@ -2036,25 +2053,25 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { func_8006376C(0x14, 0x1A, 5, D_8012CF70); if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u; } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u; } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A)) { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(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(sGlobalCtx->state.input[2].press.button, BTN_B)) { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlActionIdx = ACTION_E; return 1; } @@ -2066,8 +2083,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN)) { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); dbCamera->sub.demoCtrlActionIdx = ACTION_E; } return 2; @@ -2079,13 +2096,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { default: { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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(sGlobalCtx->state.input[2].press.button, BTN_DDOWN)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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; @@ -2124,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, @@ -2142,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_L)) { @@ -2158,15 +2179,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (sLastFileIdx != -1) { switch (sp74[sCurFileIdx]) { case '?': - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); sp64 = sDbCameraCuts[idx2]; if (sLastFileIdx < sCurFileIdx) { @@ -2188,8 +2209,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { } break; default: - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); break; } } @@ -2198,7 +2219,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A)) { if (sp74[sCurFileIdx] == '?') { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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); @@ -2208,7 +2230,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B)) { if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); sp74[sCurFileIdx] = '?'; DbCamera_ResetCut(idx1, true); } @@ -2216,7 +2239,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_R)) { if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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]; @@ -2238,7 +2262,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sCurFileIdx == 0x1E) { sCurFileIdx = 0; } else { @@ -2246,7 +2271,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { } } if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1; } @@ -2260,7 +2286,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) { DbCamera_PrintAllCuts(cam); } else if (CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT)) { - Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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); @@ -2276,7 +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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } func_8006376C(4, 7, 5, D_8012CF50[0]); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index b59039a85..12432b802 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1689,7 +1689,8 @@ void func_8002F7A0(GlobalContext* globalCtx, Actor* actor, f32 arg2, s16 arg3, f } void func_8002F7DC(Actor* actor, u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } void Audio_PlayActorSound2(Actor* actor, u16 sfxId) { @@ -2235,13 +2236,14 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { void func_80030ED8(Actor* actor) { if (actor->flags & ACTOR_FLAG_19) { - Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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) { func_800788CC(actor->sfx); } else if (actor->flags & ACTOR_FLAG_28) { - func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); + func_800F4C58(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); } else { func_80078914(&actor->projectedPos, actor->sfx); } @@ -4967,8 +4969,8 @@ void func_80036E50(u16 textId, s16 arg1) { Flags_SetInfTable(0xC); return; case 0x1033: - Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Flags_SetEventChkInf(0x4); Flags_SetInfTable(0xE); return; @@ -5431,7 +5433,8 @@ s32 func_80037CB8(GlobalContext* globalCtx, Actor* actor, s16 arg2) { case TEXT_STATE_CHOICE: case TEXT_STATE_EVENT: if (Message_ShouldAdvance(globalCtx) && func_80037C94(globalCtx, actor, arg2)) { - Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_TEXT_CLOSING; ret = true; } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 7557fab51..1f62b536c 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1571,10 +1571,11 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) { EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_WHITE, hitPos); if (collider->actor == NULL) { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_METAL, hitPos); @@ -1586,18 +1587,20 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli } else if (flags == TOUCH_SFX_HARD) { EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_WHITE, hitPos); if (collider->actor == NULL) { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (flags == TOUCH_SFX_WOOD) { EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_DUST, hitPos); if (collider->actor == NULL) { - Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } } @@ -1608,17 +1611,17 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli 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, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &at->actor->projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } return true; @@ -1655,7 +1658,8 @@ void CollisionCheck_HitEffects(GlobalContext* globalCtx, Collider* at, ColliderI } else if (sHitInfo[ac->colType].effect == HIT_WOOD) { if (at->actor == NULL) { CollisionCheck_SpawnShieldParticles(globalCtx, hitPos); - Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { CollisionCheck_SpawnShieldParticlesWood(globalCtx, hitPos, &at->actor->projectedPos); } @@ -1668,10 +1672,11 @@ void CollisionCheck_HitEffects(GlobalContext* globalCtx, Collider* at, ColliderI } else { EffectSsHitMark_SpawnFixedScale(globalCtx, EFFECT_HITMARK_WHITE, hitPos); if (ac->actor == NULL) { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &ac->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } } @@ -3418,7 +3423,8 @@ void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v) { */ void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v) { CollisionCheck_SpawnShieldParticles(globalCtx, v); - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } /** @@ -3426,7 +3432,8 @@ void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v */ void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* pos) { CollisionCheck_SpawnShieldParticles(globalCtx, v); - Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } /** @@ -3466,7 +3473,8 @@ void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* v, woodInit.lightPoint.z = woodInit.position.z; Effect_Add(globalCtx, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &woodInit); - Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } /** diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 91510b466..9d2d24417 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -495,7 +495,8 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B) || CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_START)) && (gSaveContext.fileNum != 0xFEDC) && (globalCtx->sceneLoadFlag == 0)) { - Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); temp = 1; } @@ -1247,13 +1248,13 @@ void Cutscene_Command_TransitionFX(GlobalContext* globalCtx, CutsceneContext* cs if (cmd->base == 1) { globalCtx->envCtx.screenFillColor[3] = 255.0f * temp; if ((temp == 0.0f) && (gSaveContext.entranceIndex == 0x006B)) { - Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if ((temp == 0.0f) && ((gSaveContext.entranceIndex == 0x0053) || (gSaveContext.entranceIndex == 0x0138) || (gSaveContext.entranceIndex == 0x0371))) { - Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if ((temp == 0.0f) && (globalCtx->sceneNum == SCENE_GANONTIKA)) { func_800788CC(NA_SE_EV_WHITE_OUT); } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 7c3d3c2ab..684ce0d7c 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -714,7 +714,8 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { } if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) { - Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (getItemId != GI_NONE) { if (Actor_HasParent(&this->actor, globalCtx)) { Flags_SetCollectible(globalCtx, this->collectibleFlag); @@ -722,7 +723,8 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { } return; } else { - Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } Flags_SetCollectible(globalCtx, this->collectibleFlag); diff --git a/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c index add4b9dbe..9a9dfbd0c 100644 --- a/src/code/z_fbdemo_circle.c +++ b/src/code/z_fbdemo_circle.c @@ -82,7 +82,8 @@ void TransitionCircle_Start(void* thisx) { } else { this->texY = 0x1F4; if (this->effect == 2) { - Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_OUT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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,7 +108,8 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) { if (this->unk_14 != 0) { if (this->texY == 0) { if (this->effect == 2) { - Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } this->texY += this->step * 3 / updateRate; diff --git a/src/code/z_lib.c b/src/code/z_lib.c index 190af64a6..90df45b91 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -568,13 +568,16 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) { } void func_80078884(u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } void func_800788CC(u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } void func_80078914(Vec3f* arg0, u16 sfxId) { - Audio_PlaySoundGeneral(sfxId, arg0, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, arg0, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 9247f8dd1..f4423a63f 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -404,10 +404,10 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_L) && !Gameplay_InCsMode(globalCtx)) { osSyncPrintf("Game_play_demo_mode_check=%d\n", Gameplay_InCsMode(globalCtx)); // clang-format off - if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } - else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } + if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } + else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // clang-format on R_MINIMAP_DISABLED ^= 1; } @@ -484,10 +484,10 @@ void Minimap_Draw(GlobalContext* globalCtx) { if (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_L) && !Gameplay_InCsMode(globalCtx)) { // clang-format off - if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } - else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } + if (!R_MINIMAP_DISABLED) { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } + else { Audio_PlaySoundGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // clang-format on R_MINIMAP_DISABLED ^= 1; } diff --git a/src/code/z_message_PAL.c b/src/code/z_message_PAL.c index a9bac80d9..36d573304 100644 --- a/src/code/z_message_PAL.c +++ b/src/code/z_message_PAL.c @@ -158,7 +158,8 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) { 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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); @@ -182,7 +183,8 @@ void Message_CloseTextbox(GlobalContext* globalCtx) { msgCtx->stateTimer = 2; msgCtx->msgMode = MSGMODE_TEXT_CLOSING; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT; - Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } @@ -197,7 +199,8 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) { if (msgCtx->choiceIndex > 128) { msgCtx->choiceIndex = 0; } else { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) { sAnalogStickHeld = true; @@ -205,7 +208,8 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) { if (msgCtx->choiceIndex > numChoices) { msgCtx->choiceIndex = numChoices; } else { - Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (ABS(input->rel.stick_y) < 30) { sAnalogStickHeld = false; @@ -739,7 +743,7 @@ u16 Message_DrawItemIcon(GlobalContext* globalCtx, u16 itemId, Gfx** p, u16 i) { MessageContext* msgCtx = &globalCtx->msgCtx; // clang-format off - if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } + if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // clang-format on gDPPipeSync(gfx++); @@ -890,7 +894,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { case MESSAGE_BOX_BREAK: if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (!sTextboxSkipped) { - Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT; Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE); } else { @@ -907,7 +912,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { case MESSAGE_TEXTID: msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT; if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { - Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_TEXT_DONE; Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE); } @@ -976,8 +982,9 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { // "Sound (SE)" osSyncPrintf("サウンド(SE)\n"); sfxHi = msgCtx->msgBufDecoded[i + 1] << 8; - Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } i += 2; break; @@ -986,7 +993,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { break; case MESSAGE_BACKGROUND: // clang-format off - if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } + if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // clang-format on gDPPipeSync(gfx++); gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); @@ -1068,8 +1075,8 @@ void Message_DrawText(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE); if (globalCtx->csCtx.state == 0) { Interface_SetDoAction(globalCtx, DO_ACTION_RETURN); @@ -1099,7 +1106,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { return; case MESSAGE_PERSISTENT: if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { - Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT; } @@ -1110,14 +1118,16 @@ void Message_DrawText(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } Message_DrawTextChar(globalCtx, &font->charTexBuf[charTexIdx], &gfx); charTexIdx += FONT_CHAR_TEX_SIZE; @@ -1769,7 +1779,8 @@ void Message_StartOcarina(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } if (ocarinaActionId == OCARINA_ACTION_SCARECROW_PLAYBACK) { Message_OpenText(globalCtx, 0x86F); // Ocarina @@ -2097,8 +2108,9 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS || msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW) { Audio_OcaSetInstrument(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_OCARINA_STARTING; } else { // "Ocarina_Flog Correct Example Performance" @@ -2107,15 +2119,17 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->stateTimer = 10; - Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); Interface_ChangeAlpha(1); } } else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW) { if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW) { Audio_OcaSetInstrument(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); msgCtx->stateTimer = 10; msgCtx->msgMode = MSGMODE_OCARINA_FAIL; } else { @@ -2125,8 +2139,9 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->stateTimer = 10; - Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); Interface_ChangeAlpha(1); } } else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) { @@ -2136,23 +2151,25 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->stateTimer = 10; - Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } Interface_ChangeAlpha(1); } else { Audio_OcaSetInstrument(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_OCARINA_STARTING; } } else if (msgCtx->ocarinaStaff->state == 0xFF) { Audio_OcaSetInstrument(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->stateTimer = 10; msgCtx->msgMode = MSGMODE_OCARINA_FAIL; } else if (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B)) { @@ -2526,11 +2543,11 @@ void Message_DrawMain(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (msgCtx->ocarinaStaff->state == 0xFF) { - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->stateTimer = 10; msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL; } @@ -2581,8 +2598,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->ocarinaStaff->state); gSaveContext.scarecrowCustomSongSet = true; } - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); osSyncPrintf("aaaaaaaaaaaaaa\n"); Audio_OcaSetRecordingState(0); msgCtx->stateTimer = 10; @@ -2651,8 +2668,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->stateTimer = 20; gSaveContext.scarecrowSpawnSongSet = true; msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_DONE; - Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf("\n====================================================================\n"); MemCopy(gSaveContext.scarecrowSpawnSong, gScarecrowSpawnSongPtr, @@ -2667,8 +2684,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { // "Played an existing song!!!" osSyncPrintf("すでに存在する曲吹いた!!! \n"); Audio_OcaSetRecordingState(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Message_CloseTextbox(globalCtx); msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_FAILED; } @@ -2693,8 +2710,8 @@ void Message_DrawMain(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff(); if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) { sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx; @@ -2704,11 +2721,12 @@ void Message_DrawMain(GlobalContext* globalCtx, 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, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } msgCtx->msgMode++; } @@ -2726,8 +2744,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { } break; case MSGMODE_MEMORY_GAME_PLAYER_PLAYING: - Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff(); if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) { sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx; @@ -2738,14 +2756,15 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { // "Musical round failed!!!!!!!!!" osSyncPrintf("輪唱失敗!!!!!!!!!\n"); Audio_OcaSetInstrument(0); - Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->stateTimer = 10; globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_03; } else if (msgCtx->ocarinaStaff->state == 0xD) { // "Musical round succeeded!!!!!!!!!" osSyncPrintf("輪唱成功!!!!!!!!!\n"); - Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS; msgCtx->stateTimer = 30; } @@ -2761,8 +2780,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) { msgCtx->stateTimer--; if (msgCtx->stateTimer == 0) { if (Audio_OcaMemoryGameGenNote() != 1) { - Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff(); msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0; Message_ResetOcarinaNoteState(); @@ -3206,11 +3225,12 @@ void Message_Update(GlobalContext* globalCtx) { } else if (Message_ShouldAdvanceSilent(globalCtx)) { osSyncPrintf("select=%d\n", msgCtx->textboxEndType); if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) { - Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Message_ContinueTextbox(globalCtx, sNextTextId); } else { - Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Message_CloseTextbox(globalCtx); } } diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 1073d14ad..b17648859 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2103,12 +2103,12 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) { if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && (globalCtx->csCtx.state == CS_STATE_IDLE)) { // clang-format off - if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); } + if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // clang-format on if (naviCallState == 0x1D) { - func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32); + func_800F4524(&gSfxDefaultPos, NA_SE_VO_NA_HELLO_2, 32); } interfaceCtx->naviCalling = true; @@ -2150,8 +2150,8 @@ s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange) { gSaveContext.healthCapacity); // clang-format off - if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); + if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (gSaveContext.doubleDefense && (healthChange < 0)) { healthChange >>= 1; osSyncPrintf("ハート減少半分!!=%d\n", healthChange); // "Heart decrease halved!!=%d" @@ -2279,7 +2279,8 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2) { if ((arg2 != 5) && (gSaveContext.magic - arg1) < 0) { if (gSaveContext.unk_13F4 != 0) { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } return 0; } @@ -2295,7 +2296,8 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2) { gSaveContext.unk_13F0 = 1; return 1; } else { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); return 0; } case 1: @@ -2307,7 +2309,8 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2) { gSaveContext.unk_13F0 = 6; return 1; } else { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); return 0; } case 3: @@ -2335,7 +2338,8 @@ s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2) { gSaveContext.unk_13F0 = 4; return 1; } else { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); return 0; } case 5: @@ -2396,8 +2400,8 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { gSaveContext.magic += 4; if (gSaveContext.gameMode == 0 && gSaveContext.sceneSetupIndex < 4) { - Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } // "Storage MAGIC_NOW=%d (%d)" @@ -2478,8 +2482,8 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { (gSaveContext.equips.buttonItems[3] != ITEM_LENS)) || !globalCtx->actorCtx.lensActive) { globalCtx->actorCtx.lensActive = false; - Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); gSaveContext.unk_13F0 = 0; sMagicBorderR = sMagicBorderG = sMagicBorderB = 255; break; @@ -2530,7 +2534,8 @@ void Interface_UpdateMagicBar(GlobalContext* globalCtx) { case 10: gSaveContext.magic += 4; - Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (gSaveContext.magic >= gSaveContext.unk_13F8) { gSaveContext.magic = gSaveContext.unk_13F8; gSaveContext.unk_13F0 = gSaveContext.unk_13F2; @@ -3517,17 +3522,20 @@ void Interface_Draw(GlobalContext* globalCtx) { D_80125A5C = false; } else if (gSaveContext.timer1Value > 60) { if (timerDigits[4] == 1) { - Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } else { - Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } } @@ -3574,8 +3582,9 @@ void Interface_Draw(GlobalContext* globalCtx) { D_8015FFE2 = 40; gSaveContext.timer1State = 15; } else { - Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } } @@ -3692,17 +3701,20 @@ void Interface_Draw(GlobalContext* globalCtx) { } } else if (gSaveContext.timer2Value > 60) { if (timerDigits[4] == 1) { - Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(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, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else { - Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else { gSaveContext.timer2Value++; @@ -3716,8 +3728,9 @@ void Interface_Draw(GlobalContext* globalCtx) { } if ((gSaveContext.timer2Value % 60) == 0) { - Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, - &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } } } @@ -3946,7 +3959,8 @@ void Interface_Update(GlobalContext* globalCtx) { gSaveContext.health += 4; if ((gSaveContext.health & 0xF) < 4) { - Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } osSyncPrintf("now_life=%d max_life=%d\n", gSaveContext.health, gSaveContext.healthCapacity); @@ -3983,7 +3997,8 @@ void Interface_Update(GlobalContext* globalCtx) { if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) { gSaveContext.rupeeAccumulator--; gSaveContext.rupees++; - Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { // "Rupee Amount MAX = %d" osSyncPrintf("ルピー数MAX = %d\n", CUR_CAPACITY(UPG_WALLET)); @@ -3999,11 +4014,13 @@ void Interface_Update(GlobalContext* globalCtx) { gSaveContext.rupees = 0; } - Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { gSaveContext.rupeeAccumulator++; gSaveContext.rupees--; - Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else { gSaveContext.rupeeAccumulator = 0; diff --git a/src/code/z_play.c b/src/code/z_play.c index 7138b9a7b..3b862b7ca 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -23,8 +23,8 @@ void func_800BC490(GlobalContext* globalCtx, s16 point) { globalCtx->unk_1242B = point; if ((YREG(15) != 0x10) && (gSaveContext.cutsceneIndex < 0xFFF0)) { - Audio_PlaySoundGeneral((point == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &D_801333D4, 4, - &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral((point == 1) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } func_800BC450(globalCtx); @@ -695,8 +695,9 @@ void Gameplay_Update(GlobalContext* globalCtx) { break; case 13: - Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); if (globalCtx->sceneLoadFlag == -0x14) { if (globalCtx->envCtx.sandstormPrimA < 110) { gTrnsnUnkState = 0; @@ -729,8 +730,9 @@ void Gameplay_Update(GlobalContext* globalCtx) { break; case 15: - Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, - &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); if (globalCtx->sceneLoadFlag == -0x14) { if (globalCtx->envCtx.sandstormPrimA <= 0) { gTrnsnUnkState = 0; @@ -917,7 +919,8 @@ void Gameplay_Update(GlobalContext* globalCtx) { // "Changing viewpoint is prohibited during the cutscene" osSyncPrintf(VT_FGCOL(CYAN) "デモ中につき視点変更を禁止しております\n" VT_RST); } else if (YREG(15) == 0x10) { - Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { func_800BC490(globalCtx, globalCtx->unk_1242B ^ 3); } diff --git a/src/code/z_sound_source.c b/src/code/z_sound_source.c index ce54ee393..fe9088a70 100644 --- a/src/code/z_sound_source.c +++ b/src/code/z_sound_source.c @@ -58,5 +58,6 @@ void SoundSource_PlaySfxAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* worldPo source->countdown = duration; SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->worldPos, &source->projectedPos); - Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); + Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } |
