]> Chaos Git - corbenik/ctrulib.git/commitdiff
add macro for building RGB565 colors
authorDave Murphy <davem@devkitpro.org>
Thu, 11 Dec 2014 23:03:29 +0000 (23:03 +0000)
committerDave Murphy <davem@devkitpro.org>
Thu, 11 Dec 2014 23:03:29 +0000 (23:03 +0000)
libctru/include/3ds/gfx.h

index 1d426d01e420a5b7e14ac4baf2035c0099e33a4c..7074953cb1f48ea9085ade16d96b8b9f355473ee 100644 (file)
@@ -2,6 +2,8 @@
 #include <3ds/types.h>
 #include <3ds/services/gsp.h>
 
+#define RGB565(r,g,b)  (((b)&0x1f)|(((g)&0x3f)<<5)|(((r)&0x1f)<<11))
+
 typedef enum
 {
        GFX_TOP = 0,