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
3 changed files with 13 additions and 2 deletions

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]);