-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quest Cleanup #3178
Quest Cleanup #3178
Conversation
Also restore authentic n64ddFlag behavior except savefile saving/loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bravo. My main points of initial feedback would be:
Why a macro function instead of just assuming gSaveContext is available? Eg IS_RANDO vs IS_RANDO(gSaveContext)
Even though they won’t be used much, you should use macros for the quest IDs
I did it because some places like
I didn't do that because the enum is in |
That's fair, though how often do those special cases show up compared to not? Could we just do an inline comparison to the enum for the save manager case?
I'd say just move the enum, no particular reason it needs to stay there right? |
Moved it. |
They're rare so I could just change it to assume |
Done, the macros no longer take |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work again. Dropping an approval but I did have one question around the save manager stuff someone might be able to pipe in on.
@@ -1651,7 +1675,11 @@ void SaveManager::LoadBaseVersion4() { | |||
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) { | |||
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]); | |||
}); | |||
SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest); | |||
int isMQ = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't recall how we were supposed to treat changes like this, is it the correct behavior to make this change in LoadV1, LoadV2, LoadV3, and LoadV4? I think so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so as if this change wasn't made, older save files would not migrate their rando/master quest status correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure that's correct. I think we discussed having it be chained loading so loading V1 would mean V1 -> V2, V2 -> V3, V3 -> V4 but decided against it. Instead we have "this is how you load this old version of a save into the current save format"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I feel like maybe the chain load would have been better in the end, but the only other option would be to make a new loader version and settings migrator, which would be overkill for a single thing like this. I'm OK with this method of handling it.
This PR replaces
isMasterQuest
,n64ddFlag
&isBossRush
checks with a new field (questId
) and macros.It also restores authentic
n64ddFlag
behaviour.It doesn't change savefiles on disk which still use
isMasterQuest
&n64ddFlag
because I don't think breaking save compatibility for something minor like this is worth it and it could be grouped with future changes to the save format.Build Artifacts