Link voice pitch v0 (#2430)
* Link voice pitch v0 * Using a new variable instead * Move voice pitch slider to Options tab * fallback to original behavior if freqMultiplier is set to 1 * Move reset button to Options tab with its slider * Fix voice pitch slider width in Options tab * [Review] Always use freqMultiplier
This commit is contained in:
@@ -82,6 +82,9 @@ static s32 sCurCeilingBgId;
|
||||
// Used for animating the ice trap on the "Get Item" model.
|
||||
f32 iceTrapScale;
|
||||
|
||||
// For Link's voice pitch SFX modifier
|
||||
static f32 freqMultiplier = 1;
|
||||
|
||||
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale) {
|
||||
shape->yOffset = yOffset;
|
||||
shape->shadowDraw = shadowDraw;
|
||||
@@ -2185,7 +2188,17 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
|
||||
}
|
||||
|
||||
void func_8002F7DC(Actor* actor, u16 sfxId) {
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) {
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
|
||||
} else {
|
||||
freqMultiplier = CVarGetFloat("gLinkVoiceFreqMultiplier", 1.0);
|
||||
if (freqMultiplier <= 0) {
|
||||
freqMultiplier = 1;
|
||||
}
|
||||
// Authentic behavior uses D_801333E0 for both freqScale and a4
|
||||
// Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &freqMultiplier, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
}
|
||||
|
||||
void Audio_PlayActorSound2(Actor* actor, u16 sfxId) {
|
||||
|
||||
Reference in New Issue
Block a user