rename src to utils
This commit is contained in:
31
utils/gryphn_color.h
Normal file
31
utils/gryphn_color.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct gnColor {
|
||||
union {
|
||||
struct {
|
||||
int r, g, b;
|
||||
float a;
|
||||
};
|
||||
|
||||
struct {
|
||||
int red, green, blue;
|
||||
float alpha;
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef GN_UTILS_CPP
|
||||
gnColor(int red, int green, int blue, float alpha = 1.0) {
|
||||
this->red = red;
|
||||
this->green = green;
|
||||
this->blue = blue;
|
||||
this->alpha = alpha;
|
||||
}
|
||||
|
||||
gnColor(int color, float alpha = 1.0) {
|
||||
this->red = color;
|
||||
this->green = color;
|
||||
this->blue = color;
|
||||
this->alpha = alpha;
|
||||
}
|
||||
#endif
|
||||
} gnColor;
|
Reference in New Issue
Block a user