get rid of unnecessary externs

This commit is contained in:
DizzyEggg 2018-02-08 00:00:25 +01:00
parent 1a32010f13
commit caf9af321d
32 changed files with 44 additions and 424 deletions

View File

@ -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];

View File

@ -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();

View File

@ -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

View File

@ -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[];

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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[];

View File

@ -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[];

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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[];

View File

@ -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;

View File

@ -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[];

View File

@ -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;

View File

@ -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];

View File

@ -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};

View File

@ -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 "<NAME>'s <ATTACK>!".
//
//
// gText_ExclamationMark2 was "を つかった!". This resulted in the translation
// "<NAME> used <ATTACK>!", 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 "<NAME>
// recovered itself!".
//
//
// gText_ExclamationMark4 was "を した!" This resulted in a translation of
// "<NAME> did an <ATTACK>!".
//
//
// gText_ExclamationMark5 was " こうげき!" This resulted in a translation of
// "<NAME>'s <ATTACK> attack!".
static void sub_814F950(u8* dst)

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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[];

View File

@ -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 },

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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());

View File

@ -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);

View File

@ -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;