]> git.jsancho.org Git - c-irrlicht.git/blobdiff - include/SColor.h
Use structs with casting, without classes replication
[c-irrlicht.git] / include / SColor.h
index 0c6e80932b4ecabd6f3f59769087ef9183f01b94..85f454f61417ea0f8bd13686880ce53cfc49c582 100644 (file)
 #ifndef __C_IRR_COLOR_H_INCLUDED__
 #define __C_IRR_COLOR_H_INCLUDED__
 
+#include <inttypes.h>
+
 typedef struct
 {
-  unsigned int a;
-  unsigned int r;
-  unsigned int g;
-  unsigned int b;
+  uint8_t b;
+  uint8_t g;
+  uint8_t r;
+  uint8_t a;
 } irr_video_SColor;
 
+#define MAKE_COLOR(a, r, g, b) {b, g, r, a}
+
 #endif