Skip to content
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

Restructure event flags in z64save.h (2/?): Carpenters #2385

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

mzxrules
Copy link
Contributor

Contributions made in this pr are licensed under CC0

Continuation of #2303

#define GET_EVENTCHKINF_CARPENTERS_FREE_ALL() \
CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_FREE], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
// Carpenters rescued from Gerudo Fortress
#define EVENTCHKINF_INDEX_CARPENTERS_RESCUED EVENTCHKINF_INDEX(EVENTCHKINF_CARPENTER_0_RESCUED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why you did it this way, but it feels weird that only EVENTCHKINF_CARPENTER_0_RESCUED is used here and not the other carpenter flag IDs. Maybe it would be better to hardcode 0x9 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer hardcoding all of the index values

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, why did you decide not to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I've been indecisive on which way to go. From now on it'll be consistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be consistent with not hardcoding the values?

s32 EnGe1_CheckCarpentersFreed(void);
s32 EnGe1_CheckAllCarpentersRescued(void);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo dont even need "check" in this case, "if all carpenters resuced" reads nicely

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same would apply to ge2 if you do change it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, I think it's better as-is. AllCarpentersRescued in a vacuum reads more towards being the event of having rescued all carpenters.

@fig02
Copy link
Collaborator

fig02 commented Dec 26, 2024

even tho this has met merge requirements, there are a couple of comments. please comment and lmk if you plan to address them or not

@fig02 fig02 added the wait Wait to merge label Dec 27, 2024
@fig02 fig02 merged commit ba6a835 into zeldaret:main Dec 27, 2024
1 check passed
@mzxrules mzxrules deleted the carpenters_flags branch December 28, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants