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 From 3a2a2b6ba98d8805df2dde059f07026dcd972326 Mon Sep 17 00:00:00 2001 From: PokeCodec <67983839+PokeCodec@users.noreply.github.com> Date: Wed, 2 Sep 2020 17:43:21 -0400 Subject: Fix issues according to feedback --- include/constants/rgb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/constants') diff --git a/include/constants/rgb.h b/include/constants/rgb.h index 737ea7678..1896250d2 100644 --- a/include/constants/rgb.h +++ b/include/constants/rgb.h @@ -1,9 +1,9 @@ #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 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)) -- cgit v1.2.3 From 3d87a88067c36e1296612bfaf3dc741884bc9bd4 Mon Sep 17 00:00:00 2001 From: PokeCodec <67983839+PokeCodec@users.noreply.github.com> Date: Wed, 2 Sep 2020 18:46:49 -0400 Subject: Make battle pyramid defines into enums --- include/constants/battle_pyramid.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include/constants') diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h index 004df7155..378197a4d 100644 --- a/include/constants/battle_pyramid.h +++ b/include/constants/battle_pyramid.h @@ -7,16 +7,6 @@ #define FLOOR_WALKABLE_METATILE 0x28D #define FLOOR_EXIT_METATILE 0x28E -#define HINT_EXIT_DIRECTION 0 -#define HINT_REMAINING_ITEMS 1 -#define HINT_REMAINING_TRAINERS 2 -#define HINT_EXIT_SHORT_REMAINING_TRAINERS 3 -#define HINT_EXIT_SHORT_REMAINING_ITEMS 4 -#define HINT_EXIT_MEDIUM_REMAINING_TRAINERS 5 -#define HINT_EXIT_MEDIUM_REMAINING_ITEMS 6 -#define HINT_EXIT_FAR_REMAINING_TRAINERS 7 -#define HINT_EXIT_FAR_REMAINING_ITEMS 8 - #define OBJ_TRAINERS 0 #define OBJ_ITEMS 1 -- cgit v1.2.3