X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Futil.h;h=264367be94a4082ad3f544e99e01f025334f8175;hb=77eea907b4ba007632e37588b6cd7eb66c9eab07;hp=3e8ee67d4e0bb225a9f31b088ae76fb05ae5bc38;hpb=2e5cc6552f3e43f97fa049bb91498b4ae8877438;p=gbajam22 diff --git a/src/util.h b/src/util.h index 3e8ee67..264367b 100644 --- a/src/util.h +++ b/src/util.h @@ -5,6 +5,11 @@ #include #include "gba.h" +#define RGB555(r, g, b) \ + ((((uint16_t)(r) >> 3) & 0x1f) | \ + (((uint16_t)(g) << 2) & 0x3e0) | \ + (((uint16_t)(b) << 7) & 0x7c00)) + #ifdef BUILD_GBA #define wait_vblank() \