From d7596d315dfe54f4770d8d2f17fd4ef2f300564d Mon Sep 17 00:00:00 2001 From: Greg Wells Date: Wed, 14 May 2025 06:00:50 -0400 Subject: [PATCH] fix color format --- src/types/gryphn_color.h | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/types/gryphn_color.h b/src/types/gryphn_color.h index 4c0d66a..50b21f6 100644 --- a/src/types/gryphn_color.h +++ b/src/types/gryphn_color.h @@ -1,8 +1,6 @@ #include "../math/gryphn_vec4.h" -#ifdef GN_UTILS_CPP -struct gnColor { -public: +typedef struct gnColor { union { struct { int r, g, b; @@ -14,7 +12,8 @@ public: float alpha; }; }; -public: + + #ifdef GN_UTILS_CPP gnColor(int red, int green, int blue, float alpha = 1.0) { this->red = red; this->green = green; @@ -28,19 +27,5 @@ public: this->blue = color; this->alpha = alpha; } -}; -#else -typedef struct gnColor { - union { - struct { - int r, g, b; - float a; - }; - - struct { - int red, green, blue; - float alpha; - }; - }; + #endif } gnColor; -#endif