From d4158e490a221e8d94747c8fffae84649bb3cae9 Mon Sep 17 00:00:00 2001 From: PokeCodec <67983839+PokeCodec@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:14:29 -0400 Subject: Match more functions --- 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..737ea7678 100644 --- a/include/constants/rgb.h +++ b/include/constants/rgb.h @@ -1,6 +1,10 @@ #ifndef GUARD_RGB_H #define GUARD_RGB_H +#define R(color) ((color) & 0x1F) +#define G(color) (((color) >> 5) & 0x1F) +#define 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