Shipwright/soh/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c

1066 lines
37 KiB
C
Raw Normal View History

#include "file_choose.h"
// when choosing a file to copy or erase, the 6 main menu buttons are placed at these offsets
static s16 sChooseFileYOffsets[] = { -48, -48, -48, -24, -24, 0 };
static s16 D_8081248C[3][3] = {
{ 0, -48, -48 },
{ -64, 16, -48 },
{ -64, -64, 32 },
};
static s16 sEraseDelayTimer = 15;
/**
* Move buttons into place for the select source screen and fade in the proper labels.
* Update function for `CM_SETUP_COPY_SOURCE`
*/
void FileChoose_SetupCopySource(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 yStep;
s16 i;
for (i = 0; i < 5; i++) {
yStep = (ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i])) / this->actionTimer;
if (this->buttonYOffsets[i] >= sChooseFileYOffsets[i]) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
this->actionButtonAlpha[FS_BTN_ACTION_COPY] -= 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] -= 25;
this->optionButtonAlpha -= 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] += 25;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 8;
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 200;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->buttonIndex = FS_BTN_COPY_QUIT;
this->configMode++;
}
}
/**
* Allow the player to select a file to copy or exit back to the main menu.
* Update function for `CM_SELECT_COPY_SOURCE`
*/
void FileChoose_SelectCopySource(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
bool dpad = CVar_GetS32("gDpadText", 0);
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
this->actionTimer = 8;
this->buttonIndex = FS_BTN_MAIN_COPY;
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);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
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);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
} else {
if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
this->buttonIndex--;
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
this->buttonIndex = FS_BTN_COPY_QUIT;
}
} else {
this->buttonIndex++;
if (this->buttonIndex > FS_BTN_COPY_QUIT) {
this->buttonIndex = FS_BTN_COPY_FILE_1;
}
}
}
if (this->buttonIndex != FS_BTN_COPY_QUIT) {
if (!Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
this->warningLabel = FS_WARNING_FILE_EMPTY;
this->warningButtonIndex = this->buttonIndex;
this->emptyFileTextAlpha = 255;
} else {
this->warningLabel = FS_WARNING_NONE;
}
}
}
}
/**
* Move the menu buttons into place for the copy destination selection and switch titles.
* Update function for `CM_SETUP_COPY_DEST_1`
*/
void FileChoose_SetupCopyDest1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 yStep;
s16 i;
for (i = 0; i < 3; i++) {
yStep = ABS(this->buttonYOffsets[i] - D_8081248C[this->buttonIndex][i]) / this->actionTimer;
if (D_8081248C[this->buttonIndex][i] >= this->buttonYOffsets[i]) {
this->buttonYOffsets[i] += yStep;
} else {
this->buttonYOffsets[i] -= yStep;
}
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->nameBoxAlpha[this->buttonIndex] -= 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->buttonYOffsets[this->buttonIndex] = D_8081248C[this->buttonIndex][this->buttonIndex];
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->actionTimer = 8;
this->configMode++;
}
}
/**
* Show the file info of the file selected to copy from.
* Update function for `CM_SETUP_COPY_DEST_2`
*/
void FileChoose_SetupCopyDest2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->nameBoxAlpha[this->buttonIndex] -= 25;
this->fileInfoAlpha[this->buttonIndex] += 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->nameBoxAlpha[this->buttonIndex] = 0;
this->fileInfoAlpha[this->buttonIndex] = 200;
this->buttonIndex = FS_BTN_COPY_QUIT;
this->actionTimer = 8;
this->configMode = CM_SELECT_COPY_DEST;
}
}
/**
* Allow the player to select a slot to copy to or exit to the copy select screen.
* Update function for `CM_SELECT_COPY_DEST`
*/
void FileChoose_SelectCopyDest(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
bool dpad = CVar_GetS32("gDpadText", 0);
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
this->buttonIndex = this->selectedFileIndex;
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);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (!Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
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);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
} else {
if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
this->buttonIndex--;
if ((this->buttonIndex == this->selectedFileIndex)) {
this->buttonIndex--;
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
this->buttonIndex = FS_BTN_COPY_QUIT;
}
} else {
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
this->buttonIndex = FS_BTN_COPY_QUIT;
}
}
} else {
this->buttonIndex++;
if (this->buttonIndex > FS_BTN_COPY_QUIT) {
this->buttonIndex = FS_BTN_COPY_FILE_1;
}
if (this->buttonIndex == this->selectedFileIndex) {
this->buttonIndex++;
}
}
}
if (this->buttonIndex != FS_BTN_COPY_QUIT) {
if (Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
this->warningLabel = FS_WARNING_FILE_IN_USE;
this->warningButtonIndex = this->buttonIndex;
this->emptyFileTextAlpha = 255;
} else {
this->warningLabel = FS_WARNING_NONE;
}
}
}
}
/**
* Fade out file info, bring back the name box, and get ready to return to copy source screen.
* Update function for `CM_EXIT_TO_COPY_SOURCE_1`
*/
void FileChoose_ExitToCopySource1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->nextTitleLabel = FS_TITLE_COPY_FROM;
this->nameBoxAlpha[this->buttonIndex] = 200;
this->fileInfoAlpha[this->buttonIndex] = 0;
this->actionTimer = 8;
this->configMode++;
}
}
/**
* Move the buttons back into place and return to copy source select.
* Update function for `CM_EXIT_TO_COPY_SOURCE_2`
*/
void FileChoose_ExitToCopySource2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 3; i++) {
yStep = ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= sChooseFileYOffsets[i]) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->buttonIndex = 3;
this->configMode = CM_SELECT_COPY_SOURCE;
}
}
/**
* Rearrange buttons on the screen to prepare for copy confirmation.
* Update function for `CM_SETUP_COPY_CONFIRM_1`
*/
void FileChoose_SetupCopyConfirm1(GameState* thisx) {
static s16 D_808124A4[] = { -56, -40, -24, 0 };
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
for (i = 0; i < 3; i++) {
if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
this->fileButtonAlpha[i] -= 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->connectorAlpha[i] -= 31;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
}
} else {
if (this->copyDestFileIndex == i) {
yStep = ABS(this->buttonYOffsets[i] - D_808124A4[i]) / this->actionTimer;
this->buttonYOffsets[i] += yStep;
if (this->buttonYOffsets[i] >= D_808124A4[i]) {
this->buttonYOffsets[i] = D_808124A4[i];
}
}
}
}
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->actionTimer = 8;
this->configMode++;
}
}
/**
* Fade in the 'Yes' button before allowing the player to decide.
* Update function for `CM_SETUP_COPY_CONFIRM_2`
*/
void FileChoose_SetupCopyConfirm2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->configMode = CM_COPY_CONFIRM;
this->buttonIndex = FS_BTN_CONFIRM_QUIT;
}
}
/**
* Allow the player to confirm the copy, or quit back to the destination select.
* If yes is selected, the actual copy occurs in this function before moving on to the animation.
* Update function for `CM_COPY_CONFIRM`
*/
void FileChoose_CopyConfirm(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
u16 dayTime;
bool dpad = CVar_GetS32("gDpadText", 0);
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
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);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
dayTime = gSaveContext.dayTime;
Save_CopyFile(this->selectedFileIndex, this->copyDestFileIndex);
gSaveContext.dayTime = dayTime;
this->fileInfoAlpha[this->copyDestFileIndex] = this->nameAlpha[this->copyDestFileIndex] = 0;
this->nextTitleLabel = FS_TITLE_COPY_COMPLETE;
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);
} else if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->buttonIndex ^= 1;
}
}
/**
* Move buttons back in place and return to copy destination select.
* Update function for `CM_RETURN_TO_COPY_DEST`
*/
void FileChoose_ReturnToCopyDest(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
for (i = 0; i < 3; i++) {
if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
this->fileButtonAlpha[i] += 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
this->connectorAlpha[i] += 31;
}
}
yStep = ABS(this->buttonYOffsets[i] - D_8081248C[this->selectedFileIndex][i]) / this->actionTimer;
if (D_8081248C[this->selectedFileIndex][i] >= this->buttonYOffsets[i]) {
this->buttonYOffsets[i] += yStep;
} else {
this->buttonYOffsets[i] -= yStep;
}
}
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->actionTimer = 8;
this->buttonIndex = FS_BTN_COPY_QUIT;
this->configMode = CM_SELECT_COPY_DEST;
}
}
/**
* Hide title
* Update function for `CM_COPY_ANIM_1`
*/
void FileChoose_CopyAnim1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->titleAlpha[0] -= 31;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleAlpha[0] = 0;
this->actionTimer = 8;
this->configMode++;
osSyncPrintf("connect_alpha=%d decision_alpha[%d]=%d\n", this->connectorAlpha[this->copyDestFileIndex],
this->copyDestFileIndex, this->fileInfoAlpha[this->copyDestFileIndex]);
}
}
/**
* Move a copy of the file window down and fade in the file info.
* Update function for `CM_COPY_ANIM_2`
*/
void FileChoose_CopyAnim2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 yStep;
this->fileInfoAlpha[this->copyDestFileIndex] += 25;
this->nameAlpha[this->copyDestFileIndex] += 25;
this->titleAlpha[1] += 31;
yStep = ABS(this->fileNamesY[this->copyDestFileIndex] + 56) / this->actionTimer;
this->fileNamesY[this->copyDestFileIndex] -= yStep;
if (this->fileNamesY[this->copyDestFileIndex] <= -56) {
this->fileNamesY[this->copyDestFileIndex] = -56;
}
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 90;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode++;
}
}
/**
* Play sound to indicate that the copy has completed. Wait for a timer or for
* the player to press a button before moving on.
* Update function for `CM_COPY_ANIM_3`
*/
void FileChoose_CopyAnim3(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
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);
}
this->actionTimer--;
if (this->actionTimer < 74) {
if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B | BTN_START) || (this->actionTimer == 0)) {
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);
}
}
}
/**
* Fade out the info boxes for both files and bring in their name boxes. Fade out title.
* Update function for `CM_COPY_ANIM_4`
*/
void FileChoose_CopyAnim4(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->fileInfoAlpha[this->selectedFileIndex] -= 25;
this->fileInfoAlpha[this->copyDestFileIndex] -= 25;
this->nameBoxAlpha[this->selectedFileIndex] += 25;
this->nameBoxAlpha[this->copyDestFileIndex] += 25;
this->titleAlpha[0] -= 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->fileNamesY[this->copyDestFileIndex] = this->buttonYOffsets[3] = 0;
this->actionTimer = 8;
this->titleAlpha[0] = 0;
this->configMode++;
}
}
/**
* Restore all buttons and labels back to their original place and go back to the main menu.
* Update function for `CM_COPY_ANIM_5`
*/
void FileChoose_CopyAnim5(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= 0) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] += 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
this->connectorAlpha[i] += 31;
}
}
}
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] += 25;
this->optionButtonAlpha += 25;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
for (i = 0; i < 3; i++) {
this->connectorAlpha[i] = 0;
this->fileButtonAlpha[i] = 200;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->connectorAlpha[i];
if (Save_GetSaveMetaInfo(i)->valid) {
this->connectorAlpha[i] = 255;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
}
}
this->fileNamesY[this->selectedFileIndex] = 0;
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode = CM_MAIN_MENU;
}
}
/**
* Exit from the copy source screen to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_COPY_RETURN_MAIN`
*/
void FileChoose_ExitCopyToMain(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= 0) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode = CM_MAIN_MENU;
}
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
}
/**
* Move buttons into place for the erase select screen and fade in the proper labels.
* Update function for `CM_SETUP_ERASE_SELECT`
*/
void FileChoose_SetupEraseSelect(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= sChooseFileYOffsets[i]) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
this->actionButtonAlpha[FS_BTN_ACTION_COPY] -= 50;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] -= 50;
this->optionButtonAlpha -= 50;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] += 25;
if (this->actionButtonAlpha[FS_BTN_ACTION_COPY] <= 0) {
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
this->confirmButtonAlpha[1] = 200;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->buttonIndex = FS_BTN_ERASE_QUIT;
this->configMode++;
}
}
/**
* Allow the player to select a file to erase or exit back to the main menu.
* Update function for `CM_ERASE_SELECT`
*/
void FileChoose_EraseSelect(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
bool dpad = CVar_GetS32("gDpadText", 0);
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
this->buttonIndex = FS_BTN_MAIN_ERASE;
this->actionTimer = 8;
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);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
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);
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
} else {
if ((ABS(this->stickRelY) >= 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if ((this->stickRelY >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
this->buttonIndex--;
if (this->buttonIndex < FS_BTN_ERASE_FILE_1) {
this->buttonIndex = FS_BTN_ERASE_QUIT;
}
} else {
this->buttonIndex++;
if (this->buttonIndex > FS_BTN_ERASE_QUIT) {
this->buttonIndex = FS_BTN_ERASE_FILE_1;
}
}
}
if (this->buttonIndex != FS_BTN_ERASE_QUIT) {
if (!Save_GetSaveMetaInfo(this->buttonIndex)->valid) {
this->warningLabel = FS_WARNING_FILE_EMPTY;
this->warningButtonIndex = this->buttonIndex;
this->emptyFileTextAlpha = 255;
} else {
this->warningLabel = FS_WARNING_NONE;
}
} else {
this->warningLabel = FS_WARNING_NONE;
}
}
}
/**
* ...
* Update function for `CM_SETUP_ERASE_CONFIRM_1`
*/
void FileChoose_SetupEraseConfirm1(GameState* thisx) {
static s16 D_808124AC[] = { 0, 16, 32 };
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] -= 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->connectorAlpha[i] -= 31;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
}
} else {
this->nameBoxAlpha[i] -= 25;
}
}
this->titleAlpha[0] -= 15;
this->titleAlpha[1] += 15;
yStep = ABS(this->buttonYOffsets[this->buttonIndex] - D_808124AC[this->buttonIndex]) / this->actionTimer;
if (this->buttonYOffsets[this->buttonIndex] >= D_808124AC[this->buttonIndex]) {
this->buttonYOffsets[this->buttonIndex] -= yStep;
} else {
this->buttonYOffsets[this->buttonIndex] += yStep;
}
this->actionTimer--;
if (this->actionTimer == 0) {
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] = 0;
if (Save_GetSaveMetaInfo(i)->valid) {
this->connectorAlpha[i] = 0;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i] = 0;
}
} else {
this->nameBoxAlpha[i] = 0;
}
}
this->buttonYOffsets[this->buttonIndex] = D_808124AC[this->buttonIndex];
this->actionTimer = 8;
this->configMode++;
}
}
/**
* Show the file info of the file selected to erase.
* Update function for `CM_SETUP_ERASE_CONFIRM_2`
*/
void FileChoose_SetupEraseConfirm2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
this->titleAlpha[0] -= 15;
this->titleAlpha[1] += 15;
this->fileInfoAlpha[this->buttonIndex] += 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 8;
this->titleLabel = this->nextTitleLabel;
this->fileInfoAlpha[this->buttonIndex] = this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] = 200;
this->buttonIndex = FS_BTN_ERASE_FILE_2;
this->configMode = CM_ERASE_CONFIRM;
}
}
/**
* Allow the player to confirm their chioce to erase or return back to erase select.
* Update function for `CM_ERASE_CONFIRM`
*/
void FileChoose_EraseConfirm(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
bool dpad = CVar_GetS32("gDpadText", 0);
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
this->buttonIndex = this->selectedFileIndex;
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);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
this->connectorAlpha[this->selectedFileIndex] = 0;
Audio_PlaySoundGeneral(NA_SE_EV_DIAMOND_SWITCH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
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) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->buttonIndex ^= 1;
}
}
/**
* Fade out file info, bring back the name box, and get ready to return to erase select screen.
* Update function for `CM_EXIT_TO_ERASE_SELECT_1`
*/
void FileChoose_ExitToEraseSelect1(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 8;
this->fileInfoAlpha[this->buttonIndex] = 0;
this->configMode++;
}
}
/**
* Move the buttons back into place and return to erase select.
* Update function for `CM_EXIT_TO_ERASE_SELECT_2`
*/
void FileChoose_ExitToEraseSelect2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
yStep = ABS(this->buttonYOffsets[this->buttonIndex] - sChooseFileYOffsets[this->buttonIndex]) / this->actionTimer;
if (this->buttonYOffsets[this->buttonIndex] >= sChooseFileYOffsets[this->buttonIndex]) {
this->buttonYOffsets[this->buttonIndex] -= yStep;
} else {
this->buttonYOffsets[this->buttonIndex] += yStep;
}
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] += 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
this->connectorAlpha[i] += 31;
}
}
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->buttonYOffsets[this->buttonIndex] = sChooseFileYOffsets[this->buttonIndex];
this->actionTimer = 8;
this->buttonIndex = FS_BTN_ERASE_QUIT;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode = CM_ERASE_SELECT;
}
}
/**
* Wait for an initial delay, then start fading out the selected file.
* The actual file deletion occurs in this function
* Update function for `CM_ERASE_ANIM_1`
*/
void FileChoose_EraseAnim1(GameState* thisx) {
static s16 D_80813800;
FileChooseContext* this = (FileChooseContext*)thisx;
if (sEraseDelayTimer == 0) {
if (this->actionTimer == 8) {
D_80813800 = 1;
}
if (this->actionTimer != 0) {
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->fileInfoAlpha[this->selectedFileIndex] -= 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
}
this->fileNamesY[this->selectedFileIndex] -= D_80813800;
this->actionTimer--;
D_80813800 += 2;
if (this->actionTimer == 0) {
Save_DeleteFile(this->selectedFileIndex);
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = this->connectorAlpha[this->selectedFileIndex] = 0;
// probably a fake match, there should be a better chained assignment
this->confirmButtonAlpha[0] = this->confirmButtonAlpha[1] = 0;
this->fileInfoAlpha[this->selectedFileIndex] = this->nameBoxAlpha[this->selectedFileIndex] =
this->confirmButtonAlpha[1];
this->configMode++;
this->actionTimer = 90;
}
} else {
sEraseDelayTimer--;
if (sEraseDelayTimer == 0) {
Audio_PlaySoundGeneral(NA_SE_OC_ABYSS, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
}
}
/**
* Wait for a delay timer or for the palyer to press a button before returning to the main menu.
* Update function for `CM_ERASE_ANIM_2`
*/
void FileChoose_EraseAnim2(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B | BTN_START) || (--this->actionTimer == 0)) {
this->buttonYOffsets[3] = 0;
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);
}
}
/**
* Exit from the erase animation to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_ERASE_ANIM_3`
*/
void FileChoose_EraseAnim3(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= 0) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
for (i = 0; i < 3; i++) {
this->fileButtonAlpha[i] += 25;
if (Save_GetSaveMetaInfo(i)->valid) {
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
this->connectorAlpha[i] += 31;
}
}
if (this->fileButtonAlpha[this->selectedFileIndex] >= 200) {
this->fileButtonAlpha[this->selectedFileIndex] = 200;
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->fileNamesY[this->selectedFileIndex] = 0;
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
this->confirmButtonAlpha[0] = this->confirmButtonAlpha[1] = 0;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode = CM_MAIN_MENU;
}
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
}
/**
* Exit from the erase select screen to the main menu. Return all buttons and labels to their original place.
* Update function for `CM_EXIT_ERASE_TO_MAIN`
*/
void FileChoose_ExitEraseToMain(GameState* thisx) {
FileChooseContext* this = (FileChooseContext*)thisx;
s16 i;
s16 yStep;
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
if (this->buttonYOffsets[i] >= 0) {
this->buttonYOffsets[i] -= yStep;
} else {
this->buttonYOffsets[i] += yStep;
}
}
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] += 25;
this->optionButtonAlpha += 25;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 50;
if (this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] <= 0) {
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
}
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
if (this->actionTimer == 0) {
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
this->configMode = CM_MAIN_MENU;
}
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
}