|
|
|
|
@@ -17,6 +17,7 @@
|
|
|
|
|
#include "soh_assets.h"
|
|
|
|
|
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
|
|
|
|
#include "soh/Enhancements/boss-rush/BossRush.h"
|
|
|
|
|
#include "soh/Enhancements/FileSelectEnhancements.h"
|
|
|
|
|
#include "soh/Enhancements/custom-message/CustomMessageTypes.h"
|
|
|
|
|
#include "soh/Enhancements/enhancementTypes.h"
|
|
|
|
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
|
|
|
|
@@ -984,17 +985,13 @@ void DrawSeedHashSprites(FileChooseContext* this) {
|
|
|
|
|
// 1. On Name Entry if a rando seed has been generated
|
|
|
|
|
// 2. On Quest Menu if a spoiler has been dropped and the Randomizer quest option is currently hovered.
|
|
|
|
|
if ((Randomizer_IsSeedGenerated() || Randomizer_IsSpoilerLoaded()) &&
|
|
|
|
|
((this->configMode == CM_NAME_ENTRY && gSaveContext.questId == QUEST_RANDOMIZER) ||
|
|
|
|
|
(this->configMode == CM_GENERATE_SEED && Randomizer_IsSpoilerLoaded()) ||
|
|
|
|
|
(this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == QUEST_RANDOMIZER))) {
|
|
|
|
|
// Fade top seed icons based on main menu fade and if save supports rando
|
|
|
|
|
u8 alpha =
|
|
|
|
|
MAX(this->optionButtonAlpha, Save_GetSaveMetaInfo(this->selectedFileIndex)->randoSave == 1 ? 0xFF : 0);
|
|
|
|
|
if (alpha >= 200) {
|
|
|
|
|
alpha = 0xFF;
|
|
|
|
|
}
|
|
|
|
|
(((this->configMode == CM_NAME_ENTRY || this->configMode == CM_ROTATE_TO_NAME_ENTRY ||
|
|
|
|
|
this->configMode == CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU || this->configMode == CM_START_NAME_ENTRY ||
|
|
|
|
|
this->configMode == CM_START_RANDOMIZER_SETTINGS_MENU) ||
|
|
|
|
|
this->configMode == CM_RANDOMIZER_SETTINGS_MENU) &&
|
|
|
|
|
gSaveContext.questId == QUEST_RANDOMIZER)) {
|
|
|
|
|
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, alpha);
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF);
|
|
|
|
|
u16 xStart = 64;
|
|
|
|
|
for (unsigned int i = 0; i < 5; i++) {
|
|
|
|
|
SpriteLoad(this, GetSeedTexture(GetSeedIconIndex(i)));
|
|
|
|
|
@@ -1243,12 +1240,25 @@ void FileChoose_StartBossRushMenu(GameState* thisx) {
|
|
|
|
|
this->bossRushUIAlpha = 0;
|
|
|
|
|
this->bossRushArrowOffset = 0;
|
|
|
|
|
|
|
|
|
|
if (this->logoAlpha >= 0) {
|
|
|
|
|
if (this->logoAlpha <= 0) {
|
|
|
|
|
this->logoAlpha = 0;
|
|
|
|
|
this->configMode = CM_BOSS_RUSH_MENU;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FileChoose_StartRandomizerMenu(GameState* thisx) {
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
|
|
|
|
|
this->logoAlpha -= 25;
|
|
|
|
|
this->randomizerUIAlpha = 0;
|
|
|
|
|
this->randomizerArrowOffset = 0;
|
|
|
|
|
|
|
|
|
|
if (this->logoAlpha <= 0) {
|
|
|
|
|
this->logoAlpha = 0;
|
|
|
|
|
this->configMode = CM_RANDOMIZER_SETTINGS_MENU;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 };
|
|
|
|
|
@@ -1287,14 +1297,6 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
|
|
|
|
|
GameInteractor_ExecuteOnUpdateFileQuestSelection(this->questType[this->buttonIndex]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CHECK_BTN_ALL(input->press.button, BTN_L)) {
|
|
|
|
|
if (this->questType[this->buttonIndex] == QUEST_RANDOMIZER) {
|
|
|
|
|
Randomizer_SetSpoilerLoaded(false);
|
|
|
|
|
this->prevConfigMode = this->configMode;
|
|
|
|
|
this->configMode = CM_GENERATE_SEED;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
|
|
|
|
gSaveContext.questId = this->questType[this->buttonIndex];
|
|
|
|
|
|
|
|
|
|
@@ -1306,14 +1308,13 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
|
|
|
|
|
} else if (this->questType[this->buttonIndex] == QUEST_RANDOMIZER) {
|
|
|
|
|
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
|
|
|
|
this->prevConfigMode = this->configMode;
|
|
|
|
|
this->configMode = CM_GENERATE_SEED;
|
|
|
|
|
this->configMode = CM_ROTATE_TO_RANDOMIZER_SETTINGS_MENU;
|
|
|
|
|
} else {
|
|
|
|
|
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
|
|
|
|
osSyncPrintf("Selected Dungeon Quest: %d\n", IS_MASTER_QUEST);
|
|
|
|
|
this->prevConfigMode = this->configMode;
|
|
|
|
|
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
|
|
|
|
|
this->logoAlpha = 0;
|
|
|
|
|
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 1);
|
|
|
|
|
this->kbdButton = FS_KBD_BTN_NONE;
|
|
|
|
|
this->charPage = FS_CHAR_PAGE_ENG;
|
|
|
|
|
this->kbdX = 0;
|
|
|
|
|
@@ -1335,45 +1336,6 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FileChoose_GenerateRandoSeed(GameState* thisx) {
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
FileChoose_UpdateRandomizer();
|
|
|
|
|
if (Randomizer_IsSeedGenerated() || Randomizer_IsPlandoLoaded()) {
|
|
|
|
|
Audio_PlayFanfare(NA_BGM_HORSE_GOAL);
|
|
|
|
|
func_800F5E18(SEQ_PLAYER_BGM_MAIN, NA_BGM_FILE_SELECT, 0, 7, 1);
|
|
|
|
|
generating = 0;
|
|
|
|
|
retries = 0;
|
|
|
|
|
Randomizer_SetSpoilerLoaded(true);
|
|
|
|
|
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
|
|
|
|
|
static u8 linkName[] = { 0x15, 0x2C, 0x31, 0x2E, 0x3E, 0x3E, 0x3E, 0x3E };
|
|
|
|
|
this->prevConfigMode = this->configMode;
|
|
|
|
|
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
|
|
|
|
|
this->logoAlpha = 0;
|
|
|
|
|
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 1);
|
|
|
|
|
this->kbdButton = FS_KBD_BTN_NONE;
|
|
|
|
|
this->charPage = FS_CHAR_PAGE_ENG;
|
|
|
|
|
this->kbdX = 0;
|
|
|
|
|
this->kbdY = 0;
|
|
|
|
|
this->charIndex = 0;
|
|
|
|
|
this->charBgAlpha = 0;
|
|
|
|
|
this->newFileNameCharCount = CVarGetInteger(CVAR_ENHANCEMENT("LinkDefaultName"), 0) ? 4 : 0;
|
|
|
|
|
this->nameEntryBoxPosX = 120;
|
|
|
|
|
this->nameEntryBoxAlpha = 0;
|
|
|
|
|
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName,
|
|
|
|
|
CVarGetInteger(CVAR_ENHANCEMENT("LinkDefaultName"), 0) ? &linkName : &emptyName, 8);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!generating) {
|
|
|
|
|
if (retries >= 5 || (retries >= 1 && Randomizer_IsSpoilerLoaded())){
|
|
|
|
|
this->configMode = CM_QUEST_MENU;
|
|
|
|
|
retries = 0;
|
|
|
|
|
} else {
|
|
|
|
|
Randomizer_GenerateSeed();
|
|
|
|
|
retries++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static s8 sLastBossRushOptionIndex = -1;
|
|
|
|
|
static s8 sLastBossRushOptionValue = -1;
|
|
|
|
|
|
|
|
|
|
@@ -1471,6 +1433,84 @@ void FileChoose_UpdateBossRushMenu(GameState* thisx) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FileChoose_UpdateRandomizerMenu(GameState* thisx) {
|
|
|
|
|
FileChoose_UpdateStickDirectionPromptAnim(thisx);
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
Input* input = &this->state.input[0];
|
|
|
|
|
bool dpad = CVarGetInteger(CVAR_SETTING("DpadInText"), 0);
|
|
|
|
|
|
|
|
|
|
FileChoose_UpdateRandomizer();
|
|
|
|
|
|
|
|
|
|
if (generating) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Fade in elements after opening Randomizer options menu
|
|
|
|
|
this->randomizerUIAlpha += 25;
|
|
|
|
|
if (this->randomizerUIAlpha > 255) {
|
|
|
|
|
this->randomizerUIAlpha = 255;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Move menu selection up or down.
|
|
|
|
|
if (ABS(this->stickRelY) > 30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
|
|
|
|
|
// Move down
|
|
|
|
|
if (this->stickRelY < -30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN))) {
|
|
|
|
|
// When selecting past the last option, cycle back to the first option.
|
|
|
|
|
if ((this->randomizerIndex + 1) > RSM_OPEN_RANDOMIZER_SETTINGS) {
|
|
|
|
|
this->randomizerIndex = RSM_START_RANDOMIZER;
|
|
|
|
|
} else {
|
|
|
|
|
this->randomizerIndex++;
|
|
|
|
|
}
|
|
|
|
|
} else if (this->stickRelY > 30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DUP))) {
|
|
|
|
|
// When selecting past the first option, cycle back to the last option and offset the list to view it properly.
|
|
|
|
|
if ((this->randomizerIndex - 1) < RSM_START_RANDOMIZER) {
|
|
|
|
|
this->randomizerIndex = RSM_OPEN_RANDOMIZER_SETTINGS;
|
|
|
|
|
} else {
|
|
|
|
|
this->randomizerIndex--;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
|
|
|
|
this->configMode = CM_RANDOMIZER_SETTINGS_MENU_TO_QUEST;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
|
|
|
|
if (this->randomizerIndex == RSM_START_RANDOMIZER) {
|
|
|
|
|
if (Randomizer_IsSeedGenerated() || Randomizer_IsSpoilerLoaded()) {
|
|
|
|
|
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
|
|
|
|
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
|
|
|
|
|
static u8 linkName[] = { 0x15, 0x2C, 0x31, 0x2E, 0x3E, 0x3E, 0x3E, 0x3E };
|
|
|
|
|
this->prevConfigMode = this->configMode;
|
|
|
|
|
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
|
|
|
|
|
this->logoAlpha = 0;
|
|
|
|
|
CVarSetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 1);
|
|
|
|
|
this->kbdButton = FS_KBD_BTN_NONE;
|
|
|
|
|
this->charPage = FS_CHAR_PAGE_ENG;
|
|
|
|
|
this->kbdX = 0;
|
|
|
|
|
this->kbdY = 0;
|
|
|
|
|
this->charIndex = 0;
|
|
|
|
|
this->charBgAlpha = 0;
|
|
|
|
|
this->newFileNameCharCount = CVarGetInteger(CVAR_ENHANCEMENT("LinkDefaultName"), 0) ? 4 : 0;
|
|
|
|
|
this->nameEntryBoxPosX = 120;
|
|
|
|
|
this->nameEntryBoxAlpha = 0;
|
|
|
|
|
memcpy(Save_GetSaveMetaInfo(this->buttonIndex)->playerName,
|
|
|
|
|
CVarGetInteger(CVAR_ENHANCEMENT("LinkDefaultName"), 0) ? &linkName : &emptyName, 8);
|
|
|
|
|
} else {
|
|
|
|
|
Sfx_PlaySfxCentered(NA_SE_SY_OCARINA_ERROR);
|
|
|
|
|
}
|
|
|
|
|
} else if (this->randomizerIndex == RSM_GENERATE_RANDOMIZER) {
|
|
|
|
|
Randomizer_GenerateRandomizer();
|
|
|
|
|
} else if (this->randomizerIndex == RSM_OPEN_RANDOMIZER_SETTINGS) {
|
|
|
|
|
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
|
|
|
|
Randomizer_ShowRandomizerMenu();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update function for `CM_UNUSED_31`
|
|
|
|
|
*/
|
|
|
|
|
@@ -1503,9 +1543,16 @@ void FileChoose_RotateToNameEntry(GameState* thisx) {
|
|
|
|
|
|
|
|
|
|
this->windowRot += VREG(16);
|
|
|
|
|
|
|
|
|
|
if (this->windowRot >= 628.0f) {
|
|
|
|
|
this->windowRot = 628.0f;
|
|
|
|
|
this->configMode = CM_START_NAME_ENTRY;
|
|
|
|
|
if (this->prevConfigMode == CM_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
if (this->windowRot >= 942.0f) {
|
|
|
|
|
this->windowRot = 628.0f;
|
|
|
|
|
this->configMode = CM_START_NAME_ENTRY;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this->windowRot >= 628.0f) {
|
|
|
|
|
this->windowRot = 628.0f;
|
|
|
|
|
this->configMode = CM_START_NAME_ENTRY;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1552,7 +1599,8 @@ void FileChoose_RotateToMain(GameState* thisx) {
|
|
|
|
|
void FileChoose_RotateToQuest(GameState* thisx) {
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
|
|
|
|
|
if (this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU || this->configMode == CM_BOSS_RUSH_TO_QUEST) {
|
|
|
|
|
if (this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU || this->configMode == CM_BOSS_RUSH_TO_QUEST ||
|
|
|
|
|
this->configMode == CM_RANDOMIZER_SETTINGS_MENU_TO_QUEST) {
|
|
|
|
|
this->windowRot -= VREG(16);
|
|
|
|
|
|
|
|
|
|
if (this->windowRot <= 314.0f) {
|
|
|
|
|
@@ -1580,6 +1628,26 @@ void FileChoose_RotateToBossRush(GameState* thisx) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FileChoose_RotateToRandomizer(GameState* thisx) {
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
|
|
|
|
|
if (this->configMode == CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
this->windowRot -= VREG(16);
|
|
|
|
|
|
|
|
|
|
if (this->windowRot <= 314.0f) {
|
|
|
|
|
this->windowRot = 628.0f;
|
|
|
|
|
this->configMode = CM_START_RANDOMIZER_SETTINGS_MENU;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this->windowRot += VREG(16);
|
|
|
|
|
|
|
|
|
|
if (this->windowRot >= 628.0f) {
|
|
|
|
|
this->windowRot = 628.0f;
|
|
|
|
|
this->configMode = CM_START_RANDOMIZER_SETTINGS_MENU;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void (*gConfigModeUpdateFuncs[])(GameState*) = {
|
|
|
|
|
FileChoose_StartFadeIn, FileChoose_FinishFadeIn,
|
|
|
|
|
FileChoose_UpdateMainMenu, FileChoose_SetupCopySource,
|
|
|
|
|
@@ -1606,7 +1674,9 @@ static void (*gConfigModeUpdateFuncs[])(GameState*) = {
|
|
|
|
|
FileChoose_RotateToMain, FileChoose_RotateToQuest,
|
|
|
|
|
FileChoose_RotateToBossRush, FileChoose_UpdateBossRushMenu,
|
|
|
|
|
FileChoose_StartBossRushMenu, FileChoose_RotateToQuest,
|
|
|
|
|
FileChoose_GenerateRandoSeed,
|
|
|
|
|
FileChoose_RotateToRandomizer, FileChoose_UpdateRandomizerMenu,
|
|
|
|
|
FileChoose_StartRandomizerMenu,FileChoose_RotateToQuest,
|
|
|
|
|
FileChoose_RotateToRandomizer
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -2173,7 +2243,7 @@ const char* FileChoose_GetQuestChooseTitleTexName(Language lang) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char* FileChoose_GetBossRushOptionsTitleTexName(Language lang) {
|
|
|
|
|
const char* FileChoose_GetSohOptionsTitleTexName(Language lang) {
|
|
|
|
|
switch (lang) {
|
|
|
|
|
case LANGUAGE_ENG:
|
|
|
|
|
default:
|
|
|
|
|
@@ -2199,20 +2269,24 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
|
|
|
|
s16 pad;
|
|
|
|
|
char* tex;
|
|
|
|
|
|
|
|
|
|
switch (this->configMode) {
|
|
|
|
|
switch (this->configMode) {
|
|
|
|
|
case CM_QUEST_MENU:
|
|
|
|
|
case CM_ROTATE_TO_NAME_ENTRY:
|
|
|
|
|
case CM_START_QUEST_MENU:
|
|
|
|
|
case CM_QUEST_TO_MAIN:
|
|
|
|
|
case CM_NAME_ENTRY_TO_QUEST_MENU:
|
|
|
|
|
case CM_ROTATE_TO_BOSS_RUSH_MENU:
|
|
|
|
|
case CM_GENERATE_SEED:
|
|
|
|
|
case CM_ROTATE_TO_RANDOMIZER_SETTINGS_MENU:
|
|
|
|
|
tex = FileChoose_GetQuestChooseTitleTexName(gSaveContext.language);
|
|
|
|
|
break;
|
|
|
|
|
case CM_BOSS_RUSH_MENU:
|
|
|
|
|
case CM_START_BOSS_RUSH_MENU:
|
|
|
|
|
case CM_BOSS_RUSH_TO_QUEST:
|
|
|
|
|
tex = FileChoose_GetBossRushOptionsTitleTexName(gSaveContext.language);
|
|
|
|
|
case CM_RANDOMIZER_SETTINGS_MENU:
|
|
|
|
|
case CM_START_RANDOMIZER_SETTINGS_MENU:
|
|
|
|
|
case CM_RANDOMIZER_SETTINGS_MENU_TO_QUEST:
|
|
|
|
|
case CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU:
|
|
|
|
|
tex = FileChoose_GetSohOptionsTitleTexName(gSaveContext.language);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
tex = sTitleLabels[gSaveContext.language][this->titleLabel];
|
|
|
|
|
@@ -2236,34 +2310,32 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
|
|
|
|
|
|
|
|
|
// draw next title label
|
|
|
|
|
if ((this->configMode == CM_QUEST_MENU) || (this->configMode == CM_START_QUEST_MENU) ||
|
|
|
|
|
this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU || this->configMode == CM_GENERATE_SEED) {
|
|
|
|
|
this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU || this->configMode == CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
// draw control stick prompts.
|
|
|
|
|
if (this->configMode != CM_GENERATE_SEED) {
|
|
|
|
|
Gfx_SetupDL_39Opa(this->state.gfxCtx);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, gArrowCursorTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 24, 0,
|
|
|
|
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, G_TX_NOMASK, G_TX_NOLOD,
|
|
|
|
|
G_TX_NOLOD);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickLeftPrompt.arrowColorR,
|
|
|
|
|
this->stickLeftPrompt.arrowColorG, this->stickLeftPrompt.arrowColorB,
|
|
|
|
|
this->stickLeftPrompt.arrowColorA, this->stickLeftPrompt.arrowTexX,
|
|
|
|
|
this->stickLeftPrompt.arrowTexY, this->stickLeftPrompt.z, 0, 0, -1.0f, 1.0f);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickRightPrompt.arrowColorR,
|
|
|
|
|
this->stickRightPrompt.arrowColorG, this->stickRightPrompt.arrowColorB,
|
|
|
|
|
this->stickRightPrompt.arrowColorA, this->stickRightPrompt.arrowTexX,
|
|
|
|
|
this->stickRightPrompt.arrowTexY, this->stickRightPrompt.z, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, gControlStickTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0,
|
|
|
|
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, G_TX_NOMASK, G_TX_NOLOD,
|
|
|
|
|
G_TX_NOLOD);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickLeftPrompt.stickColorR,
|
|
|
|
|
this->stickLeftPrompt.stickColorG, this->stickLeftPrompt.stickColorB,
|
|
|
|
|
this->stickLeftPrompt.stickColorA, this->stickLeftPrompt.stickTexX,
|
|
|
|
|
this->stickLeftPrompt.stickTexY, this->stickLeftPrompt.z, 0, 0, -1.0f, 1.0f);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickRightPrompt.stickColorR,
|
|
|
|
|
this->stickRightPrompt.stickColorG, this->stickRightPrompt.stickColorB,
|
|
|
|
|
this->stickRightPrompt.stickColorA, this->stickRightPrompt.stickTexX,
|
|
|
|
|
this->stickRightPrompt.stickTexY, this->stickRightPrompt.z, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
}
|
|
|
|
|
Gfx_SetupDL_39Opa(this->state.gfxCtx);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, gArrowCursorTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 24, 0,
|
|
|
|
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, G_TX_NOMASK, G_TX_NOLOD,
|
|
|
|
|
G_TX_NOLOD);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickLeftPrompt.arrowColorR,
|
|
|
|
|
this->stickLeftPrompt.arrowColorG, this->stickLeftPrompt.arrowColorB,
|
|
|
|
|
this->stickLeftPrompt.arrowColorA, this->stickLeftPrompt.arrowTexX,
|
|
|
|
|
this->stickLeftPrompt.arrowTexY, this->stickLeftPrompt.z, 0, 0, -1.0f, 1.0f);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickRightPrompt.arrowColorR,
|
|
|
|
|
this->stickRightPrompt.arrowColorG, this->stickRightPrompt.arrowColorB,
|
|
|
|
|
this->stickRightPrompt.arrowColorA, this->stickRightPrompt.arrowTexX,
|
|
|
|
|
this->stickRightPrompt.arrowTexY, this->stickRightPrompt.z, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, gControlStickTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0,
|
|
|
|
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, G_TX_NOMASK, G_TX_NOLOD,
|
|
|
|
|
G_TX_NOLOD);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickLeftPrompt.stickColorR,
|
|
|
|
|
this->stickLeftPrompt.stickColorG, this->stickLeftPrompt.stickColorB,
|
|
|
|
|
this->stickLeftPrompt.stickColorA, this->stickLeftPrompt.stickTexX,
|
|
|
|
|
this->stickLeftPrompt.stickTexY, this->stickLeftPrompt.z, 0, 0, -1.0f, 1.0f);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickRightPrompt.stickColorR,
|
|
|
|
|
this->stickRightPrompt.stickColorG, this->stickRightPrompt.stickColorB,
|
|
|
|
|
this->stickRightPrompt.stickColorA, this->stickRightPrompt.stickTexX,
|
|
|
|
|
this->stickRightPrompt.stickTexY, this->stickRightPrompt.z, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
switch (this->questType[this->buttonIndex]) {
|
|
|
|
|
case QUEST_NORMAL:
|
|
|
|
|
default:
|
|
|
|
|
@@ -2282,11 +2354,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case QUEST_RANDOMIZER:
|
|
|
|
|
if (this->configMode == CM_GENERATE_SEED) {
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha / 2);
|
|
|
|
|
} else {
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
|
|
|
|
|
}
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
|
|
|
|
|
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleTheLegendOfTextTex, 72, 8, 156, 108, 72, 8, 1024, 1024);
|
|
|
|
|
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleOcarinaOfTimeTMTextTex, 96, 8, 154, 163, 96, 8, 1024, 1024);
|
|
|
|
|
FileChoose_DrawImageRGBA32(this->state.gfxCtx, 160, 135, ResourceMgr_GameHasOriginal() ? gTitleZeldaShieldLogoTex : gTitleZeldaShieldLogoMQTex, 160, 160);
|
|
|
|
|
@@ -2360,9 +2428,57 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
|
|
|
|
(92 + textYOffset), 0.42f, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (this->configMode == CM_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
uint8_t textAlpha = this->randomizerUIAlpha;
|
|
|
|
|
|
|
|
|
|
for (uint8_t index = 0; index <= RSM_OPEN_RANDOMIZER_SETTINGS; index++) {
|
|
|
|
|
uint8_t textColorR = 255;
|
|
|
|
|
uint8_t textColorG = 255;
|
|
|
|
|
uint8_t textColorB = 255;
|
|
|
|
|
|
|
|
|
|
// If current index is the selected one, make the text yellow.
|
|
|
|
|
if (this->randomizerIndex == index) {
|
|
|
|
|
textColorB = 80;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If no randomizer is loaded and text is "start randomizer" or when a seed is generating, make all options gray.
|
|
|
|
|
if ((index == RSM_START_RANDOMIZER && !Randomizer_IsSeedGenerated() && !Randomizer_IsSpoilerLoaded()) || generating) {
|
|
|
|
|
textColorR = textColorG = textColorB = 100;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Interface_DrawTextLine(this->state.gfxCtx, SohFileSelect_GetSettingText(index, gSaveContext.language), 70,
|
|
|
|
|
(80 + (index * 16)), textColorR, textColorG, textColorB, textAlpha, 0.8f, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show text to indicate randomizer is being generated.
|
|
|
|
|
if (generating) {
|
|
|
|
|
Interface_DrawTextLine(this->state.gfxCtx,
|
|
|
|
|
SohFileSelect_GetSettingText(RSM_GENERATING, gSaveContext.language), 70,
|
|
|
|
|
(80 + 64), 255, 255, 255, textAlpha, 0.8f, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If no randomizer is generated and "start randomizer" is selected, show text to explain why user can't start the randomizer.
|
|
|
|
|
if (!Randomizer_IsSeedGenerated() && !Randomizer_IsSpoilerLoaded() && this->randomizerIndex == RSM_START_RANDOMIZER) {
|
|
|
|
|
Interface_DrawTextLine(this->state.gfxCtx,
|
|
|
|
|
SohFileSelect_GetSettingText(RSM_NO_RANDOMIZER_GENERATED, gSaveContext.language), 70,
|
|
|
|
|
(80 + 64),
|
|
|
|
|
240, 80, 80, textAlpha, 0.8f, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint16_t textOffset = 16 * this->randomizerIndex;
|
|
|
|
|
Gfx_SetupDL_39Opa(this->state.gfxCtx);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, gArrowCursorTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 24, 0,
|
|
|
|
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, G_TX_NOMASK, G_TX_NOLOD,
|
|
|
|
|
G_TX_NOLOD);
|
|
|
|
|
FileChoose_DrawTextRec(this->state.gfxCtx, this->stickRightPrompt.arrowColorR,
|
|
|
|
|
this->stickRightPrompt.arrowColorG, this->stickRightPrompt.arrowColorB, textAlpha,
|
|
|
|
|
62, (85 + textOffset), 0.42f, 0, 0, 1.0f, 1.0f);
|
|
|
|
|
|
|
|
|
|
} else if (this->configMode != CM_ROTATE_TO_NAME_ENTRY && this->configMode != CM_START_BOSS_RUSH_MENU &&
|
|
|
|
|
this->configMode != CM_ROTATE_TO_BOSS_RUSH_MENU && this->configMode != CM_BOSS_RUSH_TO_QUEST) {
|
|
|
|
|
this->configMode != CM_ROTATE_TO_BOSS_RUSH_MENU && this->configMode != CM_BOSS_RUSH_TO_QUEST &&
|
|
|
|
|
this->configMode != CM_START_RANDOMIZER_SETTINGS_MENU && this->configMode != CM_ROTATE_TO_RANDOMIZER_SETTINGS_MENU &&
|
|
|
|
|
this->configMode != CM_RANDOMIZER_SETTINGS_MENU_TO_QUEST && this->configMode != CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->titleAlpha[1]);
|
|
|
|
|
gDPLoadTextureBlock(POLY_OPA_DISP++, sTitleLabels[gSaveContext.language][this->nextTitleLabel], G_IM_FMT_IA,
|
|
|
|
|
@@ -2608,8 +2724,9 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
|
|
|
|
|
|
|
|
|
FrameInterpolation_RecordOpenChild(this, this->configMode);
|
|
|
|
|
|
|
|
|
|
if ((this->configMode != CM_NAME_ENTRY) && (this->configMode != CM_START_NAME_ENTRY) &&
|
|
|
|
|
(this->configMode != CM_QUEST_MENU) && this->configMode != CM_NAME_ENTRY_TO_QUEST_MENU) {
|
|
|
|
|
if (this->configMode != CM_NAME_ENTRY && this->configMode != CM_START_NAME_ENTRY &&
|
|
|
|
|
this->configMode != CM_QUEST_MENU && this->configMode != CM_NAME_ENTRY_TO_QUEST_MENU &&
|
|
|
|
|
this->configMode != CM_RANDOMIZER_SETTINGS_MENU && this->configMode != CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
|
|
|
|
@@ -2620,9 +2737,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
|
|
|
|
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
|
|
|
|
|
|
|
|
|
|
if (this->windowRot != 0) {
|
|
|
|
|
if (this->configMode == CM_ROTATE_TO_QUEST_MENU ||
|
|
|
|
|
(this->configMode >= CM_MAIN_TO_OPTIONS && this->configMode <= CM_OPTIONS_TO_MAIN) ||
|
|
|
|
|
this->configMode == CM_QUEST_TO_MAIN) {
|
|
|
|
|
if ((this->configMode >= CM_MAIN_TO_OPTIONS && this->configMode <= CM_OPTIONS_TO_MAIN) ||
|
|
|
|
|
this->configMode == CM_ROTATE_TO_QUEST_MENU || this->configMode == CM_QUEST_TO_MAIN) {
|
|
|
|
|
Matrix_RotateX(this->windowRot / 100.0f, MTXMODE_APPLY);
|
|
|
|
|
} else {
|
|
|
|
|
Matrix_RotateX((this->windowRot - 942.0f) / 100.0f, MTXMODE_APPLY);
|
|
|
|
|
@@ -2656,7 +2772,13 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
|
|
|
|
|
|
|
|
|
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
|
|
|
|
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
|
|
|
|
|
Matrix_RotateX((this->windowRot - 628.0f) / 100.0f, MTXMODE_APPLY);
|
|
|
|
|
// Invert name select when switching from randomizer settings menu to name entry, otherwise
|
|
|
|
|
// it'll show on the backside while rotating to the menu.
|
|
|
|
|
if (this->configMode == CM_ROTATE_TO_NAME_ENTRY && this->prevConfigMode == CM_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
Matrix_RotateX((this->windowRot - 314.0f) / 100.0f, MTXMODE_APPLY);
|
|
|
|
|
} else {
|
|
|
|
|
Matrix_RotateX((this->windowRot - 628.0f) / 100.0f, MTXMODE_APPLY);
|
|
|
|
|
}
|
|
|
|
|
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(this->state.gfxCtx),
|
|
|
|
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
|
|
|
|
|
|
|
|
|
@@ -2704,10 +2826,10 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// draw quest menu
|
|
|
|
|
if ((this->configMode == CM_QUEST_MENU) || (this->configMode == CM_ROTATE_TO_QUEST_MENU) ||
|
|
|
|
|
(this->configMode == CM_ROTATE_TO_NAME_ENTRY) || this->configMode == CM_QUEST_TO_MAIN ||
|
|
|
|
|
if (this->configMode == CM_QUEST_MENU || (this->configMode == CM_ROTATE_TO_QUEST_MENU) ||
|
|
|
|
|
this->configMode == CM_ROTATE_TO_NAME_ENTRY || this->configMode == CM_QUEST_TO_MAIN ||
|
|
|
|
|
this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU || this->configMode == CM_ROTATE_TO_BOSS_RUSH_MENU ||
|
|
|
|
|
this->configMode == CM_GENERATE_SEED) {
|
|
|
|
|
this->configMode == CM_ROTATE_TO_RANDOMIZER_SETTINGS_MENU || this->configMode == CM_NAME_ENTRY_TO_RANDOMIZER_SETTINGS_MENU) {
|
|
|
|
|
// window
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
@@ -2736,9 +2858,11 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
|
|
|
|
FileChoose_DrawWindowContents(&this->state);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Draw Boss Rush Options Menu
|
|
|
|
|
// Draw Boss Rush / Randomizer Options Menu
|
|
|
|
|
if (this->configMode == CM_BOSS_RUSH_MENU || this->configMode == CM_ROTATE_TO_BOSS_RUSH_MENU ||
|
|
|
|
|
this->configMode == CM_START_BOSS_RUSH_MENU || this->configMode == CM_BOSS_RUSH_TO_QUEST) {
|
|
|
|
|
this->configMode == CM_START_BOSS_RUSH_MENU || this->configMode == CM_BOSS_RUSH_TO_QUEST ||
|
|
|
|
|
this->configMode == CM_RANDOMIZER_SETTINGS_MENU || this->configMode == CM_ROTATE_TO_RANDOMIZER_SETTINGS_MENU ||
|
|
|
|
|
this->configMode == CM_START_RANDOMIZER_SETTINGS_MENU || this->configMode == CM_RANDOMIZER_SETTINGS_MENU_TO_QUEST) {
|
|
|
|
|
// window
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
|
|
|
|
@@ -3120,8 +3244,6 @@ void FileChoose_SelectModeDraw(GameState* thisx) {
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
FileChoose_SetView(this, 0.0f, 0.0f, 64.0f);
|
|
|
|
|
|
|
|
|
|
DrawSeedHashSprites(this);
|
|
|
|
|
|
|
|
|
|
CLOSE_DISPS(this->state.gfxCtx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3191,77 +3313,6 @@ void FileChoose_DrawRandoSaveVersionWarning(GameState* thisx) {
|
|
|
|
|
CLOSE_DISPS(this->state.gfxCtx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char* noRandoGeneratedText[] = {
|
|
|
|
|
// English
|
|
|
|
|
"No Randomizer seed currently available.\nGenerate one in the Randomizer Settings"
|
|
|
|
|
#if defined(__WIIU__) || defined(__SWITCH__)
|
|
|
|
|
".",
|
|
|
|
|
#else
|
|
|
|
|
",\nor drop a spoiler log on the game window.",
|
|
|
|
|
#endif
|
|
|
|
|
// German
|
|
|
|
|
"No Randomizer seed currently available.\nGenerate one in the Randomizer Settings"
|
|
|
|
|
#if defined(__WIIU__) || defined(__SWITCH__)
|
|
|
|
|
".",
|
|
|
|
|
#else
|
|
|
|
|
",\nor drop a spoiler log on the game window.",
|
|
|
|
|
#endif
|
|
|
|
|
// French
|
|
|
|
|
"Aucune Seed de Randomizer actuellement disponible.\nGénérez-en une dans les \"Randomizer Settings\""
|
|
|
|
|
#if (defined(__WIIU__) || defined(__SWITCH__))
|
|
|
|
|
"."
|
|
|
|
|
#else
|
|
|
|
|
"\nou glissez un spoilerlog sur la fenêtre du jeu."
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void FileChoose_DrawNoRandoGeneratedWarning(GameState* thisx) {
|
|
|
|
|
FileChooseContext* this = (FileChooseContext*)thisx;
|
|
|
|
|
|
|
|
|
|
OPEN_DISPS(this->state.gfxCtx);
|
|
|
|
|
|
|
|
|
|
// Draw rando seed warning when build version doesn't match for Major or Minor number
|
|
|
|
|
if (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == QUEST_RANDOMIZER && !(Randomizer_IsSeedGenerated() || Randomizer_IsSpoilerLoaded())) {
|
|
|
|
|
uint8_t textAlpha = 225;
|
|
|
|
|
uint8_t textboxAlpha = 170;
|
|
|
|
|
float textboxScale = 0.7f;
|
|
|
|
|
|
|
|
|
|
// float math to get a S5.10 number that will squish the texture
|
|
|
|
|
float texCoordinateHeightF = 512 / textboxScale;
|
|
|
|
|
uint16_t texCoordinateHeightScale = texCoordinateHeightF + 0.5f;
|
|
|
|
|
float texCoordinateWidthF = 512 / textboxScale;
|
|
|
|
|
uint16_t texCoordinateWidthScale = texCoordinateWidthF + 0.5f;
|
|
|
|
|
uint16_t textboxWidth = 256 * textboxScale;
|
|
|
|
|
uint16_t textboxHeight = 64 * textboxScale;
|
|
|
|
|
uint8_t leftOffset = 72;
|
|
|
|
|
uint8_t bottomOffset = 84;
|
|
|
|
|
uint8_t textVerticalOffset;
|
|
|
|
|
#if defined(__WIIU__) || defined(__SWITCH__)
|
|
|
|
|
textVerticalOffset = 127; // 2 lines
|
|
|
|
|
#else
|
|
|
|
|
textVerticalOffset = 122; // 3 lines
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
Gfx_SetupDL_39Opa(this->state.gfxCtx);
|
|
|
|
|
gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE);
|
|
|
|
|
gSPClearGeometryMode(POLY_OPA_DISP++, G_SHADE);
|
|
|
|
|
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0,
|
|
|
|
|
0, PRIMITIVE, 0);
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, textboxAlpha);
|
|
|
|
|
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, gDefaultMessageBackgroundTex, G_IM_FMT_I, 128, 64, 0, G_TX_MIRROR,
|
|
|
|
|
G_TX_MIRROR, 7, 0, G_TX_NOLOD, G_TX_NOLOD);
|
|
|
|
|
|
|
|
|
|
gSPTextureRectangle(POLY_OPA_DISP++, leftOffset << 2, (SCREEN_HEIGHT - bottomOffset - textboxHeight) << 2,
|
|
|
|
|
(textboxWidth + leftOffset) << 2, (SCREEN_HEIGHT - bottomOffset) << 2, G_TX_RENDERTILE, 0, 0,
|
|
|
|
|
texCoordinateWidthScale << 1, texCoordinateHeightScale << 1);
|
|
|
|
|
|
|
|
|
|
Interface_DrawTextLine(this->state.gfxCtx, noRandoGeneratedText[gSaveContext.language], 80, textVerticalOffset,
|
|
|
|
|
255, 255, 255, textAlpha, 0.6f, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CLOSE_DISPS(this->state.gfxCtx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FileChoose_Main(GameState* thisx) {
|
|
|
|
|
static void* controlsTextures[] = {
|
|
|
|
|
gFileSelControlsENGTex,
|
|
|
|
|
@@ -3456,8 +3507,6 @@ void FileChoose_Main(GameState* thisx) {
|
|
|
|
|
// Draw rando save version warning over the controls text, but before the screen fill fade out
|
|
|
|
|
FileChoose_DrawRandoSaveVersionWarning(&this->state);
|
|
|
|
|
|
|
|
|
|
FileChoose_DrawNoRandoGeneratedWarning(&this->state);
|
|
|
|
|
|
|
|
|
|
gDPPipeSync(POLY_OPA_DISP++);
|
|
|
|
|
gSPDisplayList(POLY_OPA_DISP++, sScreenFillSetupDL);
|
|
|
|
|
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, sScreenFillAlpha);
|
|
|
|
|
@@ -3629,6 +3678,7 @@ void FileChoose_InitContext(GameState* thisx) {
|
|
|
|
|
|
|
|
|
|
this->bossRushIndex = 0;
|
|
|
|
|
this->bossRushOffset = 0;
|
|
|
|
|
this->randomizerIndex = 0;
|
|
|
|
|
|
|
|
|
|
ShrinkWindow_SetVal(0);
|
|
|
|
|
|
|
|
|
|
|