Skip to content

Conversation

@Ghabry
Copy link
Member

@Ghabry Ghabry commented Feb 12, 2025

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_Flags for 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

Ghabry and others added 6 commits February 12, 2025 12:41
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
@Ghabry Ghabry marked this pull request as draft March 5, 2025 16:10
@Ghabry
Copy link
Member Author

Ghabry commented Mar 8, 2025

@florianessl this should be okay now?

Ghabry and others added 2 commits March 8, 2025 18:23
…preter related SaveState structures (SaveEventExecState, SaveEventExecFrame & SaveMapEventBase)

Co-Authored-By: florianessl <github@iessl.at>
@Ghabry Ghabry marked this pull request as ready for review March 8, 2025 17:49
@Ghabry
Copy link
Member Author

Ghabry commented Mar 10, 2025

a default member initializer is not allowed for a member of an anonymous struct within a union but only when using MSVC 😢 okay so the old style then...

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.

@florianessl
Copy link
Member

Small side effect: The renaming of the flag fields is also applied to generated XML files.
image

This also breaks the Players ability to read these fields from .emu files which were generated with previous versions of lcf2xml.

Ghabry added 2 commits March 14, 2025 16:26
Use only "Flags" when struct = flagname as we originally did.
@Ghabry
Copy link
Member Author

Ghabry commented Mar 14, 2025

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 CLASS_CLASS_FLAG.

@Ghabry Ghabry merged commit d182256 into EasyRPG:master Mar 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants