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 ++++ include/pokenav.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') 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)) diff --git a/include/pokenav.h b/include/pokenav.h index ac916f3ba..d40cfea11 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -313,7 +313,7 @@ bool32 WaitForHelpBar(void); void sub_81C78A0(void); bool32 MainMenuLoopedTaskIsBusy(void); void sub_81C7FDC(void); -void sub_81C79BC(const u16 *a0, const u16 *a1, u32 a2, u32 a3, u32 a4, u16 *a5); +void sub_81C79BC(const u16 *a0, const u16 *a1, s32 a2, s32 a3, s32 a4, u16 *palette); void sub_81C7B40(void); struct Sprite *PauseSpinningPokenavSprite(void); void ResumeSpinningPokenavSprite(void); -- cgit v1.2.3 From 1cdd0ac199b921dc31a42c56455262b49b5076f1 Mon Sep 17 00:00:00 2001 From: PokeCodec <67983839+PokeCodec@users.noreply.github.com> Date: Wed, 2 Sep 2020 16:35:21 -0400 Subject: Make argument int --- include/pokenav.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index d40cfea11..ed4e5a906 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -313,7 +313,7 @@ bool32 WaitForHelpBar(void); void sub_81C78A0(void); bool32 MainMenuLoopedTaskIsBusy(void); void sub_81C7FDC(void); -void sub_81C79BC(const u16 *a0, const u16 *a1, s32 a2, s32 a3, s32 a4, u16 *palette); +void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *palette); void sub_81C7B40(void); struct Sprite *PauseSpinningPokenavSprite(void); void ResumeSpinningPokenavSprite(void); -- 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') 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') 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 From da582d5258703eb52d8cadb4cbaef4ee7031b833 Mon Sep 17 00:00:00 2001 From: PokeCodec <67983839+PokeCodec@users.noreply.github.com> Date: Fri, 4 Sep 2020 20:41:29 -0400 Subject: Make JOY Macros match --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 08988eac7..8c5167041 100644 --- a/include/global.h +++ b/include/global.h @@ -99,7 +99,7 @@ #define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr) // Macros for checking the joypad -#define TEST_BUTTON(field, button) ({(field) & (button);}) +#define TEST_BUTTON(field, button) ((field) & (button)) #define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button) #define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button) #define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button) -- cgit v1.2.3