Flags: Do not hardcode one Flag field per class#492
Merged
Ghabry merged 15 commits intoEasyRPG:masterfrom Mar 17, 2025
Merged
Conversation
This was hardcoded to one Flag per struct. The generator is now smarter and you can specify multiple flags which are resolved by their flag name.
…ify which enum names are considered to be "scoped" ('class' enums in C++)
… determine if an event has been created by EasyRPGs new "CloneMapEvent" command
ghost
approved these changes
Mar 1, 2025
Member
Author
|
@florianessl this should be okay now? |
florianessl
approved these changes
Mar 8, 2025
florianessl
reviewed
Mar 8, 2025
…preter related SaveState structures (SaveEventExecState, SaveEventExecFrame & SaveMapEventBase) Co-Authored-By: florianessl <github@iessl.at>
florianessl
reviewed
Mar 8, 2025
Member
Author
|
This wasn't an old bug but just something I missed when refactoring: The code was only executed when the flag field had the name STRUCT_FLAGS. |
…than the struct oversight from the refactor Thanks @florianessl
ghost
approved these changes
Mar 12, 2025
Member
Use only "Flags" when struct = flagname as we originally did.
Member
Author
|
Fixed. Actually we do not guarantee a stable structure for the XML file across versions. But I have to admit that this looks really ugly with the |
ghost
approved these changes
Mar 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is an alternative approach for #491
Instead of a single variable it uses our Flag feature to provide bool variables. This reduces the need for bitmasking.
Problem was that our code always hardcoded
StructName_Flagsfor Flags. This restriction is now lifted and multiple Structs can have the same flags and a struct can have multiple flags.Don't merge, Player build failure because classes are renamed