mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-18 21:10:19 +00:00
Name variables for Audio_PlaySoundGeneral (#1198)
* Rename variables and function * Improve comment * PR Suggestion * PR Suggestions * Revert back to `Audio_PlaySoundGeneral`, make a separate PR `Sound` -> `Sfx` * Oops, fixed that
This commit is contained in:
parent
1e03b662f2
commit
ef870bdd11
98 changed files with 1026 additions and 721 deletions
|
@ -181,7 +181,8 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
|||
GET_NEWF(sramCtx, this->buttonIndex, 4), GET_NEWF(sramCtx, this->buttonIndex, 5));
|
||||
|
||||
if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
|
||||
this->kbdButton = FS_KBD_BTN_NONE;
|
||||
this->charPage = FS_CHAR_PAGE_ENG;
|
||||
|
@ -194,18 +195,21 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
|||
this->nameEntryBoxAlpha = 0;
|
||||
MemCopy(&this->fileNames[this->buttonIndex][0], &emptyName, 8);
|
||||
} else if (this->n64ddFlags[this->buttonIndex] == this->n64ddFlag) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->actionTimer = 8;
|
||||
this->selectMode = SM_FADE_MAIN_TO_SELECT;
|
||||
this->selectedFileIndex = this->buttonIndex;
|
||||
this->menuMode = FS_MENU_MODE_SELECT;
|
||||
this->nextTitleLabel = FS_TITLE_OPEN_FILE;
|
||||
} else if (!this->n64ddFlags[this->buttonIndex]) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (this->warningLabel == FS_WARNING_NONE) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->prevConfigMode = this->configMode;
|
||||
|
||||
if (this->buttonIndex == FS_BTN_MAIN_COPY) {
|
||||
|
@ -226,12 +230,14 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
|||
|
||||
this->actionTimer = 8;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) > 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
this->buttonIndex--;
|
||||
|
@ -1315,18 +1321,22 @@ void FileChoose_ConfirmFile(GameState* thisx) {
|
|||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
|
||||
if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) {
|
||||
func_800AA000(300.0f, 180, 20, 100);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->selectMode = SM_FADE_OUT;
|
||||
func_800F6964(0xF);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->selectMode++;
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->selectMode++;
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->confirmButtonIndex ^= 1;
|
||||
}
|
||||
}
|
||||
|
@ -1431,14 +1441,16 @@ void FileChoose_LoadGame(GameState* thisx) {
|
|||
s32 pad;
|
||||
|
||||
if (this->buttonIndex == FS_BTN_SELECT_FILE_1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
SET_NEXT_GAMESTATE(&this->state, Select_Init, SelectContext);
|
||||
this->state.running = false;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
Sram_OpenSave(&this->sramCtx);
|
||||
gSaveContext.gameMode = 0;
|
||||
|
|
|
@ -70,20 +70,24 @@ void FileChoose_SelectCopySource(GameState* thisx) {
|
|||
this->nextTitleLabel = FS_TITLE_SELECT_FILE;
|
||||
this->configMode = CM_COPY_RETURN_MAIN;
|
||||
this->warningLabel = FS_WARNING_NONE;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
|
||||
if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
|
||||
this->actionTimer = 8;
|
||||
this->selectedFileIndex = this->buttonIndex;
|
||||
this->configMode = CM_SETUP_COPY_DEST_1;
|
||||
this->nextTitleLabel = FS_TITLE_COPY_TO;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
this->buttonIndex--;
|
||||
|
@ -181,21 +185,25 @@ void FileChoose_SelectCopyDest(GameState* thisx) {
|
|||
this->nextTitleLabel = FS_TITLE_COPY_FROM;
|
||||
this->actionTimer = 8;
|
||||
this->configMode = CM_EXIT_TO_COPY_SOURCE_1;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
|
||||
if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
|
||||
this->copyDestFileIndex = this->buttonIndex;
|
||||
this->nextTitleLabel = FS_TITLE_COPY_CONFIRM;
|
||||
this->actionTimer = 8;
|
||||
this->configMode = CM_SETUP_COPY_CONFIRM_1;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
this->buttonIndex--;
|
||||
|
@ -366,7 +374,8 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
|||
this->actionTimer = 8;
|
||||
this->nextTitleLabel = FS_TITLE_COPY_TO;
|
||||
this->configMode = CM_RETURN_TO_COPY_DEST;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
|
||||
dayTime = gSaveContext.dayTime;
|
||||
Sram_CopySave(this, sramCtx);
|
||||
|
@ -376,9 +385,11 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
|||
this->actionTimer = 8;
|
||||
this->configMode = CM_COPY_ANIM_1;
|
||||
func_800AA000(300.0f, 0xB4, 0x14, 0x64);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->buttonIndex ^= 1;
|
||||
}
|
||||
}
|
||||
|
@ -489,7 +500,8 @@ void FileChoose_CopyAnim3(GameState* thisx) {
|
|||
|
||||
if (this->actionTimer == 75) {
|
||||
this->connectorAlpha[this->copyDestFileIndex] = 255;
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_DIAMOND_SWITCH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_DIAMOND_SWITCH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
||||
this->actionTimer--;
|
||||
|
@ -499,7 +511,8 @@ void FileChoose_CopyAnim3(GameState* thisx) {
|
|||
this->actionTimer = 8;
|
||||
this->nextTitleLabel = FS_TITLE_SELECT_FILE;
|
||||
this->configMode++;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -688,20 +701,24 @@ void FileChoose_EraseSelect(GameState* thisx) {
|
|||
this->nextTitleLabel = FS_TITLE_SELECT_FILE;
|
||||
this->configMode = CM_EXIT_ERASE_TO_MAIN;
|
||||
this->warningLabel = FS_WARNING_NONE;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
|
||||
if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
|
||||
this->actionTimer = 8;
|
||||
this->selectedFileIndex = this->buttonIndex;
|
||||
this->configMode = CM_SETUP_ERASE_CONFIRM_1;
|
||||
this->nextTitleLabel = FS_TITLE_ERASE_CONFIRM;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
this->buttonIndex--;
|
||||
|
@ -824,17 +841,20 @@ void FileChoose_EraseConfirm(GameState* thisx) {
|
|||
this->nextTitleLabel = FS_TITLE_ERASE_FILE;
|
||||
this->configMode = CM_EXIT_TO_ERASE_SELECT_1;
|
||||
this->actionTimer = 8;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
|
||||
this->n64ddFlags[this->selectedFileIndex] = this->connectorAlpha[this->selectedFileIndex] = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_DIAMOND_SWITCH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_DIAMOND_SWITCH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->actionTimer = 8;
|
||||
this->configMode = CM_ERASE_ANIM_1;
|
||||
this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE;
|
||||
func_800AA000(200.0f, 0xFF, 0x14, 0x96);
|
||||
sEraseDelayTimer = 15;
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->buttonIndex ^= 1;
|
||||
}
|
||||
}
|
||||
|
@ -948,7 +968,8 @@ void FileChoose_EraseAnim1(GameState* thisx) {
|
|||
sEraseDelayTimer--;
|
||||
|
||||
if (sEraseDelayTimer == 0) {
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_ABYSS, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_OC_ABYSS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -966,7 +987,8 @@ void FileChoose_EraseAnim2(GameState* thisx) {
|
|||
this->actionTimer = 8;
|
||||
this->nextTitleLabel = FS_TITLE_SELECT_FILE;
|
||||
this->configMode++;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -348,7 +348,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
|
||||
if (this->configMode == CM_NAME_ENTRY) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
// place cursor on END button
|
||||
this->kbdY = 5;
|
||||
this->kbdX = 4;
|
||||
|
@ -359,7 +360,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
this->newFileNameCharCount--;
|
||||
|
||||
|
@ -372,8 +374,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -387,8 +389,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
font->fontBuf + D_808123F0[this->charIndex] * FONT_CHAR_TEX_SIZE, 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->fileNames[this->buttonIndex][this->newFileNameCharCount] = D_808123F0[this->charIndex];
|
||||
this->newFileNameCharCount++;
|
||||
|
||||
|
@ -404,8 +406,9 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
this->newFileNameCharCount--;
|
||||
|
||||
|
@ -418,8 +421,9 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
} else if (this->kbdButton == FS_KBD_BTN_END) {
|
||||
validName = false;
|
||||
|
@ -432,8 +436,9 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
|
||||
if (validName) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
gSaveContext.fileNum = this->buttonIndex;
|
||||
dayTime = ((void)0, gSaveContext.dayTime);
|
||||
Sram_InitSave(this, &this->sramCtx);
|
||||
|
@ -443,21 +448,23 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
|||
this->connectorAlpha[this->buttonIndex] = 255;
|
||||
func_800AA000(300.0f, 0xB4, 0x14, 0x64);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->newFileNameCharCount++;
|
||||
|
||||
if (this->newFileNameCharCount > 7) {
|
||||
this->newFileNameCharCount = 7;
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->newFileNameCharCount--;
|
||||
|
||||
if (this->newFileNameCharCount < 0) {
|
||||
|
@ -514,7 +521,8 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
|
||||
if (this->kbdY != 5) {
|
||||
if (this->stickRelX < -30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->charIndex--;
|
||||
this->kbdX--;
|
||||
if (this->kbdX < 0) {
|
||||
|
@ -522,7 +530,8 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->charIndex = (this->kbdY * 13) + this->kbdX;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->charIndex++;
|
||||
this->kbdX++;
|
||||
if (this->kbdX > 12) {
|
||||
|
@ -532,13 +541,15 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
} else {
|
||||
if (this->stickRelX < -30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdX--;
|
||||
if (this->kbdX < 3) {
|
||||
this->kbdX = 4;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdX++;
|
||||
if (this->kbdX > 4) {
|
||||
this->kbdX = 3;
|
||||
|
@ -547,7 +558,8 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdY--;
|
||||
|
||||
if (this->kbdY < 0) {
|
||||
|
@ -578,7 +590,8 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
} else if (this->stickRelY < -30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdY++;
|
||||
|
||||
if (this->kbdY > 5) {
|
||||
|
@ -656,7 +669,8 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
Input* input = &this->state.input[0];
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->configMode = CM_OPTIONS_TO_MAIN;
|
||||
sramCtx->readBuff[0] = gSaveContext.audioSetting;
|
||||
sramCtx->readBuff[1] = gSaveContext.zTargetSetting;
|
||||
|
@ -675,7 +689,8 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
}
|
||||
|
||||
if (this->stickRelX < -30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (sSelectedSetting == FS_SETTING_AUDIO) {
|
||||
gSaveContext.audioSetting--;
|
||||
|
@ -688,7 +703,8 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (sSelectedSetting == FS_SETTING_AUDIO) {
|
||||
gSaveContext.audioSetting++;
|
||||
|
@ -702,10 +718,12 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
}
|
||||
|
||||
if ((this->stickRelY < -30) || (this->stickRelY > 30)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sSelectedSetting ^= 1;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sSelectedSetting ^= 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -395,13 +395,15 @@ void Select_UpdateMenu(SelectContext* this) {
|
|||
if (this->timerUp == 0) {
|
||||
this->timerUp = 20;
|
||||
this->lockUp = true;
|
||||
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);
|
||||
this->verticalInput = R_UPDATE_RATE;
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DUP) && this->timerUp == 0) {
|
||||
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);
|
||||
this->verticalInput = R_UPDATE_RATE * 3;
|
||||
}
|
||||
|
||||
|
@ -412,23 +414,27 @@ void Select_UpdateMenu(SelectContext* this) {
|
|||
if (this->timerDown == 0) {
|
||||
this->timerDown = 20;
|
||||
this->lockDown = true;
|
||||
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);
|
||||
this->verticalInput = -R_UPDATE_RATE;
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN) && (this->timerDown == 0)) {
|
||||
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);
|
||||
this->verticalInput = -R_UPDATE_RATE * 3;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT) || CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
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);
|
||||
this->verticalInput = R_UPDATE_RATE;
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT) || CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) {
|
||||
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);
|
||||
this->verticalInput = -R_UPDATE_RATE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue