From 44c2d15ca9f3b1b758fc70acdf6d0cf1cf74cf5f Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Fri, 23 Oct 2020 22:07:30 -0400 Subject: re-match sub_81C79BC (from #1177) also re-define RBG macros --- include/constants/rgb.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/constants') diff --git a/include/constants/rgb.h b/include/constants/rgb.h index 80d951f4b..1896250d2 100644 --- a/include/constants/rgb.h +++ b/include/constants/rgb.h @@ -1,6 +1,10 @@ #ifndef GUARD_RGB_H #define GUARD_RGB_H +#define GET_R(color) ((color) & 0x1F) +#define GET_G(color) (((color) >> 5) & 0x1F) +#define GET_B(color) (((color) >> 10) & 0x1F) + #define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10)) #define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r)) #define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F)) -- cgit v1.2.3