summaryrefslogtreecommitdiff
path: root/soh/src/code/z_parameter.c
diff options
context:
space:
mode:
authordjevangelia <263709373+djevangelia@users.noreply.github.com>2026-08-14 22:01:49 +0200
committerGitHub <noreply@github.com>2026-08-14 20:01:49 +0000
commite048afd10a7d87b185bfda06f55a63a46ce50b3b (patch)
tree430052f3303d5f962368bcde3aa45ba9335970ea /soh/src/code/z_parameter.c
parent9782faba44b0cb1510f5256f86781aa2ae47dfaf (diff)
Decomp, three audio functions (#7069)
Diffstat (limited to 'soh/src/code/z_parameter.c')
-rw-r--r--soh/src/code/z_parameter.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 6da225560..894a212a0 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -2827,7 +2827,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
(play->csCtx.state == CS_STATE_IDLE)) {
if (!CVarGetInteger(CVAR_AUDIO("DisableNaviCallAudio"), 0)) {
// 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); }
// clang-format on
@@ -2900,7 +2900,7 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) {
}
// clang-format off
- if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4,
+ if (healthChange > 0) { Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((gSaveContext.isDoubleDefenseAcquired != 0) && (healthChange < 0)) {
healthChange >>= 1;
@@ -3083,8 +3083,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
if ((type != 5) && (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;
}
@@ -3101,8 +3101,8 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return 1;
} 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;
}
case MAGIC_CONSUME_WAIT_NO_PREVIEW:
@@ -3115,8 +3115,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;
}
case MAGIC_CONSUME_LENS:
@@ -3145,8 +3145,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;
}
case MAGIC_ADD:
@@ -3240,8 +3240,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
gSaveContext.magic += 4;
if (gSaveContext.gameMode == GAMEMODE_NORMAL && gSaveContext.sceneLayer < 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)"
@@ -3344,8 +3344,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) ||
!hasLens || !play->actorCtx.lensActive) {
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;
if (CVarGetInteger(CVAR_COSMETIC("Consumable.MagicBorder.Changed"), 0)) {
sMagicBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.MagicBorder.Value"), sMagicBorder_ori);
@@ -3400,8 +3400,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
case MAGIC_STATE_ADD:
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;
@@ -6063,20 +6063,20 @@ void Interface_Draw(PlayState* play) {
sEnvHazardActive = false;
} else if (gSaveContext.timerSeconds > 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.timerSeconds >= 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);
}
}
}
@@ -6123,9 +6123,9 @@ void Interface_Draw(PlayState* play) {
sTimerStateTimer = 40;
gSaveContext.timerState = TIMER_STATE_UP_FREEZE;
} 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);
}
}
}
@@ -6243,20 +6243,20 @@ void Interface_Draw(PlayState* play) {
}
} else if (gSaveContext.subTimerSeconds > 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.subTimerSeconds > 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.subTimerSeconds++;
@@ -6270,9 +6270,9 @@ void Interface_Draw(PlayState* play) {
}
if ((gSaveContext.subTimerSeconds % 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);
}
}
}
@@ -6658,8 +6658,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);
@@ -6700,8 +6700,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));
@@ -6717,13 +6717,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;