summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-21 13:25:26 +0200
committerMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-22 01:05:20 +0200
commit6f2cd1e2da53cb0c4a4f4465d8ad72532050174d (patch)
tree1ba4f8d7c40de77de4d62cbb32a7b9666d5335da /src
parentd35dc5bd698b8e359669ac0e5bc74b2df0e58bd8 (diff)
Add data2 header
Diffstat (limited to 'src')
-rw-r--r--src/battle_2.c28
-rw-r--r--src/battle_ai.c3
-rw-r--r--src/battle_setup.c4
-rw-r--r--src/calculate_base_damage.c6
-rw-r--r--src/contest_painting.c13
-rw-r--r--src/credits.c14
-rw-r--r--src/decompress.c5
-rw-r--r--src/easy_chat.c3
-rw-r--r--src/intro.c20
-rw-r--r--src/item_use.c3
-rw-r--r--src/main_menu.c14
-rw-r--r--src/matsuda_debug_menu.c2
-rw-r--r--src/mori_debug_menu.c3
-rw-r--r--src/naming_screen.c2
-rw-r--r--src/party_menu.c2
-rw-r--r--src/pokedex.c1
-rw-r--r--src/pokemon_1.c2
-rw-r--r--src/pokemon_2.c6
-rw-r--r--src/pokemon_3.c6
-rw-r--r--src/pokemon_size_record.c2
-rw-r--r--src/pokenav.c3
-rw-r--r--src/rom3.c1
-rw-r--r--src/rom_8077ABC.c14
-rw-r--r--src/scrcmd.c4
-rw-r--r--src/script_pokemon_util_80C4BF0.c7
-rw-r--r--src/script_pokemon_util_80F99CC.c3
-rw-r--r--src/smokescreen.c4
-rw-r--r--src/starter_choose.c13
-rw-r--r--src/tv.c4
29 files changed, 41 insertions, 151 deletions
diff --git a/src/battle_2.c b/src/battle_2.c
index f2ce737d6..709fc5ad3 100644
--- a/src/battle_2.c
+++ b/src/battle_2.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "asm.h"
#include "battle.h"
+#include "data2.h"
#include "main.h"
#include "text.h"
#include "palette.h"
@@ -17,18 +18,6 @@
#include "trig.h"
#include "abilities.h"
-struct MonCoords
-{
- u8 x, y;
-};
-
-struct UnknownStruct5
-{
- u32 unk0;
- u32 unk4;
- u32 unk8;
-};
-
struct UnknownStruct6
{
u16 unk0[0xA0];
@@ -138,14 +127,7 @@ struct UnknownStruct13
u8 filler4[12];
};
-extern const struct UnknownStruct5 gUnknown_081F9674;
-extern const u8 gUnknown_081F96C8[];
-extern void *const gUnknown_081FAF4C[];
extern const u16 gUnknown_08D004E0[];
-extern const struct Trainer gTrainers[];
-extern const u8 gSpeciesNames[][11];
-extern const struct BattleMove gBattleMoves[];
-extern const struct MonCoords gMonFrontPicCoords[];
extern const struct MonCoords gCastformFrontSpriteCoords[];
extern const struct BaseStats gBaseStats[];
extern const u32 gBitTable[];
@@ -1524,19 +1506,19 @@ void sub_8010384(struct Sprite *sprite)
else
unownSpecies = NUM_SPECIES + unownForm; // Use one of the other Unown letters
- yOffset = gMonFrontPicCoords[unownSpecies].y;
+ yOffset = gMonFrontPicCoords[unownSpecies].y_offset;
}
else if (species == SPECIES_CASTFORM)
{
- yOffset = gCastformFrontSpriteCoords[gBattleMonForms[r6]].y;
+ yOffset = gCastformFrontSpriteCoords[gBattleMonForms[r6]].y_offset;
}
else if (species > NUM_SPECIES)
{
- yOffset = gMonFrontPicCoords[SPECIES_NONE].y;
+ yOffset = gMonFrontPicCoords[SPECIES_NONE].y_offset;
}
else
{
- yOffset = gMonFrontPicCoords[species].y;
+ yOffset = gMonFrontPicCoords[species].y_offset;
}
sprite->data3 = 8 - yOffset / 8;
diff --git a/src/battle_ai.c b/src/battle_ai.c
index 9bbaf908e..f10c6a013 100644
--- a/src/battle_ai.c
+++ b/src/battle_ai.c
@@ -4,6 +4,7 @@
#include "asm.h"
#include "battle.h"
#include "battle_move_effects.h"
+#include "data2.h"
#include "item.h"
#include "moves.h"
#include "pokemon.h"
@@ -36,8 +37,6 @@ extern u8 gCritMultiplier;
extern u16 gTrainerBattleOpponent;
extern u32 gBitTable[];
extern u8 *BattleAIs[];
-extern struct Trainer gTrainers[];
-extern struct BattleMove gBattleMoves[];
extern struct BaseStats gBaseStats[];
/*
diff --git a/src/battle_setup.c b/src/battle_setup.c
index 61b9bb1e9..a70157a43 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -2,6 +2,7 @@
#include "battle_setup.h"
#include "asm.h"
#include "battle.h"
+#include "data2.h"
#include "event_data.h"
#include "field_control_avatar.h"
#include "field_map_obj_helpers.h"
@@ -34,7 +35,6 @@ extern void (*gUnknown_0300485C)(void);
extern struct Pokemon gEnemyParty[];
extern struct Pokemon gPlayerParty[];
-extern struct Trainer gTrainers[];
EWRAM_DATA u16 gTrainerBattleMode = 0;
EWRAM_DATA u16 gTrainerBattleOpponent = 0;
@@ -752,7 +752,7 @@ u8 GetWildBattleTransition(void)
u8 GetTrainerBattleTransition(void)
{
- struct Trainer *trainer;
+ const struct Trainer *trainer;
u8 minPartyCount;
u8 flashVar;
u8 level;
diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c
index 45dc59094..7868a2c67 100644
--- a/src/calculate_base_damage.c
+++ b/src/calculate_base_damage.c
@@ -2,6 +2,7 @@
#include "abilities.h"
#include "battle.h"
#include "berry.h"
+#include "data2.h"
#include "event_data.h"
#include "hold_effects.h"
#include "item.h"
@@ -37,12 +38,7 @@ extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
extern u32 gBitTable[];
extern struct BaseStats gBaseStats[];
-extern u8 gSpeciesNames[][11];
-extern struct BattleMove gBattleMoves[];
extern struct SpriteTemplate gSpriteTemplate_8208288[];
-extern union AmimCmd *gSpriteAnimTable_81E7C64[];
-extern union AnimCmd **gUnknown_081EC2A4[];
-extern union AnimCmd **gUnknown_081ECACC[];
extern u8 gTrainerClassToPicIndex[];
extern u8 gTrainerClassToNameIndex[];
extern u8 gSecretBaseTrainerClasses[];
diff --git a/src/contest_painting.c b/src/contest_painting.c
index c970deaf2..d7bacb905 100644
--- a/src/contest_painting.c
+++ b/src/contest_painting.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "contest_painting.h"
#include "asm.h"
+#include "data2.h"
#include "decompress.h"
#include "main.h"
#include "menu.h"
@@ -24,11 +25,6 @@ extern struct Unk2015E00 unk_2015e00;
extern struct Unk3000756 gUnknown_03000756;
extern struct Unk03005E20 gUnknown_03005E20;
extern struct ContestEntry *gUnknown_03005E8C;
-extern const struct SpriteSheet gMonFrontPicTable[];
-extern const struct MonCoords gMonFrontPicCoords[];
-extern const struct SpriteSheet gMonBackPicTable[];
-extern const struct MonCoords gMonBackPicCoords[];
-extern void *gUnknown_081FAF4C[];
static const u16 gPictureFramePalettes[][16] =
{
@@ -345,13 +341,6 @@ static void VBlankCB_ContestPainting(void)
TransferPlttBuffer();
}
-
-struct MonCoords
-{
- u8 x;
- u8 y;
-};
-
#ifdef NONMATCHING
static void sub_8106AC4(u16 species, u8 arg1)
{
diff --git a/src/credits.c b/src/credits.c
index ca5553c2e..de1d52361 100644
--- a/src/credits.c
+++ b/src/credits.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "asm.h"
+#include "data2.h"
#include "decompress.h"
#include "event_data.h"
#include "m4a.h"
@@ -20,11 +21,6 @@ asm(".set OFFSET_REG_BLDALPHA, 0x52");
asm(".set REG_BLDCNT, REG_BASE + OFFSET_REG_BLDCNT");
asm(".set REG_BLDALPHA, REG_BASE + OFFSET_REG_BLDALPHA");
-struct MonCoords
-{
- u8 x, y;
-};
-
extern void *species_and_otid_get_pal(u32, u16, u16);
enum
@@ -173,10 +169,6 @@ extern s16 gUnknown_0203935C;
extern u8 gReservedSpritePaletteCount;
-// data/data2
-extern struct MonCoords gMonFrontPicCoords[];
-extern struct SpriteSheet gMonFrontPicTable[];
-
// data/starter_choose
extern u16 gBirchBagGrassPal[32];
extern u8 gBirchGrassTilemap[];
@@ -1520,8 +1512,8 @@ static u8 sub_81456B4(u16 species, u16 x, u16 y, u16 position)
LoadSpecialPokePic(
&gMonFrontPicTable[species],
- gMonFrontPicCoords[species].x,
- gMonFrontPicCoords[species].y,
+ gMonFrontPicCoords[species].coords,
+ gMonFrontPicCoords[species].y_offset,
0x2000000,
gUnknown_0840B5A0[position],
species,
diff --git a/src/decompress.c b/src/decompress.c
index 12be8a055..37aa1e8d5 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -1,15 +1,12 @@
#include "global.h"
#include "decompress.h"
#include "asm.h"
+#include "data2.h"
#include "species.h"
#include "text.h"
#define WRAM 0x02000000
-extern struct SpriteSheet gMonFrontPicTable[];
-extern struct SpriteSheet gMonBackPicTable[];
-extern void *gUnknown_081FAF4C[];
-
void sub_800D238(const void *src, void *dest)
{
LZ77UnCompWram(src, dest);
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 678b25a0e..b21b00368 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "easy_chat.h"
#include "asm.h"
+#include "data2.h"
#include "event_data.h"
#include "field_message_box.h"
#include "pokedex.h"
@@ -22,8 +23,6 @@ static u16 sub_80EB9D8(void);
static u16 sub_80EB960(void);
u16 sub_80EB72C(u16);
-extern const u8 gSpeciesNames[][11];
-extern u8 gMoveNames[][13];
extern void *gEasyChatGroupWords[];
extern const u8 gEasyChatGroupSizes[];
diff --git a/src/intro.c b/src/intro.c
index 2a62892ba..ad2f6213c 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -2,6 +2,7 @@
#include "gba/m4a_internal.h"
#include "intro.h"
#include "asm.h"
+#include "data2.h"
#include "decompress.h"
#include "libgncmultiboot.h"
#include "link.h"
@@ -21,12 +22,6 @@
extern void *species_and_otid_get_pal(/*TODO: arg types*/);
extern void sub_8143680(int, u8);
-struct MonCoords
-{
- u8 x, y;
-};
-
-
extern struct SpriteTemplate gUnknown_02024E8C;
extern u16 gUnknown_02039318;
extern u16 gUnknown_0203931A;
@@ -36,13 +31,6 @@ extern u32 gIntroFrameCounter;
extern struct GcmbStruct gMultibootProgramStruct;
extern u16 gSaveFileStatus;
extern u8 gReservedSpritePaletteCount;
-extern struct SpriteSheet gMonFrontPicTable[];
-extern struct MonCoords gMonFrontPicCoords[];
-extern struct SpriteSheet gMonBackPicTable[];
-extern struct MonCoords gMonBackPicCoords[];
-extern struct SpriteSheet gTrainerBackPicTable[];
-extern struct MonCoords gTrainerBackPicCoords[];
-extern struct SpritePalette gTrainerBackPicPaletteTable[];
extern const u8 gInterfaceGfx_PokeBall[];
extern const u16 gInterfacePal_PokeBall[];
extern const struct SpriteSheet gIntro2BrendanSpriteSheet;
@@ -1797,9 +1785,9 @@ static u16 sub_813CE88(u16 species, s16 x, s16 y, u16 d, u8 front)
u8 spriteId;
if (front)
- LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].x, gMonFrontPicCoords[species].y, 0x2000000, gUnknown_0840B5A0[d], species, 0, 1);
+ LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 1);
else
- LoadSpecialPokePic(&gMonBackPicTable[species], gMonBackPicCoords[species].x, gMonBackPicCoords[species].y, 0x2000000, gUnknown_0840B5A0[d], species, 0, 0);
+ LoadSpecialPokePic(&gMonBackPicTable[species], gMonBackPicCoords[species].coords, gMonBackPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 0);
pal = species_and_otid_get_pal(species, 0, 0xFFFF);
LoadCompressedPalette(pal, 0x100 + d * 0x10, 0x20);
sub_8143648(d, d);
@@ -1813,7 +1801,7 @@ static u8 sub_813CFA8(u16 a, u16 b, u16 c, u16 d)
{
u8 spriteId;
- DecompressPicFromTable_2(&gTrainerBackPicTable[a], gTrainerBackPicCoords[a].x, gTrainerBackPicCoords[a].y, (void *)0x2000000, gUnknown_0840B5A0[d], a);
+ DecompressPicFromTable_2(&gTrainerBackPicTable[a], gTrainerBackPicCoords[a].coords, gTrainerBackPicCoords[a].y_offset, (void *)0x2000000, gUnknown_0840B5A0[d], a);
LoadCompressedPalette(gTrainerBackPicPaletteTable[a].data, 0x100 + d * 0x10, 0x20);
sub_8143680(d, d);
gUnknown_02024E8C.anims = gUnknown_0840B064;
diff --git a/src/item_use.c b/src/item_use.c
index a310df2ce..b65c24c31 100644
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -3,6 +3,7 @@
#include "battle.h"
#include "berry.h"
#include "coins.h"
+#include "data2.h"
#include "event_data.h"
#include "field_map_obj_helpers.h"
#include "field_player_avatar.h"
@@ -30,8 +31,6 @@ extern void (* gUnknown_03005D00)(u8);
extern void (* gUnknown_0300485C)(void);
extern void (* gUnknown_03004AE4)(u8);
-extern u8 gMoveNames[][13];
-
extern u8 gUnknown_02038561;
extern u8 gLastFieldPokeMenuOpened;
extern u8 gUnknown_02024E6C;
diff --git a/src/main_menu.c b/src/main_menu.c
index e5ab0c822..b2d08698b 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "main_menu.h"
#include "asm.h"
+#include "data2.h"
#include "decompress.h"
#include "event_data.h"
#include "menu.h"
@@ -22,11 +23,6 @@
#define BirchSpeechUpdateWindowText() ((u8)MenuUpdateWindowText_OverrideLineLength(24))
-struct MonCoords
-{
- u8 x, y;
-};
-
extern struct PaletteFadeControl gPaletteFade;
extern u16 gSaveFileStatus;
@@ -43,11 +39,7 @@ extern u8 gBirchSpeech_SoItsPlayer[];
extern u8 gBirchSpeech_AhOkayYouArePlayer[];
extern u8 gBirchSpeech_AreYouReady[];
-extern const struct MonCoords gMonFrontPicCoords[];
-extern const struct SpriteSheet gMonFrontPicTable[];
-extern const struct SpritePalette gMonPaletteTable[];
extern struct SpriteTemplate gUnknown_02024E8C;
-extern void * const gUnknown_081FAF4C[];
extern u16 gUnknown_081E795C[];
extern const struct MenuAction gUnknown_081E79B0[];
extern const struct MenuAction gMalePresetNames[];
@@ -1400,8 +1392,8 @@ u8 CreateAzurillSprite(u8 x, u8 y)
{
DecompressPicFromTable_2(
&gMonFrontPicTable[SPECIES_AZURILL],
- gMonFrontPicCoords[SPECIES_AZURILL].x,
- gMonFrontPicCoords[SPECIES_AZURILL].y,
+ gMonFrontPicCoords[SPECIES_AZURILL].coords,
+ gMonFrontPicCoords[SPECIES_AZURILL].y_offset,
gUnknown_081FAF4C[0],
gUnknown_081FAF4C[1],
SPECIES_AZURILL);
diff --git a/src/matsuda_debug_menu.c b/src/matsuda_debug_menu.c
index d2ca754bb..588d32795 100644
--- a/src/matsuda_debug_menu.c
+++ b/src/matsuda_debug_menu.c
@@ -2,6 +2,7 @@
#include "matsuda_debug_menu.h"
#include "asm.h"
#include "contest.h"
+#include "data2.h"
#include "link.h"
#include "main.h"
#include "menu.h"
@@ -55,7 +56,6 @@ extern struct SpriteTemplate gSpriteTemplate_83C92CC;
extern void (*gUnknown_083C92E4[][2])(struct Sprite *, s8);
extern u32 gUnknown_083C9400[2];
-extern u8 gMoveNames[][13];
extern u8 gMatsudaDebugMenu_UnknownByteArray[];
extern u8* gMatsudaDebugMenuTextList1[];
diff --git a/src/mori_debug_menu.c b/src/mori_debug_menu.c
index fd0ad773b..18c65b7e6 100644
--- a/src/mori_debug_menu.c
+++ b/src/mori_debug_menu.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "mori_debug_menu.h"
#include "asm.h"
+#include "data2.h"
#include "link.h"
#include "main.h"
#include "menu.h"
@@ -20,8 +21,6 @@ extern u8 gUnknown_0839B257[];
extern const struct MenuAction gMoriDebugMenuActions[];
-extern u8 gSpeciesNames[][11];
-
void unref_sub_8083CF0(void)
{
int i;
diff --git a/src/naming_screen.c b/src/naming_screen.c
index 8c90686ee..53ee5ff19 100644
--- a/src/naming_screen.c
+++ b/src/naming_screen.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "naming_screen.h"
#include "asm.h"
+#include "data2.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
@@ -56,7 +57,6 @@ extern const u16 gUnknown_083CE748[];
extern const u16 gUnknown_083CEBF8[];
extern const u16 gUnknown_083CF0A8[];
extern const u16 gUnknown_08E86258[];
-extern const u8 gSpeciesNames[][11];
static void C2_NamingScreen(void);
static void sub_80B5AA0(void);
diff --git a/src/party_menu.c b/src/party_menu.c
index 82f234ae4..ee6bcf2a9 100644
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "asm.h"
+#include "data2.h"
#include "menu.h"
#include "pokemon.h"
#include "songs.h"
@@ -87,7 +88,6 @@ extern const u16 gUnknown_08376504[];
extern void (*const gUnknown_08376B54[])(u8);
extern const u8 *const gUnknown_08376D04[DATA_COUNT];
extern const struct UnknownStruct5 gUnknown_08376BB4[][6];
-extern const u8 gMoveNames[][13];
extern const u8 *const gItemEffectTable[];
extern bool8 IsDoubleBattle(void);
diff --git a/src/pokedex.c b/src/pokedex.c
index 057fa2d49..467782d84 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -103,7 +103,6 @@ extern u16 NationalToHoennOrder(u16);
extern u16 gPokedexOrder_Alphabetical[];
extern u16 gPokedexOrder_Weight[];
extern u16 gPokedexOrder_Height[];
-extern u8 gSpeciesNames[][11];
u16 NationalPokedexNumToSpecies(u16);
diff --git a/src/pokemon_1.c b/src/pokemon_1.c
index 204fa7b9a..dacbb81c3 100644
--- a/src/pokemon_1.c
+++ b/src/pokemon_1.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "asm.h"
+#include "data2.h"
#include "items.h"
#include "main.h"
#include "pokemon.h"
@@ -25,7 +26,6 @@ extern u8 byte_2024E88;
extern u32 gExperienceTables[8][101];
extern struct BaseStats gBaseStats[];
-extern struct BattleMove gBattleMoves[];
extern const u16 *gLevelUpLearnsets[];
void ZeroBoxMonData(struct BoxPokemon *boxMon)
diff --git a/src/pokemon_2.c b/src/pokemon_2.c
index 54efc0fc8..27f27cf02 100644
--- a/src/pokemon_2.c
+++ b/src/pokemon_2.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "asm.h"
+#include "data2.h"
#include "event_data.h"
#include "main.h"
#include "pokemon.h"
@@ -37,13 +38,8 @@ extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
extern u32 gBitTable[];
extern struct BaseStats gBaseStats[];
-extern u8 gSpeciesNames[][11];
-extern struct BattleMove gBattleMoves[];
extern const struct SpriteTemplate gSpriteTemplate_8208288[];
-extern const union AmimCmd *const gSpriteAnimTable_81E7C64[];
//array of pointers to arrays of pointers to union AnimCmd (We probably need to typedef this.)
-extern const union AnimCmd *const *const gUnknown_081EC2A4[];
-extern const union AnimCmd *const *const gUnknown_081ECACC[];
extern u8 gTrainerClassToPicIndex[];
extern u8 gTrainerClassToNameIndex[];
extern u8 gSecretBaseTrainerClasses[];
diff --git a/src/pokemon_3.c b/src/pokemon_3.c
index 270a52ad5..e6d803f3f 100644
--- a/src/pokemon_3.c
+++ b/src/pokemon_3.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "asm.h"
#include "battle.h"
+#include "data2.h"
#include "event_data.h"
#include "hold_effects.h"
#include "item.h"
@@ -74,9 +75,6 @@ extern u8 gEnemyMonIndex;
extern u8 gUnknown_02024C0B;
extern u8 gUnknown_02024E6C;
extern struct SpindaSpot gSpindaSpotGraphics[];
-extern void *gUnknown_081FAF4C[];
-extern u8 gSpeciesNames[][11];
-extern struct Trainer gTrainers[];
extern s8 gNatureStatTable[][5];
extern s8 gUnknown_082082FE[][3];
extern u16 gTrainerBattleOpponent;
@@ -88,8 +86,6 @@ extern u32 gTMHMLearnsets[][2];
extern const u16 *gLevelUpLearnsets[];
extern u8 gBattleMonForms[];
extern const u8 BattleText_Wally[];
-extern const struct SpritePalette gMonPaletteTable[];
-extern const struct SpritePalette gMonShinyPaletteTable[];
extern const u16 gHMMoves[];
extern s8 gUnknown_083F7E28[];
extern u8 byte_2024C06;
diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c
index 3406a818b..b2f8a1569 100644
--- a/src/pokemon_size_record.c
+++ b/src/pokemon_size_record.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "pokemon_size_record.h"
+#include "data2.h"
#include "event_data.h"
#include "species.h"
#include "string_util.h"
@@ -17,7 +18,6 @@ struct UnknownStruct
};
extern u16 gScriptResult;
-extern u8 gSpeciesNames[][11];
static const struct UnknownStruct sBigMonSizeTable[] =
{
diff --git a/src/pokenav.c b/src/pokenav.c
index 60e7c73e1..f50f039f8 100644
--- a/src/pokenav.c
+++ b/src/pokenav.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
+#include "data2.h"
#include "string_util.h"
struct UnkPokenavStruct_Sub {
@@ -17,8 +18,6 @@ struct UnkPokenavStruct {
extern struct UnkPokenavStruct *gUnknown_083DFEC4;
-extern const struct Trainer gTrainers[];
-extern const u8 gTrainerClassNames[][13];
void sub_80F700C(u8 *arg0, u16 arg1) {
struct Trainer *trainer;
diff --git a/src/rom3.c b/src/rom3.c
index ef7b9a7ed..be6ae0b27 100644
--- a/src/rom3.c
+++ b/src/rom3.c
@@ -15,7 +15,6 @@ extern u8 unk_2000000[];
extern u16 gBattleTypeFlags;
extern const u32 gBitTable[];
extern u16 gBattleWeather;
-extern const struct BattleMove gBattleMoves[];
extern struct BattlePokemon gBattleMons[];
extern u8 gUnknown_020238C4;
diff --git a/src/rom_8077ABC.c b/src/rom_8077ABC.c
index 437c62400..9561db690 100644
--- a/src/rom_8077ABC.c
+++ b/src/rom_8077ABC.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "battle.h"
#include "blend_palette.h"
+#include "data2.h"
#include "decompress.h"
#include "palette.h"
#include "species.h"
@@ -40,13 +41,6 @@ struct TransformStatus {
u16 species;
};
-struct MonCoords {
- // This would use a bitfield, but sub_8079F44
- // uses it as a u8 and casting won't match.
- u8 coords; // u8 x:4, y:4;
- u8 y_offset;
-};
-
struct Struct_gUnknown_0837F578 {
u8 field_0;
u8 field_1;
@@ -101,11 +95,8 @@ extern struct Struct_unk_2019348 unk_2019348;
extern struct TransformStatus gTransformStatuses[];
extern u16 gBattleMonPartyPositions[];
extern u16 gBattleTypeFlags;
-extern struct MonCoords gMonBackPicCoords[];
-extern struct MonCoords gMonFrontPicCoords[];
extern u32 gTransformPersonalities[NUM_BATTLE_SLOTS];
extern u8 gBattleMonForms[NUM_BATTLE_SLOTS];
-extern u8 gEnemyMonElevation[];
extern u16 gUnknown_0202F7CA[];
extern u8 gBattleMonSprites[NUM_BATTLE_SLOTS];
extern u8 gBattleAnimPlayerMonIndex;
@@ -116,9 +107,6 @@ extern u8 gUnknown_02024A68; // gNumBattleMons?
extern struct OamMatrix gOamMatrices[];
extern struct Struct_2017810 unk_2017810[];
extern u8 gUnknown_0202F7BE;
-extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E7C18;
-extern struct SpriteSheet gMonFrontPicTable[];
-extern struct SpriteSheet gMonBackPicTable[];
extern u8 IsContest();
extern bool8 sub_8078874(u8);
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 136181bd3..33867b58a 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -6,6 +6,7 @@
#include "clock.h"
#include "coins.h"
#include "contest_painting.h"
+#include "data2.h"
#include "decoration.h"
#include "event_data.h"
#include "field_door.h"
@@ -59,9 +60,6 @@ extern SpecialFunc gSpecials[];
extern u8 *gStdScripts[];
extern u8 *gStdScripts_End[];
-extern u8 gSpeciesNames[][11];
-extern u8 gMoveNames[][13];
-
extern u8 * const gUnknown_083CE048[];
extern struct Decoration gDecorations[];
diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c
index 912458655..54a48b84e 100644
--- a/src/script_pokemon_util_80C4BF0.c
+++ b/src/script_pokemon_util_80C4BF0.c
@@ -3,6 +3,7 @@
#include "battle.h"
#include "berry.h"
#include "contest.h"
+#include "data2.h"
#include "decompress.h"
#include "event_data.h"
#include "items.h"
@@ -21,9 +22,6 @@
#define CONTEST_ENTRY_PIC_LEFT 10
#define CONTEST_ENTRY_PIC_TOP 3
-extern const struct SpriteSheet gMonFrontPicTable[];
-extern struct MonCoords gMonFrontPicCoords[];
-
extern void sub_80C46EC(void);
extern void sub_80C4740(void);
extern void sub_80C48F4(void);
@@ -35,7 +33,6 @@ extern void sub_8042044(struct Pokemon *mon, u16, u8);
extern void sub_8121E10(void);
extern void sub_8121E34(void);
-extern void *gUnknown_081FAF4C[];
extern struct SpriteTemplate gUnknown_02024E8C;
extern struct SpritePalette *sub_80409C8(u16, u32, u32);
@@ -437,7 +434,7 @@ void ShowContestEntryMonPic(void)
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = species;
HandleLoadSpecialPokePic((struct SpriteSheet *)&gMonFrontPicTable[species].data,
- gMonFrontPicCoords[species].x, gMonFrontPicCoords[species].y,
+ gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset,
(u32)gUnknown_081FAF4C[0], gUnknown_081FAF4C[1], species, var1);
paletteData = sub_80409C8(species, var2, var1);
LoadCompressedObjectPalette(paletteData);
diff --git a/src/script_pokemon_util_80F99CC.c b/src/script_pokemon_util_80F99CC.c
index ce62f2abb..02c0bad20 100644
--- a/src/script_pokemon_util_80F99CC.c
+++ b/src/script_pokemon_util_80F99CC.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "asm.h"
#include "battle_party_menu.h"
+#include "data2.h"
#include "palette.h"
#include "pokemon.h"
#include "rom4.h"
@@ -17,8 +18,6 @@ extern u16 gSpecialVar_0x8005;
extern u8 gUnknown_02038694;
extern u16 gScriptResult;
-extern u8 gMoveNames[][13];
-
extern void (*gUnknown_0300485C)(void);
extern void OpenPartyMenu(u8, u8);
diff --git a/src/smokescreen.c b/src/smokescreen.c
index 1d3a14a5b..0406c1cb3 100644
--- a/src/smokescreen.c
+++ b/src/smokescreen.c
@@ -1,4 +1,5 @@
#include "global.h"
+#include "data2.h"
#include "decompress.h"
#include "sprite.h"
@@ -6,9 +7,6 @@ extern u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *));
static void sub_8046388(struct Sprite *);
-extern struct SpriteSheet gUnknown_081FAEA4;
-extern struct SpritePalette gUnknown_081FAEAC;
-extern const struct SpriteTemplate gSpriteTemplate_81FAF0C;
u8 sub_8046234(s16 x, s16 y, u8 a3)
{
diff --git a/src/starter_choose.c b/src/starter_choose.c
index 358fe8fca..957342248 100644
--- a/src/starter_choose.c
+++ b/src/starter_choose.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "starter_choose.h"
#include "asm.h"
+#include "data2.h"
#include "decompress.h"
#include "main.h"
#include "menu.h"
@@ -15,17 +16,7 @@
#include "task.h"
#include "trig.h"
-struct MonCoords
-{
- u8 x, y;
-};
-
-extern void * const gUnknown_081FAF4C[];
extern u16 gScriptResult;
-extern const u8 gSpeciesNames[][11];
-extern const struct SpriteSheet gMonFrontPicTable[];
-extern const struct MonCoords gMonFrontPicCoords[];
-extern const struct SpritePalette gMonPaletteTable[];
extern struct SpriteTemplate gUnknown_02024E8C;
//--------------------------------------------------
@@ -565,7 +556,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y)
DecompressPicFromTable_2(
&gMonFrontPicTable[species],
- gMonFrontPicCoords[species].x, gMonFrontPicCoords[species].y,
+ gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset,
gUnknown_081FAF4C[0], gUnknown_081FAF4C[1],
species);
LoadCompressedObjectPalette(&gMonPaletteTable[species]);
diff --git a/src/tv.c b/src/tv.c
index ea1f13047..51fb2e971 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "asm.h"
#include "tv.h"
+#include "data2.h"
#include "event_data.h"
#include "field_message_box.h"
#include "flags.h"
@@ -69,9 +70,6 @@ extern u8 gUnknown_020387E8;
extern struct UnkTvStruct gUnknown_03005D38;
-extern u8 gSpeciesNames[][11];
-extern u8 gMoveNames[][13];
-
extern u8 *gTVBravoTrainerTextGroup[];
extern u8 *gTVBravoTrainerBattleTowerTextGroup[];
extern u8 *gTVSmartShopperTextGroup[];