From: Dave Murphy Date: Fri, 12 Dec 2014 22:57:24 +0000 (+0000) Subject: add macro to convert 8bit RGB to RGB565 X-Git-Tag: v0.3.0~37^2~14 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=493d7dc55a1ec24f3ade6f47eaad77bcae8907d0;p=corbenik%2Fctrulib.git add macro to convert 8bit RGB to RGB565 --- diff --git a/libctru/include/3ds/gfx.h b/libctru/include/3ds/gfx.h index 7074953..7d85eef 100644 --- a/libctru/include/3ds/gfx.h +++ b/libctru/include/3ds/gfx.h @@ -3,6 +3,7 @@ #include <3ds/services/gsp.h> #define RGB565(r,g,b) (((b)&0x1f)|(((g)&0x3f)<<5)|(((r)&0x1f)<<11)) +#define RGB8_to_565(r,g,b) (((b)>>3)&0x1f)|((((g)>>2)&0x3f)<<5)|((((r)>>3)&0x1f)<<11) typedef enum {