Adds in-game menu for selecting a dungeon quest/randomizer (#1863)

* Adds most visuals and interactions for quest select menu.

* "Scrolling" menu, adds remaining sub/title textures, language support

* Tweak: ENG, FRA, GER title to match the original style

* ADD: Randomizer tex

* TWEAK: Randomizer ZAPD extension format

* Adds control stick prompts to the "scrolling" menu.

* Adds third entry for Randomizer.

* Bold text on randomizer subtitle.

* Ensures the game won't allow selecting an unsupported quest.

* Makes save files be created from the quest menu selection.

* Removes the master quest and randomizer checkboxes (no longer needed).

* Removes lock on MQ-only rando.

* Skips quest select if only one quest is playable.

* Adds ability to back out of quest select menu

* Show seed icons while Randomizer is selected on Quest Select Menu.

* Fixes custom hud colors and d-pad navigation.

* Implements backing up from name entry to quest select.

Also implements backwards rotations on the file select screen.

Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
This commit is contained in:
Christopher Leggett 2022-11-02 11:50:47 -04:00 committed by GitHub
commit fd8a2c9483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 787 additions and 300 deletions

View file

@ -297,7 +297,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
}
if (CVar_GetS32("gRandomizer", 0) && strnlen(CVar_GetString("gSpoilerLog", ""), 1) != 0 &&
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVar_GetString("gSpoilerLog", ""), 1) != 0 &&
!((Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasMasterQuest()) ||
(Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasOriginal()))) {
// Set N64DD Flags for save file

View file

@ -14,23 +14,6 @@ typedef void (*EnOssanInitFunc)(struct EnOssan*, GlobalContext*);
typedef s16 (*EnOssanGetGirlAParamsFunc)(s16);
typedef void (*EnOssanStateFunc)(struct EnOssan*, GlobalContext*, Player*);
typedef struct {
/* 0x00 */ u32 stickColorR;
/* 0x04 */ u32 stickColorG;
/* 0x08 */ u32 stickColorB;
/* 0x0C */ u32 stickColorA;
/* 0x10 */ f32 stickTexX;
/* 0x14 */ f32 stickTexY;
/* 0x18 */ u32 arrowColorR;
/* 0x1C */ u32 arrowColorG;
/* 0x20 */ u32 arrowColorB;
/* 0x24 */ u32 arrowColorA;
/* 0x28 */ f32 arrowTexX;
/* 0x2C */ f32 arrowTexY;
/* 0x30 */ f32 z;
/* 0x34 */ s32 isEnabled;
} StickDirectionPrompt; // size = 0x38
#define ColChanMix(c1, c2, m) (c1 - (s32)(c2 * m)) & 0xFF
typedef struct EnOssan {

View file

@ -55,7 +55,12 @@ typedef enum {
/* 37 */ CM_OPTIONS_MENU,
/* 38 */ CM_START_OPTIONS,
/* 39 */ CM_OPTIONS_TO_MAIN,
/* 40 */ CM_UNUSED_DELAY
/* 40 */ CM_UNUSED_DELAY,
CM_ROTATE_TO_QUEST_MENU,
CM_QUEST_MENU,
CM_START_QUEST_MENU,
CM_QUEST_TO_MAIN,
CM_NAME_ENTRY_TO_QUEST_MENU,
} ConfigMode;
typedef enum {

File diff suppressed because it is too large Load diff

View file

@ -390,7 +390,12 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
if (this->newFileNameCharCount < 0) {
this->newFileNameCharCount = 0;
this->configMode = CM_NAME_ENTRY_TO_MAIN;
if (this->prevConfigMode == CM_QUEST_MENU) {
this->configMode = CM_NAME_ENTRY_TO_QUEST_MENU;
} else {
this->configMode = CM_NAME_ENTRY_TO_MAIN;
}
this->prevConfigMode = CM_NAME_ENTRY;
CVar_SetS32("gOnFileSelectNameEntry", 0);
} else {
for (i = this->newFileNameCharCount; i < 7; i++) {
@ -464,6 +469,7 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
dayTime = ((void)0, gSaveContext.dayTime);
Sram_InitSave(this);
gSaveContext.dayTime = dayTime;
this->prevConfigMode = CM_MAIN_MENU;
this->configMode = CM_NAME_ENTRY_TO_MAIN;
CVar_SetS32("gOnFileSelectNameEntry", 0);
CVar_SetS32("gNewFileDropped", 0);
@ -687,6 +693,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
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);
this->prevConfigMode = this->configMode;
this->configMode = CM_OPTIONS_TO_MAIN;
osSyncPrintf("");
Save_SaveGlobal();