Quest Cleanup (#3178)

* Change most n64ddFlag checks to IS_RANDO checks

* Change most isMasterQuest checks to IS_MASTER_QUEST checks

* Change most isBossRush checks to IS_BOSS_RUSH checks

* Replace isMasterQuest & isBossRush with questId

* Replace n64ddFlag with questId

Also restore authentic n64ddFlag behavior except savefile saving/loading

* Move quest enum from file_choose.h to z64save.h

* Update macros to not take gSaveContext
This commit is contained in:
Pepe20129 2023-09-26 16:20:33 +02:00 committed by GitHub
commit d63c9d1774
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
133 changed files with 677 additions and 628 deletions

View file

@ -284,8 +284,7 @@ typedef struct {
/* 0x1428 */ u16 pendingSaleMod;
// #region SOH [General]
// Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
/* */ uint32_t isMasterQuest;
/* */ uint32_t isBossRush;
/* */ uint8_t questId;
/* */ uint32_t isBossRushPaused;
/* */ uint8_t bossRushOptions[BOSSRUSH_OPTIONS_AMOUNT];
/* */ u8 mqDungeonCount;
@ -328,6 +327,18 @@ typedef struct {
// #endregion
} SaveContext; // size = 0x1428
typedef enum {
/* 00 */ QUEST_NORMAL,
/* 01 */ QUEST_MASTER,
/* 02 */ QUEST_RANDOMIZER,
/* 03 */ QUEST_BOSSRUSH,
} Quest;
#define IS_VANILLA (gSaveContext.questId == QUEST_NORMAL)
#define IS_MASTER_QUEST (gSaveContext.questId == QUEST_MASTER)
#define IS_RANDO (gSaveContext.questId == QUEST_RANDOMIZER)
#define IS_BOSS_RUSH (gSaveContext.questId == QUEST_BOSSRUSH)
typedef enum {
/* 0x00 */ BTN_ENABLED,
/* 0xFF */ BTN_DISABLED = 0xFF