diff --git a/modules/raylib.cppm b/modules/raylib.cppm index 2fcea73d..e0903f86 100644 --- a/modules/raylib.cppm +++ b/modules/raylib.cppm @@ -10,6 +10,33 @@ module; #define RAYMATH_IMPLEMENTATION #include "../include/raylib-cpp.hpp" +#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 + export module raylib; /** @@ -60,6 +87,29 @@ export namespace raylib { using raylib::Wave; using raylib::Window; + // Enums + using ::ConfigFlags; + using ::TraceLogLevel; + using ::KeyboardKey; + using ::MouseButton; + using ::MouseCursor; + using ::GamepadButton; + using ::GamepadAxis; + using ::MaterialMapIndex; + using ::ShaderLocationIndex; + using ::ShaderUniformDataType; + using ::ShaderAttributeDataType; + using ::PixelFormat; + using ::TextureFilter; + using ::TextureWrap; + using ::CubemapLayout; + using ::FontType; + using ::BlendMode; + using ::Gesture; + using ::CameraMode; + using ::CameraProjection; + using ::NPatchLayout; + // From Functions.hpp using raylib::InitWindow; using raylib::SetWindowTitle; @@ -108,6 +158,39 @@ export namespace raylib { using raylib::TextToPascal; using raylib::TextToInteger; + /** + * @namespace raylib::Colors + * @brief Re-exports all Color macros as inline constexpr + */ + namespace Colors { + inline constexpr ::Color LIGHTGRAY = CLITERAL(::Color){ 200, 200, 200, 255 }; + inline constexpr ::Color GRAY = CLITERAL(::Color){ 130, 130, 130, 255 }; + inline constexpr ::Color DARKGRAY = CLITERAL(::Color){ 80, 80, 80, 255 }; + inline constexpr ::Color YELLOW = CLITERAL(::Color){ 253, 249, 0, 255 }; + inline constexpr ::Color GOLD = CLITERAL(::Color){ 255, 203, 0, 255 }; + inline constexpr ::Color ORANGE = CLITERAL(::Color){ 255, 161, 0, 255 }; + inline constexpr ::Color PINK = CLITERAL(::Color){ 255, 109, 194, 255 }; + inline constexpr ::Color RED = CLITERAL(::Color){ 230, 41, 55, 255 }; + inline constexpr ::Color MAROON = CLITERAL(::Color){ 190, 33, 55, 255 }; + inline constexpr ::Color GREEN = CLITERAL(::Color){ 0, 228, 48, 255 }; + inline constexpr ::Color LIME = CLITERAL(::Color){ 0, 158, 47, 255 }; + inline constexpr ::Color DARKGREEN = CLITERAL(::Color){ 0, 117, 44, 255 }; + inline constexpr ::Color SKYBLUE = CLITERAL(::Color){ 102, 191, 255, 255 }; + inline constexpr ::Color BLUE = CLITERAL(::Color){ 0, 121, 241, 255 }; + inline constexpr ::Color DARKBLUE = CLITERAL(::Color){ 0, 82, 172, 255 }; + inline constexpr ::Color PURPLE = CLITERAL(::Color){ 200, 122, 255, 255 }; + inline constexpr ::Color VIOLET = CLITERAL(::Color){ 135, 60, 190, 255 }; + inline constexpr ::Color DARKPURPLE = CLITERAL(::Color){ 112, 31, 126, 255 }; + inline constexpr ::Color BEIGE = CLITERAL(::Color){ 211, 176, 131, 255 }; + inline constexpr ::Color BROWN = CLITERAL(::Color){ 127, 106, 79, 255 }; + inline constexpr ::Color DARKBROWN = CLITERAL(::Color){ 76, 63, 47, 255 }; + inline constexpr ::Color WHITE = CLITERAL(::Color){ 255, 255, 255, 255 }; + inline constexpr ::Color BLACK = CLITERAL(::Color){ 0, 0, 0, 255 }; + inline constexpr ::Color BLANK = CLITERAL(::Color){ 0, 0, 0, 0 }; + inline constexpr ::Color MAGENTA = CLITERAL(::Color){ 255, 0, 255, 255 }; + inline constexpr ::Color RAYWHITE = CLITERAL(::Color){ 245, 245, 245, 255 }; + } + /** * @namespace raylib::Keyboard * @brief Input-related functions: keyboard