ADD: Time Savers -> Link as default file name (#2475)

This commit is contained in:
PurpleHato 2023-02-15 03:15:15 +01:00 committed by GitHub
commit e60f2b0c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -473,6 +473,7 @@ void FileChoose_UpdateRandomizer() {
*/
void FileChoose_UpdateMainMenu(GameState* thisx) {
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
static u8 linkName[] = { 0x15, 0x2C, 0x31, 0x2E, 0x3E, 0x3E, 0x3E, 0x3E };
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
bool dpad = CVarGetInteger("gDpadText", 0);
@ -497,10 +498,10 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
this->kbdY = 0;
this->charIndex = 0;
this->charBgAlpha = 0;
this->newFileNameCharCount = 0;
this->newFileNameCharCount = CVarGetInteger("gLinkDefaultName", 0) ? 4 : 0;
this->nameEntryBoxPosX = 120;
this->nameEntryBoxAlpha = 0;
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName, &emptyName, 8);
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName, CVarGetInteger("gLinkDefaultName", 0) ? &linkName : &emptyName, 8);
}
this->logoAlpha = 0;
} else if(!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(this->buttonIndex))) {
@ -654,6 +655,7 @@ void FileChoose_StartQuestMenu(GameState* thisx) {
void FileChoose_UpdateQuestMenu(GameState* thisx) {
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
static u8 linkName[] = { 0x15, 0x2C, 0x31, 0x2E, 0x3E, 0x3E, 0x3E, 0x3E };
FileChoose_UpdateStickDirectionPromptAnim(thisx);
FileChooseContext* this = (FileChooseContext*)thisx;
Input* input = &this->state.input[0];
@ -707,10 +709,10 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
this->kbdY = 0;
this->charIndex = 0;
this->charBgAlpha = 0;
this->newFileNameCharCount = 0;
this->newFileNameCharCount = CVarGetInteger("gLinkDefaultName", 0) ? 4 : 0;
this->nameEntryBoxPosX = 120;
this->nameEntryBoxAlpha = 0;
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName, &emptyName, 8);
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName, CVarGetInteger("gLinkDefaultName", 0) ? &linkName : &emptyName, 8);
return;
}