-
Notifications
You must be signed in to change notification settings - Fork 52
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
Create enum for g_CastleFlags #1624
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.
This seems good to me, in my opinion some of the names are too abbreviated like HG_CS_DONE
and SG_RETR_ENTR
. I would not be able to guess what these mean even knowing the game is SOTN
Ok, I think let's get Xeeynamo's feedback on this one before merging |
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 the naming scheme I would have chosen either. But I would have chosen something that wouldn't have appealed you either. Naming for this one is too much of an opinionated topic and we would not end to get this merged for a while. We can have these renamed any time in the future anyway. I like the value this PR brings regardless and I am happy to merge this as it is!
Does this refer to Sozud or me? I don't have any strong feelings about any particular naming, I just put these in as a starting point. If there are any other preferred names (even if they're longer) I'd be happy to swap them out. For me personally this isn't an opinionated topic. Sozud made a good point about the names being over-abbreviated but I'm not sure what the less-abreviated forms should be. We can agree that full descriptions featuring prepositions and conjunctions ( |
I went through every use of g_CastleFlags and created enum members for the different flags. This will allow us to better keep track of what flags exist and how they are used. This will also aid in tracking the arrangement of the overlays in the flags, as there seems to be some level of organization. As we add more gameplay overlays we can hopefully learn how these all work together.
Some functions were using local
const int
declarations to give names to flags. For example, there wasconst int jewelSwordRoomUnlock = 51;
. For these ones, which had flag purposes identified in code, I went ahead and gave their global castle flag a similar name (in this case,JEWEL_SWORD_ROOM
). For all other flags, I kept the name as a placeholder ofCASTLE_FLAG_###
; later someone else can identify what the individual flags are.This should be a good step in making the castle flags more understandable, as well as to connect the different functions across the game and properly see which ones are touching the same flags. When a castle flag is written as 0x32 in some places, and 50 in others, it makes it harder to search. Now that we can use CASTLE_FLAG_50, hopefully we will have better understanding of all the uses of the flag.