-
Notifications
You must be signed in to change notification settings - Fork 596
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
Name numerous event info flags #2299
base: main
Are you sure you want to change the base?
Conversation
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 concerned that SoH's version of these flags may be modified to match their own code modifications.
#define EVENTCHKINF_1B 0x1B | ||
#define EVENTCHKINF_1C 0x1C | ||
#define EVENTCHKINF_1D 0x1D | ||
#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD 0x19 |
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.
Is EVENTCHKINF_OBTAINED_KOKIRI_EMERALD
even a real flag?
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.
This and the other flag were pulled in from SoH. Not that they see much real use, but they're there.
I'll revert this one only because of skepticism considering there's another flag for this, and this flag is never used.
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.
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.
If they do exist, where are they referenced? Currently no define exists for them because it is never referenced in code, unless I am missing something.
If it doesnt ever get used in code, how can we know what its name should be?
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 confirm that it isn't a real flag, it isn't even referenced anywhere in SoH either.
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.
Thanks.
This goes back to my comment in my previous review, it would be helpful if each flag is carefully examined for accuracy, instead of just blindly copying from SOH.
#define EVENTCHKINF_LEARNED_SERENADE_OF_WATER 0x52 | ||
#define EVENTCHKINF_LEARNED_NOCTURNE_OF_SHADOW 0x54 | ||
#define EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT 0x55 | ||
#define EVENTCHKINF_LEARNED_SARIAS_SONG 0x57 |
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.
Is EVENTCHKINF_LEARNED_SARIAS_SONG
a real flag?
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.
It is not.
#define EVENTCHKINF_SKULLTULA_REWARD_10_SHIFT 10 | ||
#define EVENTCHKINF_SKULLTULA_REWARD_20_SHIFT 11 | ||
#define EVENTCHKINF_SKULLTULA_REWARD_30_SHIFT 12 | ||
#define EVENTCHKINF_SKULLTULA_REWARD_40_SHIFT 13 | ||
#define EVENTCHKINF_SKULLTULA_REWARD_50_SHIFT 14 |
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 don't like having defines for these
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.
Is this a deal-breaker? There are plenty of other shift defines elsewhere in this section.
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.
Yep, and I don't particularly like it's usage those cases either.
I feel there's no reason to create defines for these because the values are only ever relevant to exactly one section of code (this file). It just makes the code harder to follow logically for 0 gain.
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 it can make understanding the code easier (a comment would also work).
#define EVENTCHKINF_COMPLAINED_ABOUT_MIDO 0x03 | ||
#define EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD 0x04 | ||
#define EVENTCHKINF_DEKU_TREE_OPENED_MOUTH 0x05 | ||
#define EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD 0x07 |
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 find this particular name odd. I'm not sure it should necessarily be associated with obtaining the Kokiri Emerald.
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.
It is set when you're given the kokiri emerald and the deku tree dies but it's only referenced by deku tree related stuff so I agree, I think naming it something like EVENTCHKINF_DEKU_TREE_DEAD
or EVENTCHKINF_COMPLETED_DEKU_TREE
would be better.
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.
In the same vein as the above, it would be good if we can verify all of the names are accurate to the code that they correspond to. For example:
#define EVENTCHKINF_DISPELLED_GANONS_TOWER_BARRIER 0xC3 | ||
#define EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS 0xC4 | ||
#define EVENTCHKINF_SHEIK_SPAWNED_AT_MASTER_SWORD_PEDESTAL 0xC5 |
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.
EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS
The cutscene starting only checks for Spirit and Shadow medallions. Even though it can be considered a check for all medallions, assuming no glitches/sequence breaks, it would still be good to keep this accurate.
It can probably be named after starting the Light Arrow Cutscene, which is what the relevant code is doing anyway
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.
as an addendum:
// z_demo.c:2415
LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_C4) &&
(gEntranceTable[((void)0, gSaveContext.save.entranceIndex)].sceneId == SCENE_TEMPLE_OF_TIME)) {
Flags_SetEventChkInf(EVENTCHKINF_C4);
looks like "if haven't seen this cutscene, mark it and never show again"
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.
Probably something along the lines of EVENTCHKINF_STARTED_LIGHT_ARROW_CUTSCENE
would be better.
I think it may be helpful for you and for reviewers if this was split into smaller batches. This way you can check accuracy as you port each flag name over in smaller amounts, and the review process can be easier on people trying to verify your requested changes. |
A lot of event info flag names copied over from SoH.