Adds option to add higher pitches to silver rupee jingle (#2246)

* Adds option to add higher pitches to silver rupee jingle.

Some rooms in Master Quest had 10 silver rupees, but the game was programmed to only play the jingle 5 times and then just went silent for the rest. This option adds 5 more transposition values to the array, and an option to play them (so that authentic behavior is preserved by default).

* Adds the new option to Vanilla Plus preset and up

Also adds it to the list to be reset back to 0 when applying the default preset.

* Changes display name of checkbox.

* Change CVar_GetS32 to CVarGetInteger
This commit is contained in:
Christopher Leggett 2023-01-19 04:10:47 -05:00 committed by GitHub
parent a335aba987
commit 12737143c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -173,6 +173,7 @@ const std::vector<const char*> enhancementsCvars = {
"gBombchuBowlingNoBigCucco",
"gBombchuBowlingAmmunition",
"gCreditsFix",
"gSilverRupeeJingleExtend"
};
const std::vector<const char*> randomizerCvars = {
@ -320,6 +321,8 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1),
@ -383,6 +386,8 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1),
@ -495,6 +500,8 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
PRESET_ENTRY_S32("gDekuNutUpgradeFix", 1),
// Fix Navi text HUD position
PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1),

View File

@ -761,6 +761,10 @@ namespace GameMenuBar {
UIWidgets::Tooltip("Fixes camera getting stuck on collision when standing still, also fixes slight shift back in camera when stop moving");
UIWidgets::PaddedEnhancementCheckbox("Fix Hanging Ledge Swing Rate", "gFixHangingLedgeSwingRate", true, false);
UIWidgets::Tooltip("Fixes camera swing rate when player falls of a ledge and camera swings around");
UIWidgets::PaddedEnhancementCheckbox("Fix Missing Jingle after 5 Silver Rupees", "gSilverRupeeJingleExtend", true, false);
UIWidgets::Tooltip(
"Adds 5 higher pitches for the Silver Rupee Jingle for the rooms with more than 5 Silver Rupees. "
"Currently only relevant in Master Quest.");
ImGui::EndMenu();
}

View File

@ -226,10 +226,10 @@ void EnGSwitch_WaitForObject(EnGSwitch* this, PlayState* play) {
}
void EnGSwitch_SilverRupeeTracker(EnGSwitch* this, PlayState* play) {
static s8 majorScale[] = { 0, 2, 4, 5, 7 };
static s8 majorScale[] = { 0, 2, 4, 5, 7, 9, 11, 13, 15, 17 };
if (this->noteIndex < sCollectedCount) {
if (sCollectedCount < 5) {
if (sCollectedCount < (CVarGetInteger("gSilverRupeeJingleExtend", 0) ? 10 : 5)) {
// "sound?"
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n" VT_RST, this->noteIndex);
Audio_PlaySoundTransposed(&D_801333D4, NA_SE_EV_FIVE_COUNT_LUPY, majorScale[this->noteIndex]);