diff --git a/include/battle.h b/include/battle.h index 70b1856a8..c4a0fe9a5 100644 --- a/include/battle.h +++ b/include/battle.h @@ -664,6 +664,18 @@ struct MonSpritesGfx }; // All battle variables are declared in battle_main.c +extern u16 gBattle_BG0_X; +extern u16 gBattle_BG0_Y; +extern u16 gBattle_BG1_X; +extern u16 gBattle_BG1_Y; +extern u16 gBattle_BG2_X; +extern u16 gBattle_BG2_Y; +extern u16 gBattle_BG3_X; +extern u16 gBattle_BG3_Y; +extern u16 gBattle_WIN0H; +extern u16 gBattle_WIN0V; +extern u16 gBattle_WIN1H; +extern u16 gBattle_WIN1V; extern u8 gDisplayedStringBattle[300]; extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT]; extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT]; @@ -769,17 +781,4 @@ extern u8 gMultiUsePlayerCursor; extern u8 gNumberOfMovesToChoose; extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u16 gBattle_WIN0H; -extern u16 gBattle_WIN0V; -extern u16 gBattle_WIN1H; -extern u16 gBattle_WIN1V; -extern u16 gBattle_BG0_X; -extern u16 gBattle_BG0_Y; -extern u16 gBattle_BG1_X; -extern u16 gBattle_BG1_Y; -extern u16 gBattle_BG2_X; -extern u16 gBattle_BG2_Y; -extern u16 gBattle_BG3_X; -extern u16 gBattle_BG3_Y; - #endif // GUARD_BATTLE_H diff --git a/src/battle_main.c b/src/battle_main.c index 4669e9123..116f5963a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -173,6 +173,18 @@ static void HandleAction_NothingIsFainted(void); static void HandleAction_ActionFinished(void); // EWRAM vars +EWRAM_DATA u16 gBattle_BG0_X = 0; +EWRAM_DATA u16 gBattle_BG0_Y = 0; +EWRAM_DATA u16 gBattle_BG1_X = 0; +EWRAM_DATA u16 gBattle_BG1_Y = 0; +EWRAM_DATA u16 gBattle_BG2_X = 0; +EWRAM_DATA u16 gBattle_BG2_Y = 0; +EWRAM_DATA u16 gBattle_BG3_X = 0; +EWRAM_DATA u16 gBattle_BG3_Y = 0; +EWRAM_DATA u16 gBattle_WIN0H = 0; +EWRAM_DATA u16 gBattle_WIN0V = 0; +EWRAM_DATA u16 gBattle_WIN1H = 0; +EWRAM_DATA u16 gBattle_WIN1V = 0; EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; diff --git a/src/battle_tent.c b/src/battle_tent.c index ebb639600..c7e70912c 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -10,6 +10,7 @@ #include "item.h" #include "battle_factory_screen.h" #include "frontier_util.h" +#include "string_util.h" #include "constants/items.h" #include "constants/region_map_sections.h" diff --git a/sym_ewram.txt b/sym_ewram.txt index 6f9647dd2..bff045d1c 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -122,42 +122,6 @@ gUnknown_02022D0C: @ 2022D0C gUnknown_02022E10: @ 2022E10 .space 0x4 -gBattle_BG0_X: @ 2022E14 - .space 0x2 - -gBattle_BG0_Y: @ 2022E16 - .space 0x2 - -gBattle_BG1_X: @ 2022E18 - .space 0x2 - -gBattle_BG1_Y: @ 2022E1A - .space 0x2 - -gBattle_BG2_X: @ 2022E1C - .space 0x2 - -gBattle_BG2_Y: @ 2022E1E - .space 0x2 - -gBattle_BG3_X: @ 2022E20 - .space 0x2 - -gBattle_BG3_Y: @ 2022E22 - .space 0x2 - -gBattle_WIN0H: @ 2022E24 - .space 0x2 - -gBattle_WIN0V: @ 2022E26 - .space 0x2 - -gBattle_WIN1H: @ 2022E28 - .space 0x2 - -gBattle_WIN1V: @ 2022E2A - .space 0x2 - .include "src/battle_main.o" .include "src/pokemon.o" .include "src/random.o"