graphics: refactor Color to a standalone file

This commit is contained in:
Edgaru089 2021-10-10 23:18:25 +08:00
parent abb6a8ea08
commit def2c3bf7a

30
graphics/color.h Normal file
View File

@ -0,0 +1,30 @@
#pragma once
#include "../main.h"
#ifdef __cplusplus
extern "C" {
#endif
// HelosGraphics_Color is in ARGB little-endian packed format
// (B,G,R,A in byte order)
typedef struct {
uint8_t B, G, R;
uint8_t A;
} PACKED HelosGraphics_Color;
extern const HelosGraphics_Color
HelosGraphics_Color_Black,
HelosGraphics_Color_White,
HelosGraphics_Color_Red,
HelosGraphics_Color_Green,
HelosGraphics_Color_Blue,
HelosGraphics_Color_Cyan,
HelosGraphics_Color_Magenta,
HelosGraphics_Color_Yellow;
#ifdef __cplusplus
}
#endif