From caf9af321d913e6938f5c70188ad0aca5e5eefeb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 8 Feb 2018 00:00:25 +0100 Subject: [PATCH] get rid of unnecessary externs --- include/battle.h | 4 +-- src/battle_ai_script_commands.c | 20 +----------- src/battle_ai_switch_items.c | 14 -------- src/battle_anim.c | 5 --- src/battle_bg.c | 4 +-- src/battle_controller_link_opponent.c | 28 ++-------------- src/battle_controller_link_partner.c | 26 ++------------- src/battle_controller_opponent.c | 26 ++------------- src/battle_controller_player.c | 34 +++----------------- src/battle_controller_player_partner.c | 27 ++-------------- src/battle_controller_recorded_opponent.c | 28 ++-------------- src/battle_controller_recorded_player.c | 26 ++------------- src/battle_controller_safari.c | 16 +--------- src/battle_controller_wally.c | 27 ++-------------- src/battle_controllers.c | 26 +-------------- src/battle_gfx_sfx_util.c | 10 ------ src/battle_interface.c | 5 --- src/battle_main.c | 4 +-- src/battle_message.c | 25 +++------------ src/battle_setup.c | 5 +-- src/battle_transition.c | 1 - src/battle_util.c | 39 ----------------------- src/battle_util2.c | 5 --- src/calculate_base_damage.c | 10 +----- src/evolution_scene.c | 4 +-- src/item_use.c | 6 ++-- src/pokeball.c | 6 ---- src/pokemon_summary_screen.c | 4 +-- src/recorded_battle.c | 10 +----- src/reset_save_heap.c | 2 +- src/reshow_battle_screen.c | 14 +------- src/scrcmd.c | 7 ---- 32 files changed, 44 insertions(+), 424 deletions(-) diff --git a/include/battle.h b/include/battle.h index 80c6cbdb2d..3933c5bc45 100644 --- a/include/battle.h +++ b/include/battle.h @@ -1032,8 +1032,8 @@ extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern u8 gPlayerDpadHoldFrames; extern struct BattleSpriteData *gBattleSpritesDataPtr; extern struct MonSpritesGfx *gMonSpritesGfxPtr; -extern u8 *gUnknown_020244D8; -extern u8 *gUnknown_020244DC; +extern struct BattleHealthboxInfo *gUnknown_020244D8; +extern struct BattleHealthboxInfo *gUnknown_020244DC; extern u16 gBattleMovePower; extern u16 gMoveToLearn; extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 355d81d2cc..d6ccf93053 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -2,6 +2,7 @@ #include "battle_ai_script_commands.h" #include "pokemon.h" #include "battle.h" +#include "battle_setup.h" #include "constants/species.h" #include "constants/abilities.h" #include "random.h" @@ -44,26 +45,7 @@ in order to read the next command correctly. refer to battle_ai_scripts.s for th AI scripts. */ -extern u32 gBattleTypeFlags; -extern u8 gActiveBattler; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u16 gCurrentMove; -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u16 gLastMoves[MAX_BATTLERS_COUNT]; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; -extern u32 gStatuses3[MAX_BATTLERS_COUNT]; -extern u16 gSideStatuses[2]; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u16 gDynamicBasePower; -extern u8 gMoveResultFlags; -extern s32 gBattleMoveDamage; -extern u8 gCritMultiplier; -extern u16 gBattleWeather; - extern const struct BattleMove gBattleMoves[]; -extern const struct BaseStats gBaseStats[]; extern const u8 * const gBattleAI_ScriptsTable[]; extern u32 GetAiScriptsInRecordedBattle(); diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index 23d2233086..b0fcc2e294 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -10,21 +10,7 @@ #include "constants/items.h" #include "pokemon_item_effects.h" -extern u8 gActiveBattler; -extern u8 gAbsentBattlerFlags; -extern u32 gBattleTypeFlags; -extern u32 gStatuses3[MAX_BATTLERS_COUNT]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u16 gLastLandedMoves[MAX_BATTLERS_COUNT]; -extern u8 gLastHitBy[MAX_BATTLERS_COUNT]; -extern u16 gDynamicBasePower; -extern u8 gMoveResultFlags; -extern u8 gCritMultiplier; -extern s32 gBattleMoveDamage; - extern const struct BattleMove gBattleMoves[]; -extern const struct BaseStats gBaseStats[]; extern const u8 gTypeEffectiveness[]; extern const u8 * const gItemEffectTable[]; // todo: fix once struct is declared diff --git a/src/battle_anim.c b/src/battle_anim.c index 34b7a74765..7606f701d8 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -25,8 +25,6 @@ #define ANIM_SPRITE_INDEX_COUNT 8 -extern u8 gBattlerAttacker; -extern u8 gBattlerTarget; extern u16 gBattle_WIN0H; extern u16 gBattle_WIN0V; extern u16 gBattle_WIN1H; @@ -35,12 +33,9 @@ extern u16 gBattle_BG1_X; extern u16 gBattle_BG1_Y; extern u16 gBattle_BG2_X; extern u16 gBattle_BG2_Y; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; extern struct MusicPlayerInfo gMPlayInfo_BGM; extern struct MusicPlayerInfo gMPlayInfo_SE1; extern struct MusicPlayerInfo gMPlayInfo_SE2; -extern u8 gDecompressionBuffer[]; extern const u16 gUnknown_082C8D64[]; extern const u8 * const gBattleAnims_Moves[]; diff --git a/src/battle_bg.c b/src/battle_bg.c index cb106adaeb..df38187311 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -18,6 +18,7 @@ #include "window.h" #include "text_window.h" #include "new_menu_helpers.h" +#include "battle_setup.h" struct BattleBackground { @@ -35,13 +36,10 @@ extern const struct BgTemplate gUnknown_0831AA08[4]; extern const struct WindowTemplate *gUnknown_0831ABA0[]; extern const struct BattleBackground gBattleTerrainTable[]; -extern u8 gBattleTerrain; -extern u16 gTrainerBattleOpponent_A; extern u16 gBattle_BG1_X; extern u16 gBattle_BG1_Y; extern u16 gBattle_BG2_X; extern u16 gBattle_BG2_Y; -extern u16 gPartnerTrainerId; extern u8 GetCurrentMapBattleScene(void); diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 3775cf1fb4..27c67bd6fe 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -23,38 +23,13 @@ #include "reshow_battle_screen.h" #include "pokeball.h" #include "data2.h" +#include "battle_setup.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u16 gUnknown_020243FC; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gPartnerTrainerId; -extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gUnknown_020244B4[]; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern struct MusicPlayerInfo gMPlayInfo_BGM; extern struct UnusedControllerStruct gUnknown_02022D0C; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct BattleMove gBattleMoves[]; @@ -64,6 +39,7 @@ extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); extern void sub_81851A8(u8 *); extern u16 sub_8068B48(void); +extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); // this file's functions static void LinkOpponentHandleGetMonData(void); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 340a2b5662..bce5aa52ea 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -23,34 +23,11 @@ #include "reshow_battle_screen.h" #include "pokeball.h" #include "data2.h" +#include "battle_setup.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u16 gUnknown_020243FC; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gPartnerTrainerId; -extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gUnknown_020244B4[]; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; @@ -60,6 +37,7 @@ extern const struct BattleMove gBattleMoves[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); extern void sub_81851A8(u8 *); +extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); // this file's functions static void LinkPartnerHandleGetMonData(void); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 760205d905..4d1190ec83 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -27,33 +27,13 @@ #include "random.h" #include "pokeball.h" #include "data2.h" +#include "battle_setup.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern bool8 gDoingBattleAnim; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern struct MusicPlayerInfo gMPlayInfo_BGM; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void *gUnknown_020244D8; -extern void *gUnknown_020244DC; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern struct UnusedControllerStruct gUnknown_02022D0C; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u16 gUnknown_020243FC; -extern u8 gUnknown_020244B4[]; -extern void (*gPreBattleCallback1)(void); +extern struct MusicPlayerInfo gMPlayInfo_BGM; +extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct BattleMove gBattleMoves[]; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index e62985b3b0..3805fcc4d4 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -26,44 +26,20 @@ #include "random.h" #include "pokeball.h" #include "data2.h" +#include "battle_setup.h" +#include "item_use.h" +#include "recorded_battle.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gAbsentBattlerFlags; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern u8 gPlayerDpadHoldFrames; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern u8 gMultiUsePlayerCursor; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern struct MusicPlayerInfo gMPlayInfo_BGM; -extern u16 gPartnerTrainerId; -extern struct SpriteTemplate gUnknown_0202499C; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gSpecialVar_ItemId; extern u8 gUnknown_0203CEE8; extern u8 gUnknown_0203CEE9; extern u8 gUnknown_0203CF00[]; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; -extern u8 gNumberOfMovesToChoose; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; extern s32 gUnknown_0203CD70; -extern u8 gBattlerInMenuId; -extern u32 gBattlePalaceMoveSelectionRngValue; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; -extern u8 gUnknown_020244B4[]; extern u16 gUnknown_020243FC; extern struct UnusedControllerStruct gUnknown_02022D0C; +extern struct MusicPlayerInfo gMPlayInfo_BGM; +extern struct SpriteTemplate gUnknown_0202499C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index ac17a49387..26cb71e6e5 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -22,35 +22,13 @@ #include "reshow_battle_screen.h" #include "pokeball.h" #include "data2.h" +#include "battle_setup.h" +#include "item_use.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u8 gBattlerInMenuId; extern u16 gUnknown_020243FC; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gPartnerTrainerId; -extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gUnknown_020244B4[]; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern struct UnusedControllerStruct gUnknown_02022D0C; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; @@ -60,6 +38,7 @@ extern const struct BattleMove gBattleMoves[]; extern void sub_81358F4(void); extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); +extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); // this file's functions static void PlayerPartnerHandleGetMonData(void); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 8078d0af21..501de3fec9 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -24,38 +24,15 @@ #include "reshow_battle_screen.h" #include "pokeball.h" #include "data2.h" +#include "item_use.h" +#include "battle_setup.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; extern u16 gUnknown_020243FC; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gPartnerTrainerId; -extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gUnknown_020244B4[]; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern struct MusicPlayerInfo gMPlayInfo_BGM; extern struct UnusedControllerStruct gUnknown_02022D0C; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; extern u8 gUnknown_0203C7B4; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; @@ -63,6 +40,7 @@ extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); extern u16 sub_8068B48(void); +extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); // this file's functions static void RecordedOpponentHandleGetMonData(void); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index dca2a7022d..09834fdb7c 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -23,36 +23,13 @@ #include "reshow_battle_screen.h" #include "pokeball.h" #include "data2.h" +#include "item_use.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u8 gBattlerInMenuId; extern u16 gUnknown_020243FC; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gPartnerTrainerId; -extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gUnknown_020244B4[]; extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; -extern u8 gBattleCommunication[]; extern u8 gUnknown_0203C7B4; extern struct MusicPlayerInfo gMPlayInfo_BGM; extern struct UnusedControllerStruct gUnknown_02022D0C; @@ -63,6 +40,7 @@ extern const struct BattleMove gBattleMoves[]; extern void sub_8172EF0(u8 bank, struct Pokemon *mon); extern void sub_806A068(u16, u8); +extern u8 GetFrontierTrainerFrontSpriteId(u16 trainerId); // this file's functions static void RecordedPlayerHandleGetMonData(void); diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index 6264d83241..799632c05d 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -21,26 +21,12 @@ #include "pokeball.h" #include "data2.h" #include "pokeblock.h" +#include "item_use.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern void (*gPreBattleCallback1)(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; -extern u16 gSpecialVar_ItemId; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; -extern u8 gBattlerInMenuId; extern u16 gUnknown_020243FC; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index f85c6792a7..449edc21f1 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -27,37 +27,14 @@ #include "pokeball.h" #include "data2.h" #include "party_menu.h" +#include "battle_setup.h" +#include "item_use.h" -extern u32 gBattleControllerExecFlags; -extern u8 gActiveBattler; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gAbsentBattlerFlags; -extern u8 gBattlersCount; -extern bool8 gDoingBattleAnim; -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern u8 gMultiUsePlayerCursor; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; extern struct MusicPlayerInfo gMPlayInfo_BGM; -extern u16 gPartnerTrainerId; extern struct SpriteTemplate gUnknown_0202499C; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u16 gSpecialVar_ItemId; -extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleOutcome; -extern u8 gNumberOfMovesToChoose; extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; extern s32 gUnknown_0203CD70; -extern u8 gBattlerInMenuId; -extern u32 gBattlePalaceMoveSelectionRngValue; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; -extern u8 gUnknown_020244B4[]; extern u16 gUnknown_020243FC; extern struct UnusedControllerStruct gUnknown_02022D0C; diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 4f523cfa07..b30d8834a4 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -12,37 +12,13 @@ #include "constants/abilities.h" #include "battle_message.h" -extern u32 gBattleTypeFlags; -extern u32 gBattleControllerExecFlags; -extern void (*gBattleMainFunc)(void); -extern void (*gBattlerControllerFuncs[MAX_BATTLERS_COUNT])(void); -extern u8 gBattlerPositions[MAX_BATTLERS_COUNT]; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern u8 gActiveBattler; +extern u8 gBattleBuffersTransferData[0x100]; extern u8 gUnknown_0202428C; extern u32 gUnknown_02022FF4; extern u8 gUnknown_0203C7B4; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern u8 gBattleBuffersTransferData[0x100]; extern u8 gUnknown_02022D08; extern u8 gUnknown_02022D09; extern u8 gUnknown_02022D0A; -extern u8 gBattlerAttacker; -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u8 gEffectBank; -extern u16 gBattleWeather; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u16 gCurrentMove; -extern u16 gChosenMove; -extern u16 gLastUsedItem; -extern u8 gBattleOutcome; -extern u8 gLastUsedAbility; -extern u8 gStringBattler; extern const struct BattleMove gBattleMoves[]; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 7958d07b31..b622afc9c7 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -23,17 +23,7 @@ #include "contest.h" #include "constants/songs.h" -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gActiveBattler; -extern u8 gBattlersCount; extern u16 gUnknown_020243FC; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u8 gBattlerPositions[MAX_BATTLERS_COUNT]; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u32 gTransformedPersonalities[MAX_BATTLERS_COUNT]; extern struct MusicPlayerInfo gMPlayInfo_SE1; extern struct MusicPlayerInfo gMPlayInfo_SE2; extern struct MusicPlayerInfo gMPlayInfo_BGM; diff --git a/src/battle_interface.c b/src/battle_interface.c index debbc8eb73..e5aa79a0a9 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -153,11 +153,6 @@ enum HEALTHBOX_GFX_117, }; -extern u8 gBattlerPositions[MAX_BATTLERS_COUNT]; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; - extern const u8 * const gNatureNamePointers[]; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; diff --git a/src/battle_main.c b/src/battle_main.c index 1195cda525..be0e3d2b07 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -286,8 +286,8 @@ EWRAM_DATA u32 gTransformedPersonalities[MAX_BATTLERS_COUNT] = {0}; EWRAM_DATA u8 gPlayerDpadHoldFrames = 0; EWRAM_DATA struct BattleSpriteData *gBattleSpritesDataPtr = NULL; EWRAM_DATA struct MonSpritesGfx *gMonSpritesGfxPtr = NULL; -EWRAM_DATA u8 *gUnknown_020244D8 = NULL; -EWRAM_DATA u8 *gUnknown_020244DC = NULL; +EWRAM_DATA struct BattleHealthboxInfo *gUnknown_020244D8 = NULL; +EWRAM_DATA struct BattleHealthboxInfo *gUnknown_020244DC = NULL; EWRAM_DATA u16 gBattleMovePower = 0; EWRAM_DATA u16 gMoveToLearn = 0; EWRAM_DATA u8 gBattleMonForms[MAX_BATTLERS_COUNT] = {0}; diff --git a/src/battle_message.c b/src/battle_message.c index 88d11163df..e37a6883fd 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -14,22 +14,7 @@ #include "battle_controllers.h" #include "battle_setup.h" -extern u16 gLastUsedItem; -extern u8 gLastUsedAbility; -extern u8 gActiveBattler; -extern u8 gBattlerAttacker; -extern u8 gBattlerTarget; -extern u8 gStringBattler; -extern u8 gEffectBank; extern u8 gBattlerAbilities[MAX_BATTLERS_COUNT]; -extern u32 gBattleTypeFlags; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; -extern u16 gPartnerTrainerId; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern struct BattleEnigmaBerry gEnigmaBerries[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferA[MAX_BATTLERS_COUNT][0x200]; -extern u8 gMoveSelectionCursor[MAX_BATTLERS_COUNT]; extern u8 gUnknown_0203C7B4; extern struct StringInfoBattle *gStringInfo; @@ -2360,20 +2345,20 @@ static void sub_814F8F8(u8* textBuff) // Appends "!" to the text buffer `dst`. In the original Japanese this looked // into the table of moves at sUnknownMoveTable and varied the line accordingly. -// +// // gText_ExclamationMark was a plain "!", used for any attack not on the list. // It resulted in the translation "'s !". -// +// // gText_ExclamationMark2 was "を つかった!". This resulted in the translation // " used !", which was used for all attacks in English. -// +// // gText_ExclamationMark3 was "した!". This was used for those moves whose // names were verbs, such as Recover, and resulted in translations like " // recovered itself!". -// +// // gText_ExclamationMark4 was "を した!" This resulted in a translation of // " did an !". -// +// // gText_ExclamationMark5 was " こうげき!" This resulted in a translation of // "'s attack!". static void sub_814F950(u8* dst) diff --git a/src/battle_setup.c b/src/battle_setup.c index 96af536fee..04496ffcde 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -30,6 +30,7 @@ #include "strings.h" #include "secret_base.h" #include "string_util.h" +#include "overworld.h" enum { @@ -82,11 +83,7 @@ extern void sub_81D61E8(void); extern void sub_80982B8(void); extern void sub_81A9EDC(u16 a0); extern void sub_81D572C(u8 a0, u16 arg1); -extern void IncrementGameStat(u8 statId); -extern u32 GetGameStat(u8 statId); -extern u32 gBattleTypeFlags; -extern u8 gBattleOutcome; extern void (*gFieldCallback)(void); // this file's functions diff --git a/src/battle_transition.c b/src/battle_transition.c index 0ff8cd9037..bb7a02f414 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -63,7 +63,6 @@ extern const struct OamData gFieldObjectBaseOam_32x32; extern void c2_exit_to_overworld_2_switch(void); extern void sub_80AC3D0(void); -extern void ScanlineEffect_Clear(void); // this file's functions static void LaunchBattleTransitionTask(u8 transitionId); diff --git a/src/battle_util.c b/src/battle_util.c index 145169f345..861ef0f588 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -23,45 +23,6 @@ #include "link.h" #include "berry.h" -extern const u8* gBattlescriptCurrInstr; -extern const u8* gSelectionBattleScripts[MAX_BATTLERS_COUNT]; -extern const u8* gPalaceSelectionBattleScripts[MAX_BATTLERS_COUNT]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u8 gActiveBattler; -extern u8 gStringBattler; -extern u16 gCurrentMove; -extern u16 gLastUsedItem; -extern u8 gBattlersCount; -extern u32 gStatuses3[MAX_BATTLERS_COUNT]; -extern u8 gBattlerAttacker; -extern u8 gBattlerTarget; -extern u8 gAbsentBattlerFlags; -extern u16 gBattleWeather; -extern u8 gBattleTurnOrder[MAX_BATTLERS_COUNT]; -extern u16 gSideStatuses[2]; -extern u8 gBattleCommunication[]; -extern void (*gBattleMainFunc)(void); -extern s32 gBattleMoveDamage; -extern struct BattleEnigmaBerry gEnigmaBerries[MAX_BATTLERS_COUNT]; -extern u8 gBattleBufferB[MAX_BATTLERS_COUNT][0x200]; -extern u32 gBattleTypeFlags; -extern u16 gLastMoves[MAX_BATTLERS_COUNT]; -extern u32 gHitMarker; -extern u8 gEffectBank; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBank1; -extern u16 gChosenMoveByBattler[MAX_BATTLERS_COUNT]; -extern u8 gMoveResultFlags; -extern s32 gTakenDmg[MAX_BATTLERS_COUNT]; -extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT]; -extern u8 gLastUsedAbility; -extern u8 gCurrentActionFuncId; -extern u32 gBattleControllerExecFlags; -extern u16 gRandomMove; -extern u8 gCurrMovePos; -extern u8 gUnknown_020241E9; -extern u8 gSentPokesToOpponent[2]; - extern const struct BattleMove gBattleMoves[]; extern u8 weather_get_current(void); diff --git a/src/battle_util2.c b/src/battle_util2.c index ba42d4ea9a..d079ccb253 100644 --- a/src/battle_util2.c +++ b/src/battle_util2.c @@ -8,12 +8,7 @@ #include "random.h" #include "battle_scripts.h" -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; extern u8 gUnknown_0203CF00[]; -extern const u8 *gBattlescriptCurrInstr; -extern u8 gBattleCommunication[]; -extern u8 gActiveBattler; extern void sub_81D55D0(void); extern void sub_81D5694(void); diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c index b6b83086b8..7bf3e7c293 100644 --- a/src/calculate_base_damage.c +++ b/src/calculate_base_damage.c @@ -1,6 +1,7 @@ #include "global.h" #include "constants/abilities.h" #include "battle.h" +#include "battle_setup.h" #include "constants/hold_effects.h" #include "event_data.h" #include "item.h" @@ -10,15 +11,6 @@ #include "constants/moves.h" #include "constants/battle_move_effects.h" -extern u32 gBattleTypeFlags; -extern struct BattlePokemon gBattleMons[4]; -extern u16 gCurrentMove; -extern u8 gCritMultiplier; -extern u16 gBattleWeather; -extern struct BattleEnigmaBerry gEnigmaBerries[]; -extern u16 gBattleMovePower; -extern u16 gTrainerBattleOpponent_A; - bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 bank); extern const struct BattleMove gBattleMoves[]; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index cbd37be52f..3004af93c3 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -48,13 +48,11 @@ extern u16 gBattle_BG2_X; extern u16 gBattle_BG2_Y; extern u16 gBattle_BG3_X; extern u16 gBattle_BG3_Y; -extern u8 gBattleTerrain; extern struct SpriteTemplate gUnknown_0202499C; extern bool8 gAffineAnimsDisabled; extern u16 gMoveToLearn; extern const u8 gSpeciesNames[][11]; -extern u8 gBattleCommunication[]; #define sEvoCursorPos gBattleCommunication[1] // when learning a new move #define sEvoGraphicsTaskID gBattleCommunication[2] @@ -113,7 +111,7 @@ static const u16 sUnknown_085B5884[] = INCBIN_U16("graphics/evolution_scene/tran static const u8 Text_ShedinjaJapaneseName[] = _("ヌケニン"); -static const u8 sUnknown_085B58C9[][4] = +static const u8 sUnknown_085B58C9[][4] = { { 0x00, 0x0C, 0x01, 0x06 }, { 0x0D, 0x24, 0x05, 0x02 }, diff --git a/src/item_use.c b/src/item_use.c index bf9109dc85..9a40e0aa55 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -1,4 +1,5 @@ #include "global.h" +#include "item_use.h" #include "battle.h" #include "berry.h" #include "bike.h" @@ -28,7 +29,6 @@ #include "task.h" #include "text.h" -extern u16 gSpecialVar_ItemId; extern void(**gUnknown_0203CE54)(void); extern void(**gUnknown_0203CF2C)(void); extern void(*gUnknown_0203A0F4)(u8 taskId); @@ -88,14 +88,12 @@ extern void sub_80B7CC8(void); extern void flagmods_08054D70(void); extern u8* sub_806CF78(u16); extern bool8 ExecuteTableBasedItemEffect_(struct Pokemon*, u16, u8, u8); -extern u8 gBattlerInMenuId; -extern u16 gBattlerPartyIndexes[]; extern void sub_81B89F0(void); extern u8 GetItemEffectType(u16); extern struct MapConnection *sub_8088A8C(s16, s16); void MapPostLoadHook_UseItem(void); -extern void sub_80AF6D4(void); +void sub_80AF6D4(void); void Task_CallItemUseOnFieldCallback(u8 taskId); void bag_menu_inits_lists_menu(u8 taskId); void ItemUseOnFieldCB_Bike(u8 taskId); diff --git a/src/pokeball.c b/src/pokeball.c index ada0258db3..795a33827a 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -15,12 +15,6 @@ #include "util.h" #include "graphics.h" -extern bool8 gDoingBattleAnim; -extern u8 gActiveBattler; -extern u8 gBattlerTarget; -extern u16 gBattlerPartyIndexes[]; -extern u8 gBattlerSpriteIds[]; -extern u8 gHealthboxSpriteIds[]; extern struct MusicPlayerInfo gMPlayInfo_BGM; // this file's functions diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 4affd830d8..a1f422180c 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -20,6 +20,7 @@ #include "task.h" #include "text.h" #include "window.h" +#include "event_data.h" struct ContestMove { @@ -36,8 +37,6 @@ struct ContestEffect u8 jam; }; - - extern struct UnkSummaryStruct* gUnknown_0203CF1C; extern struct BgTemplate gUnknown_0861CBB4; extern u8 gUnknown_0203CF20; @@ -45,7 +44,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern s8 gUnknown_0861CC1C[]; extern u8 gUnknown_08329D22[]; extern u8 gUnknown_0203CF21; -extern u16 gSpecialVar_0x8005; extern struct UnkStruct_61CC04 gUnknown_0861CC04; extern struct UnkStruct_61CC04 gUnknown_0861CC10; extern struct UnkStruct_61CC04 gUnknown_0861CBEC; diff --git a/src/recorded_battle.c b/src/recorded_battle.c index fc576462be..f7febfa588 100644 --- a/src/recorded_battle.c +++ b/src/recorded_battle.c @@ -13,6 +13,7 @@ #include "util.h" #include "task.h" #include "text.h" +#include "battle_setup.h" #define BANK_RECORD_SIZE 664 #define ILLEGAL_BATTLE_TYPES ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \ @@ -21,15 +22,6 @@ | BATTLE_TYPE_RECORDED | BATTLE_TYPE_x4000000 | BATTLE_TYPE_SECRET_BASE \ | BATTLE_TYPE_GROUDON | BATTLE_TYPE_KYOGRE | BATTLE_TYPE_RAYQUAZA)) -extern u32 gBattleTypeFlags; -extern u16 gTrainerBattleOpponent_A; -extern u16 gTrainerBattleOpponent_B; -extern u16 gPartnerTrainerId; -extern u8 gActiveBattler; -extern u8 gBattlersCount; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT]; -extern u16 gChosenMoveByBattler[MAX_BATTLERS_COUNT]; extern u8 gUnknown_03001278; extern u8 gUnknown_03001279; diff --git a/src/reset_save_heap.c b/src/reset_save_heap.c index 099edce49a..9950f6691f 100644 --- a/src/reset_save_heap.c +++ b/src/reset_save_heap.c @@ -15,7 +15,7 @@ void sub_81700F8(void) imeBackup = REG_IME; REG_IME = 0; RegisterRamReset(0x00000001); - ClearGpuRegBits(REG_OFFSET_DISPCNT, 0x80); + ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_FORCED_BLANK); REG_IME = imeBackup; gMain.inBattle = FALSE; SetSaveBlocksPointers(sub_815355C()); diff --git a/src/reshow_battle_screen.c b/src/reshow_battle_screen.c index 71b544fdcd..1a7792e365 100644 --- a/src/reshow_battle_screen.c +++ b/src/reshow_battle_screen.c @@ -12,6 +12,7 @@ #include "sprite.h" #include "constants/species.h" #include "battle_interface.h" +#include "battle_anim.h" extern u16 gBattle_BG0_X; extern u16 gBattle_BG0_Y; @@ -21,28 +22,15 @@ extern u16 gBattle_BG2_X; extern u16 gBattle_BG2_Y; extern u16 gBattle_BG3_X; extern u16 gBattle_BG3_Y; -extern u8 gReservedSpritePaletteCount; -extern u8 gActionSelectionCursor[MAX_BATTLERS_COUNT]; -extern u8 gBattlerInMenuId; -extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; -extern u8 gBattlersCount; -extern u32 gBattleTypeFlags; -extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; -extern u8 gBattleMonForms[MAX_BATTLERS_COUNT]; -extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; extern struct SpriteTemplate gUnknown_0202499C; extern const union AnimCmd * const * const gMonAnimationsSpriteAnimsPtrTable[]; -extern void ScanlineEffect_Clear(void); extern void sub_8035658(void); -extern bool8 IsDoubleBattle(void); extern u8 GetSubstituteSpriteDefault_Y(u8 bank); -extern u8 GetBattlerSpriteDefault_Y(u8 bank); extern u8 sub_80A82E4(u8 bank); extern void sub_806A068(u16 species, u8 bankIdentity); extern void sub_806A12C(u16 backPicId, u8 bankIdentity); -extern u8 GetBattlerSpriteCoord(u8 bank, u8 caseId); // this file's functions static void CB2_ReshowBattleScreenAfterMenu(void); diff --git a/src/scrcmd.c b/src/scrcmd.c index 1768f0d4cb..b73ea2125d 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -64,13 +64,6 @@ static EWRAM_DATA u16 sMovingNpcMapBank = 0; static EWRAM_DATA u16 sMovingNpcMapId = 0; static EWRAM_DATA u16 sFieldEffectScriptId = 0; -extern u16 gSpecialVar_0x8000; -extern u16 gSpecialVar_0x8001; -extern u16 gSpecialVar_0x8002; -extern u16 gSpecialVar_0x8004; - -extern u16 gSpecialVar_Result; - extern u16 gSpecialVar_ContestCategory; IWRAM_DATA u8 gUnknown_03000F30;