]> 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 4409a74e7c4872ef6e99c75adcaf348ea98ff95b..85f454f61417ea0f8bd13686880ce53cfc49c582 100644 (file)
    <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __C_COLOR_H_INCLUDED__
-#define __C_COLOR_H_INCLUDED__
+#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