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:
@@ -155,7 +155,7 @@ void Sram_OpenSave() {
|
||||
}
|
||||
|
||||
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
|
||||
if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !IS_RANDO) {
|
||||
i = gSaveContext.eventChkInf[4] & ~1;
|
||||
gSaveContext.eventChkInf[4] = i;
|
||||
|
||||
@@ -176,7 +176,7 @@ void Sram_OpenSave() {
|
||||
gSaveContext.equips.equipment |= 2;
|
||||
}
|
||||
|
||||
if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
|
||||
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
|
||||
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
|
||||
@@ -218,11 +218,10 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
||||
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
|
||||
}
|
||||
|
||||
gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag;
|
||||
|
||||
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
|
||||
// Set N64DD Flags for save file
|
||||
fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1;
|
||||
fileChooseCtx->n64ddFlag = 1;
|
||||
gSaveContext.n64ddFlag = 1;
|
||||
gSaveContext.questId = 2;
|
||||
|
||||
Randomizer_InitSaveFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user