From ebe0d21c54d6a0c9dd3a8eb5135fe77d180f7587 Mon Sep 17 00:00:00 2001 From: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:33:28 -0500 Subject: [PATCH 1/2] Fix redefinition error in item_config.h --- include/constants/expansion_branches.h | 10 ++++++++++ include/constants/item_config.h | 2 ++ include/global.h | 6 ------ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 include/constants/expansion_branches.h diff --git a/include/constants/expansion_branches.h b/include/constants/expansion_branches.h new file mode 100644 index 000000000..9db9ce515 --- /dev/null +++ b/include/constants/expansion_branches.h @@ -0,0 +1,10 @@ +#ifndef GUARD_CONSTANTS_EXPANSION_BRANCHES_H +#define GUARD_CONSTANTS_EXPANSION_BRANCHES_H + +// Branch defines: Used by other branches to detect each other. +// Each define must be here for each of RHH's branch you have pulled. +// e.g. If you have both the battle_engine and pokemon_expansion branch, +// then both BATTLE_ENGINE and POKEMON_EXPANSION must be defined here. +#define ITEM_EXPANSION + +#endif diff --git a/include/constants/item_config.h b/include/constants/item_config.h index 0311491e6..4df5fab18 100644 --- a/include/constants/item_config.h +++ b/include/constants/item_config.h @@ -1,6 +1,8 @@ #ifndef GUARD_CONSTANTS_ITEM_CONFIG_H #define GUARD_CONSTANTS_ITEM_CONFIG_H +#include "constants/expansion_branches.h" + #ifndef GEN_3 #define GEN_3 0 #define GEN_4 1 diff --git a/include/global.h b/include/global.h index 08a9ed371..e4c11f9ef 100644 --- a/include/global.h +++ b/include/global.h @@ -121,12 +121,6 @@ f; \ }) -// Branch defines: Used by other branches to detect each other. -// Each define must be here for each of RHH's branch you have pulled. -// e.g. If you have both the battle_engine and pokemon_expansion branch, -// then both BATTLE_ENGINE and POKEMON_EXPANSION must be defined here. -#define ITEM_EXPANSION - #define ROUND_BITS_TO_BYTES(numBits)(((numBits) / 8) + (((numBits) % 8) ? 1 : 0)) #define DEX_FLAGS_NO (ROUND_BITS_TO_BYTES(NUM_SPECIES)) From de3caaccfb8e6c68bac1c5c76e0bc6114c0c5cc9 Mon Sep 17 00:00:00 2001 From: ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> Date: Sun, 4 Jul 2021 12:42:34 -0500 Subject: [PATCH 2/2] Include expansion_branches.h in global.h --- include/global.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/global.h b/include/global.h index e4c11f9ef..9882be1a4 100644 --- a/include/global.h +++ b/include/global.h @@ -10,6 +10,7 @@ #include "constants/vars.h" #include "constants/species.h" #include "constants/berry.h" +#include "constants/expansion_branches.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm("");