Skip to content

Conversation

@mikomikotaishi
Copy link
Contributor

This is a followup to a previous commit of mine, #360. It adds the colour macros in namespace raylib::Colors and makes them constexpr (as modules cannot export macros). I also added enums that I forgot to export in the module.

Comment on lines +13 to +38
#undef LIGHTGRAY
#undef GRAY
#undef DARKGRAY
#undef YELLOW
#undef GOLD
#undef ORANGE
#undef PINK
#undef RED
#undef MAROON
#undef GREEN
#undef LIME
#undef DARKGREEN
#undef SKYBLUE
#undef BLUE
#undef DARKBLUE
#undef PURPLE
#undef VIOLET
#undef DARKPURPLE
#undef BEIGE
#undef BROWN
#undef DARKBROWN
#undef WHITE
#undef BLACK
#undef BLANK
#undef MAGENTA
#undef RAYWHITE
Copy link
Owner

Choose a reason for hiding this comment

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

Will Undef-ing these break implementations that use RAYWHITE and others? We want to add C++ wrappers, while still being able to use the original raylib codes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should not as they were undef-ed after the inclusion of the file, so all the implementations will still have access to those macros. That being said we have to undef the macros so that they don't overwrite the constexpr ::Colors.

@RobLoach RobLoach merged commit 8e01c1d into RobLoach:master Jun 10, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants