summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-05-23 21:21:59 -0400
committerGitHub <noreply@github.com>2017-05-23 21:21:59 -0400
commit9640df02dd8651d5b05cf3767f6c7e16a697db3b (patch)
treedf7fed98e02c4113507f6994e615b8f8074dd69e /src
parent21ffe2fa910ede21f0f18a3013ed8ba29c70011e (diff)
parent3f7d0a195afd90c182cd631e14f5acb5d29be34b (diff)
Merge pull request #303 from marijnvdwerf/clean/includes
Clean/includes
Diffstat (limited to 'src')
-rw-r--r--src/battle_2.c28
-rw-r--r--src/battle_ai.c3
-rw-r--r--src/battle_party_menu.c11
-rw-r--r--src/battle_records.c4
-rw-r--r--src/battle_setup.c13
-rw-r--r--src/berry_tag_screen.c5
-rw-r--r--src/calculate_base_damage.c8
-rw-r--r--src/clear_save_data_menu.c3
-rw-r--r--src/coins.c3
-rw-r--r--src/contest_painting.c51
-rw-r--r--src/credits.c14
-rw-r--r--src/decompress.c5
-rw-r--r--src/diploma.c5
-rw-r--r--src/easy_chat.c6
-rw-r--r--src/field_player_avatar.c6
-rw-r--r--src/field_region_map.c3
-rw-r--r--src/intro.c21
-rw-r--r--src/item.c2
-rw-r--r--src/item_use.c21
-rw-r--r--src/link.c3
-rw-r--r--src/mail.c3
-rw-r--r--src/main_menu.c38
-rw-r--r--src/matsuda_debug_menu.c2
-rw-r--r--src/mauville_old_man.c3
-rw-r--r--src/menu.c12
-rw-r--r--src/mori_debug_menu.c3
-rw-r--r--src/mystery_event_menu.c8
-rw-r--r--src/naming_screen.c7
-rw-r--r--src/option_menu.c25
-rw-r--r--src/party_menu.c47
-rw-r--r--src/player_pc.c9
-rw-r--r--src/pokedex.c10
-rw-r--r--src/pokemon_1.c2
-rw-r--r--src/pokemon_2.c8
-rw-r--r--src/pokemon_3.c6
-rw-r--r--src/pokemon_size_record.c4
-rw-r--r--src/pokemon_summary_screen.c13
-rw-r--r--src/pokenav.c3
-rw-r--r--src/record_mixing.c3
-rw-r--r--src/rom3.c1
-rw-r--r--src/rom_8077ABC.c14
-rw-r--r--src/save_failed_screen.c8
-rw-r--r--src/save_menu_util.c6
-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/shop.c5
-rw-r--r--src/smokescreen.c4
-rw-r--r--src/start_menu.c19
-rw-r--r--src/starter_choose.c17
-rw-r--r--src/string_util.c29
-rw-r--r--src/trainer_card.c13
-rw-r--r--src/trig.c1
-rw-r--r--src/tv.c4
-rw-r--r--src/wallclock.c2
55 files changed, 105 insertions, 453 deletions
diff --git a/src/battle_2.c b/src/battle_2.c
index 12fd4182d..6bcccbaf9 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_party_menu.c b/src/battle_party_menu.c
index 690ef99be..359517ecd 100644
--- a/src/battle_party_menu.c
+++ b/src/battle_party_menu.c
@@ -8,6 +8,7 @@
#include "songs.h"
#include "sound.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
@@ -58,16 +59,6 @@ extern u8 gUnknown_0202E8F6;
extern u8 gUnknown_02038473;
extern u8 gUnknown_020384F0;
extern void (*gUnknown_03004AE4)(); //don't know types yet
-extern const u8 gOtherText_CantSwitchPokeWithYours[];
-extern const u8 gOtherText_NoEnergyLeft[];
-extern const u8 gOtherText_EGGCantBattle[];
-extern const u8 gOtherText_AlreadySelected[];
-extern const u8 gOtherText_CantBeSwitched[];
-extern const u8 gOtherText_AlreadyBattle[];
-extern const u8 OtherText_Summary[];
-extern const u8 gOtherText_CancelNoTerminator[];
-extern const u8 OtherText_Shift[];
-extern const u8 OtherText_SendOut[];
static void Task_809527C(u8);
static void Task_80952B4(u8);
diff --git a/src/battle_records.c b/src/battle_records.c
index 3290bbebe..35fd3284b 100644
--- a/src/battle_records.c
+++ b/src/battle_records.c
@@ -1,8 +1,6 @@
#include "global.h"
#include "menu.h"
-
-extern const u8 gOtherText_BattleResults[];
-extern const u8 gOtherText_WinLoseDraw[];
+#include "strings2.h"
void PrintLinkBattleWinsLossesDraws(void *);
diff --git a/src/battle_setup.c b/src/battle_setup.c
index 0753fba70..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"
@@ -23,6 +24,7 @@
#include "species.h"
#include "starter_choose.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
#include "trainer.h"
@@ -33,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;
@@ -45,8 +46,6 @@ EWRAM_DATA u8 *gTrainerCannotBattleSpeech = NULL;
EWRAM_DATA u8 *gTrainerBattleScriptReturnAddress = NULL;
EWRAM_DATA u8 *gTrainerBattleEndScript = NULL;
-extern u8 gOtherText_CancelWithTerminator[];
-
extern u16 gBattleTypeFlags;
extern u16 gScriptLastTalked;
extern u8 gUnknown_02024D26;
@@ -753,7 +752,7 @@ u8 GetWildBattleTransition(void)
u8 GetTrainerBattleTransition(void)
{
- struct Trainer *trainer;
+ const struct Trainer *trainer;
u8 minPartyCount;
u8 flashVar;
u8 level;
@@ -1169,12 +1168,12 @@ void PlayTrainerEncounterMusic(void)
}
//Returns an empty string if a null pointer was passed, otherwise returns str
-u8 *SanitizeString(u8 *str)
+u8 *SanitizeString(const u8 *str)
{
if (str)
- return str;
+ return (u8 *) str;
else
- return gOtherText_CancelWithTerminator;
+ return (u8 *) gOtherText_CancelWithTerminator;
}
u8 *sub_808281C(void)
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 511b88c5a..f0bcb4f27 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -12,6 +12,7 @@
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
@@ -38,10 +39,6 @@ extern u16 gUnknown_030041B4;
extern const struct SpriteSheet gUnknown_083C1F74;
extern const struct SpritePalette gUnknown_083C1F7C;
-extern u8 gOtherText_ThreeQuestions2[];
-extern u8 gOtherText_Size[];
-extern u8 gOtherText_Firm[];
-extern u8 gContestStatsText_Unknown1[];
extern u8 *gUnknown_0841192C[];
extern u8 gBerryCheck_Gfx[];
diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c
index 293e2f24d..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"
@@ -11,6 +12,7 @@
#include "species.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "text.h"
extern u8 gPlayerPartyCount;
@@ -34,15 +36,9 @@ extern u16 gTrainerBattleOpponent;
extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
-extern u8 gEggNickname[];
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/clear_save_data_menu.c b/src/clear_save_data_menu.c
index c519e1a30..690ce3f55 100644
--- a/src/clear_save_data_menu.c
+++ b/src/clear_save_data_menu.c
@@ -7,10 +7,9 @@
#include "songs.h"
#include "sound.h"
#include "sprite.h"
+#include "strings2.h"
#include "task.h"
-extern u8 gSystemText_ClearAllSaveDataPrompt[];
-extern u8 gSystemText_ClearingData[];
extern const struct MenuAction gMenuYesNoItems[];
static void VBlankCB_ClearSaveDataScreen(void);
diff --git a/src/coins.c b/src/coins.c
index 193ea249e..3c6356612 100644
--- a/src/coins.c
+++ b/src/coins.c
@@ -2,11 +2,10 @@
#include "coins.h"
#include "menu.h"
#include "string_util.h"
+#include "strings.h"
#define MAX_COINS 9999
-extern u8 gOtherText_Coins2[];
-
void UpdateCoinsWindow(s32 a, u8 b, u8 c)
{
PrintCoins(a, 4, b + 2, c + 1);
diff --git a/src/contest_painting.c b/src/contest_painting.c
index 2ef50ee17..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"
@@ -8,6 +9,7 @@
#include "rng.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings.h"
#include "text.h"
extern u8 unk_2000000[];
@@ -23,48 +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[];
-extern const u8 OtherText_Cool[];
-extern const u8 OtherText_Beauty2[];
-extern const u8 OtherText_Cute[];
-extern const u8 OtherText_Smart[];
-extern const u8 OtherText_Tough[];
-extern const u8 OtherText_NonstopSuperCool[];
-extern const u8 OtherText_Terminator6[];
-extern const u8 OtherText_GoodLookingPoke[];
-extern const u8 OtherText_Terminator7[];
-extern const u8 OtherText_MarvelousGreat[];
-extern const u8 OtherText_Terminator8[];
-extern const u8 OtherText_CenturyLastVenus[];
-extern const u8 OtherText_Terminator9[];
-extern const u8 OtherText_Terminator10[];
-extern const u8 OtherText_DazzlingSmile[];
-extern const u8 OtherText_PokeCenterIdol[];
-extern const u8 OtherText_Terminator11[];
-extern const u8 OtherText_LovelyAndSweet[];
-extern const u8 OtherText_Terminator12[];
-extern const u8 OtherText_ThePretty[];
-extern const u8 OtherText_WinningPortrait[];
-extern const u8 OtherText_GiveUsWink[];
-extern const u8 OtherText_Terminator13[];
-extern const u8 OtherText_SmartnessMaestro[];
-extern const u8 OtherText_Terminator14[];
-extern const u8 OtherText_ChosenPokeAmong[];
-extern const u8 OtherText_Terminator15[];
-extern const u8 OtherText_TheExcellent[];
-extern const u8 OtherText_ItsMomentOfElegance[];
-extern const u8 OtherText_PowerfullyMuscular[];
-extern const u8 OtherText_Terminator16[];
-extern const u8 OtherText_StrongErEst[];
-extern const u8 OtherText_Terminator17[];
-extern const u8 OtherText_MightyTough[];
-extern const u8 OtherText_Exclamation[];
-extern const u8 gContestText_ContestWinner[];
-extern const u8 gOtherText_Unknown1[];
static const u16 gPictureFramePalettes[][16] =
{
@@ -381,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/diploma.c b/src/diploma.c
index c32b72a70..80adac8f7 100644
--- a/src/diploma.c
+++ b/src/diploma.c
@@ -7,13 +7,10 @@
#include "rom4.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
#include "text.h"
-extern u8 gOtherText_NationalDex[];
-extern u8 gOtherText_HoennDex[];
-extern u8 gOtherText_DiplomaCertificationGameFreak[];
-
static void VBlankCB(void);
static void MainCB2(void);
static void Task_DiplomaFadeIn(u8);
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 86719a2ae..b21b00368 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -1,12 +1,14 @@
#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"
#include "rng.h"
#include "string_util.h"
#include "strings.h"
+#include "strings2.h"
#include "text.h"
u8 sub_80EB37C(u16);
@@ -21,15 +23,11 @@ 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[];
extern u16 gSpecialVar_0x8004;
-extern const u8 gOtherText_ThreeQuestions[];
-
#ifdef NONMATCHING
u8 *sub_80EB3FC(u8 *dst, u16 word) {
int group, wordIndex;
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 6a0fe1dce..c1b892f15 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -16,14 +16,10 @@
#include "script.h"
#include "songs.h"
#include "sound.h"
+#include "strings2.h"
#include "task.h"
#include "wild_encounter.h"
-extern u8 gOtherText_OhABite[];
-extern u8 gOtherText_PokeOnHook[];
-extern u8 gOtherText_NotEvenANibble[];
-extern u8 gOtherText_ItGotAway[];
-
extern u32 gUnknown_0202FF84[];
//Functions
diff --git a/src/field_region_map.c b/src/field_region_map.c
index ec630ad00..66e3d968c 100644
--- a/src/field_region_map.c
+++ b/src/field_region_map.c
@@ -5,6 +5,7 @@
#include "palette.h"
#include "sprite.h"
#include "text.h"
+#include "strings2.h"
extern void sub_80FA8EC(u32, u8);
extern void sub_80FAB10(void);
@@ -29,8 +30,6 @@ struct UnkStruct
extern struct UnkStruct unk_2000000;
-extern u8 gOtherText_Hoenn[];
-
void CB2_FieldInitRegionMap(void);
void CB2_FieldRegionMap(void);
void VBlankCB_FieldRegionMap(void);
diff --git a/src/intro.c b/src/intro.c
index 56eaa11e8..3f4897092 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;
@@ -56,7 +44,6 @@ extern const u16 gIntroCopyright_Pal[];
extern const u16 gIntroCopyright_Tilemap[];
extern const u16 gUnknown_08393E64[];
extern void *const gUnknown_0840B5A0[];
-extern const s16 gSineTable[];
//--------------------------------------------------
// Graphics Data
@@ -1797,9 +1784,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 +1800,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.c b/src/item.c
index 7257c3649..ad2b9aed3 100644
--- a/src/item.c
+++ b/src/item.c
@@ -1,10 +1,10 @@
#include "global.h"
#include "item.h"
#include "string_util.h"
+#include "strings.h"
extern struct Berry *GetBerryInfo(u8 berry);
-extern u8 gOtherText_Berry2[];
extern u8 gUnknown_02038560;
extern struct Item gItems[];
diff --git a/src/item_use.c b/src/item_use.c
index 116a57226..d1c1dbf2a 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"
@@ -22,6 +23,7 @@
#include "songs.h"
#include "sound.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "vars.h"
@@ -29,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;
@@ -74,23 +74,6 @@ extern u8 GetItemEffectType();
extern void sub_808B020(void);
extern void sub_810B96C(void);
-extern u8 gOtherText_DadsAdvice[];
-extern u8 gOtherText_CantGetOffBike[];
-extern u8 gOtherText_NoResponse[];
-extern u8 gOtherText_ItemfinderResponding[];
-extern u8 gOtherText_ItemfinderItemUnderfoot[];
-extern u8 gOtherText_Coins3[];
-extern u8 gOtherText_BootedHM[];
-extern u8 gOtherText_BootedTM[];
-extern u8 gOtherText_ContainsMove[];
-extern u8 gOtherText_UsedItem[];
-extern u8 gOtherText_RepelLingers[];
-extern u8 gOtherText_UsedFlute[];
-extern u8 gOtherText_UsedRepel[];
-extern u8 gOtherText_BoxIsFull[];
-extern u8 gOtherText_WontHaveAnyEffect[];
-extern u8 gOtherText_SnapConfusion[];
-
extern u16 gScriptItemId;
extern u16 gBattleTypeFlags;
diff --git a/src/link.c b/src/link.c
index 224c0ae1c..7cf2fc611 100644
--- a/src/link.c
+++ b/src/link.c
@@ -10,6 +10,7 @@
#include "songs.h"
#include "sound.h"
#include "sprite.h"
+#include "strings2.h"
#include "task.h"
#include "text.h"
@@ -39,8 +40,6 @@ extern u16 gScriptItemId;
extern u16 word_3004858;
-extern u8 gMultiText_LinkError[];
-
static void InitLinkTestBG(u8, u8, u8, u8);
void InitLinkTestBG_Unused(u8, u8, u8, u8);
void LinkTestScreen();
diff --git a/src/mail.c b/src/mail.c
index 807864332..4ec107011 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -8,6 +8,7 @@
#include "rom4.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
#include "text.h"
@@ -70,8 +71,6 @@ extern u16 gUnknown_083E562C[][2];
extern struct MailLayout gUnknown_083E5730[];
extern struct MailLayout gUnknown_083E57A4[];
-extern u8 gOtherText_From[];
-
static u8 sub_80F8A28(void);
static void sub_80F8D50(void);
static void sub_80F8DA0(void);
diff --git a/src/main_menu.c b/src/main_menu.c
index 50fefc471..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"
@@ -15,17 +16,13 @@
#include "sound.h"
#include "species.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
#include "title_screen.h"
#define BirchSpeechUpdateWindowText() ((u8)MenuUpdateWindowText_OverrideLineLength(24))
-struct MonCoords
-{
- u8 x, y;
-};
-
extern struct PaletteFadeControl gPaletteFade;
extern u16 gSaveFileStatus;
@@ -41,24 +38,8 @@ extern const u8 gBirchSpeech_WhatsYourName[];
extern u8 gBirchSpeech_SoItsPlayer[];
extern u8 gBirchSpeech_AhOkayYouArePlayer[];
extern u8 gBirchSpeech_AreYouReady[];
-extern u8 gSaveFileDeletedMessage[];
-extern u8 gSaveFileCorruptMessage[];
-extern u8 gBoardNotInstalledMessage[];
-extern u8 gBatteryDryMessage[];
-extern u8 gMainMenuString_Continue[];
-extern u8 gMainMenuString_NewGame[];
-extern u8 gMainMenuString_MysteryEvents[];
-extern u8 gMainMenuString_Option[];
-extern u8 gMainMenuString_Player[];
-extern u8 gMainMenuString_Time[];
-extern u8 gMainMenuString_Pokedex[];
-extern u8 gMainMenuString_Badges[];
-
-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[];
@@ -68,7 +49,6 @@ extern const u8 gUnknown_081E764C[];
extern const u8 gBirchIntroShadowGfx[];
extern const u8 gUnknown_081E7834[];
extern const u8 gUnknown_081E796C[];
-extern const u8 gSystemText_NewPara[];
extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E79AC[];
@@ -115,7 +95,7 @@ static void Task_MainMenuProcessKeyInput(u8 taskId);
static void Task_MainMenuPressedA(u8 taskId);
static void Task_MainMenuPressedB(u8 taskId);
static void HighlightCurrentMenuItem(u8 layout, u8 menuItem);
-static void PrintMainMenuItem(u8 *text, u8 left, u8 top);
+static void PrintMainMenuItem(const u8 *text, u8 left, u8 top);
static void PrintSaveFileInfo(void);
static void PrintPlayerName(void);
static void PrintPlayTime(void);
@@ -657,7 +637,7 @@ void HighlightCurrentMenuItem(u8 layout, u8 menuItem)
}
}
-void PrintMainMenuItem(u8 *text, u8 left, u8 top)
+void PrintMainMenuItem(const u8 *text, u8 left, u8 top)
{
u8 i;
u8 buffer[32];
@@ -1412,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);
@@ -1646,9 +1626,9 @@ static void SetPresetPlayerName(u8 index)
u8 *name;
if (gSaveBlock2.playerGender == MALE)
- name = gMalePresetNames[index].text;
+ name = (u8 *) gMalePresetNames[index].text;
else
- name = gFemalePresetNames[index].text;
+ name = (u8 *) gFemalePresetNames[index].text;
for (i = 0; i < 7; i++)
gSaveBlock2.playerName[i] = name[i];
diff --git a/src/matsuda_debug_menu.c b/src/matsuda_debug_menu.c
index 09ee5fc66..018e36567 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/mauville_old_man.c b/src/mauville_old_man.c
index 2fa889a15..d6fb33917 100644
--- a/src/mauville_old_man.c
+++ b/src/mauville_old_man.c
@@ -4,6 +4,7 @@
#include "rng.h"
#include "script.h"
#include "string_util.h"
+#include "strings.h"
extern u16 gScriptResult;
extern u16 gSpecialVar_0x8004;
@@ -14,8 +15,6 @@ extern void sub_80F83D0(void);
extern void sub_80F7F80(u8);
extern u16 sub_80EB8EC(void);
extern void sub_80F7DC0(void);
-extern u8 gOtherText_Is[];
-extern u8 gOtherText_DontYouAgree[];
extern u32 gUnknown_083E5388[];
extern u32 gUnknown_083E53A8[];
diff --git a/src/menu.c b/src/menu.c
index 3759d22c9..61eaebb6f 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -6,6 +6,7 @@
#include "script.h"
#include "songs.h"
#include "sound.h"
+#include "strings.h"
#include "text.h"
#include "text_window.h"
@@ -22,9 +23,6 @@ struct Menu
u8 columnXCoords[8];
};
-extern u8 OtherText_Yes[];
-extern u8 OtherText_No[];
-
static void MultistepInitMenuWindowInternal(const struct WindowConfig *, u16);
static void InitMenuWindowInternal(const struct WindowConfig *, u16);
static bool8 sub_80723D4(void);
@@ -175,7 +173,7 @@ void MenuDrawTextWindow(u8 left, u8 top, u8 right, u8 bottom)
DrawTextWindow(gMenuWindowPtr, left, top, right, bottom);
}
-void sub_8071F40(u8 *str)
+void sub_8071F40(const u8 *str)
{
MenuDrawTextWindow(2, 14, 28, 19);
MenuPrint(str, 3, 15);
@@ -603,7 +601,7 @@ u8 MenuPrint_PixelCoords(const u8 *text, u8 left, u16 top, u8 a4)
return sub_8004D04(gMenuWindowPtr, text, gMenuTextTileOffset, left, top, a4);
}
-u8 sub_8072A18(u8 *text, u8 left, u16 top, u8 width, u32 a5)
+u8 sub_8072A18(const u8 *text, u8 left, u16 top, u8 width, u32 a5)
{
return sub_8004FD0(gMenuWindowPtr, 0, text, gMenuTextTileOffset, left, top, width, a5);
}
@@ -639,7 +637,7 @@ void sub_8072B80(u8 *a1, u8 a2, u8 a3, u8 *a4)
sub_8003460(gMenuWindowPtr, buffer, gMenuTextTileOffset, a2, a3);
}
-void sub_8072BD8(u8 *a1, u8 a2, u8 a3, u16 a4)
+void sub_8072BD8(const u8 *a1, u8 a2, u8 a3, u16 a4)
{
sub_8004DB0(gMenuWindowPtr, a1, gMenuTextTileOffset, a2, a3, a4);
}
@@ -659,7 +657,7 @@ u8 *sub_8072C74(u8 *a1, const u8 *a2, u8 a3, u8 a4)
return AlignString(gMenuWindowPtr, a1, a2, a3, a4);
}
-u8 sub_8072CA4(u8 *str)
+u8 sub_8072CA4(const u8 *str)
{
return GetStringWidth(gMenuWindowPtr, str);
}
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/mystery_event_menu.c b/src/mystery_event_menu.c
index fa2e42b91..77c959b07 100644
--- a/src/mystery_event_menu.c
+++ b/src/mystery_event_menu.c
@@ -10,19 +10,13 @@
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
#include "text.h"
extern u8 unk_2000000[];
extern u8 gUnknown_02039338;
-extern u8 gSystemText_LinkStandby[];
-extern u8 gSystemText_LoadEventPressA[];
-extern u8 gSystemText_LoadingEvent[];
-extern u8 gSystemText_DontCutLink[];
-extern u8 gSystemText_EventLoadSuccess[];
-extern u8 gSystemText_LoadingError[];
-
static void VBlankCB(void);
static bool8 CheckLanguageMatch(void);
static bool8 GetEventLoadMessage(u8 *dest, u32 status);
diff --git a/src/naming_screen.c b/src/naming_screen.c
index b14c690e2..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"
@@ -8,6 +9,7 @@
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
#include "text.h"
#include "trig.h"
@@ -48,7 +50,6 @@ extern const struct SpriteTemplate gSpriteTemplate_83CE670;
extern const struct SpriteTemplate gSpriteTemplate_83CE688;
extern const struct SpriteSheet gUnknown_083CE6A0[];
extern const struct SpritePalette gUnknown_083CE708[];
-extern const u8 gOtherText_SentToPC[];
extern const u8 gNamingScreenMenu_Gfx[];
extern u16 gMenuMessageBoxContentTileOffset;
extern const u16 gNamingScreenPalettes[];
@@ -56,10 +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];
-extern const u8 OtherText_YourName[];
-extern const u8 OtherText_BoxName[];
-extern const u8 OtherText_PokeName[];
static void C2_NamingScreen(void);
static void sub_80B5AA0(void);
diff --git a/src/option_menu.c b/src/option_menu.c
index 49ad98196..878df16ba 100644
--- a/src/option_menu.c
+++ b/src/option_menu.c
@@ -4,6 +4,7 @@
#include "menu.h"
#include "palette.h"
#include "sprite.h"
+#include "strings2.h"
#include "task.h"
extern void SetPokemonCryStereo(u32 val);
@@ -33,28 +34,6 @@ enum {
extern u8 gUnknown_0839F63C[];
extern u8 gUnknown_0839F5FC[]; //palette
-extern u8 gSystemText_Normal[];
-extern u8 gSystemText_LR[];
-extern u8 gSystemText_LA[];
-extern u8 gSystemText_Terminator[];
-extern u8 gSystemText_Type[];
-extern u8 gSystemText_Mono[];
-extern u8 gSystemText_Stereo[];
-extern u8 gSystemText_Shift[];
-extern u8 gSystemText_Set[];
-extern u8 gSystemText_On[];
-extern u8 gSystemText_Off[];
-extern u8 gSystemText_Slow[];
-extern u8 gSystemText_Mid[];
-extern u8 gSystemText_Fast[];
-extern u8 gSystemText_OptionMenu[];
-extern u8 gSystemText_TextSpeed[];
-extern u8 gSystemText_BattleScene[];
-extern u8 gSystemText_BattleStyle[];
-extern u8 gSystemText_Sound[];
-extern u8 gSystemText_ButtonMode[];
-extern u8 gSystemText_Frame[];
-extern u8 gSystemText_Cancel[];
static void Task_OptionMenuFadeIn(u8 taskId);
static void Task_OptionMenuProcessInput(u8 taskId);
@@ -323,7 +302,7 @@ static void HighlightOptionMenuItem(u8 index)
REG_WIN1V = WIN_RANGE_(index * 16 + 40, index * 16 + 56);
}
-static void DrawOptionMenuChoice(u8 *text, u8 x, u8 y, u8 style)
+static void DrawOptionMenuChoice(const u8 *text, u8 x, u8 y, u8 style)
{
u8 dst[16];
u16 i;
diff --git a/src/party_menu.c b/src/party_menu.c
index 8eb181f46..ee6bcf2a9 100644
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -1,10 +1,12 @@
#include "global.h"
#include "asm.h"
+#include "data2.h"
#include "menu.h"
#include "pokemon.h"
#include "songs.h"
#include "sound.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "sprite.h"
#include "palette.h"
@@ -86,51 +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 gOtherText_TallPlusAndRightArrow[];
-extern const u8 gOtherText_WontHaveAnyEffect[];
-extern const u8 gOtherText_ElevatedTo[];
-extern const u8 gOtherText_MailMustBeRemoved[];
-extern const u8 gOtherText_AlreadyHolding[];
-extern const u8 gOtherText_TakenAndReplaced[];
-extern const u8 gOtherText_BagFullCannotRemoveItem[];
-extern const u8 gOtherText_WasGivenToHold[];
-extern const u8 gOtherText_PokeHoldingItemCantMail[];
-extern const u8 gOtherText_MailTransferredMailbox[];
-extern const u8 gOtherText_NotHoldingAnything[];
-extern const u8 gOtherText_ReceivedTheThingFrom[];
-extern const u8 gOtherText_SendRemovedMailPrompt[];
-extern const u8 gOtherText_MailTaken[];
-extern const u8 gOtherText_MailWasSent[];
-extern const u8 gOtherText_MailboxIsFull[];
-extern const u8 gOtherText_MailRemovedMessageLost[];
-extern const u8 gOtherText_WantsToLearn[];
-extern const u8 gOtherText_NotCompatible[];
-extern const u8 gOtherText_AlreadyKnows[];
-extern const u8 gOtherText_LearnedMove[];
-extern const u8 gOtherText_WhichMoveToForget2[];
-extern const u8 gOtherText_ForgetMove123_2[];
-extern const u8 gOtherText_StopTryingTo[];
-extern const u8 gOtherText_DidNotLearnMove2[];
-extern const u8 gOtherText_RegainedHealth[];
-extern const u8 gOtherText_HPRestoredBy[];
-extern const u8 gOtherText_CuredPoisoning[];
-extern const u8 gOtherText_WokeUp[];
-extern const u8 gOtherText_BurnHealed[];
-extern const u8 gOtherText_ThawedOut[];
-extern const u8 gOtherText_CuredParalysis[];
-extern const u8 gOtherText_SnapConfusion[];
-extern const u8 gOtherText_GotOverLove[];
-extern const u8 gOtherText_BecameHealthy[];
-extern const u8 gOtherText_Hp2[];
-extern const u8 gOtherText_Attack[];
-extern const u8 gOtherText_Defense[];
-extern const u8 gOtherText_Speed[];
-extern const u8 gOtherText_SpAtk2[];
-extern const u8 gOtherText_SpDef2[];
-extern const u8 gOtherText_WasRaised[];
-extern const u8 gOtherText_PPIncreased[];
-extern const u8 gOtherText_PPRestored[];
-extern const u8 gMoveNames[][13];
extern const u8 *const gItemEffectTable[];
extern bool8 IsDoubleBattle(void);
diff --git a/src/player_pc.c b/src/player_pc.c
index 048c79862..c012afb02 100644
--- a/src/player_pc.c
+++ b/src/player_pc.c
@@ -10,6 +10,7 @@
#include "script.h"
#include "sound.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#define NEW_GAME_PC_ITEMS(i, type) ((u16)(gNewGamePCItems + type)[i * 2])
@@ -21,7 +22,7 @@ enum
QUANTITY,
};
-extern void DisplayItemMessageOnField(u8, u8*, TaskFunc, u16);
+extern void DisplayItemMessageOnField(u8, const u8*, TaskFunc, u16);
extern void DoPlayerPCDecoration(u8);
extern void BuyMenuFreeMemory(void);
extern void DestroyVerticalScrollIndicator(u8);
@@ -40,13 +41,8 @@ extern void sub_80F98DC(int);
extern void sub_80A4164(u8 *, u16, enum StringConvertMode, u8);
extern void CreateVerticalScrollIndicators(u32, u32, u32); // unknown args
-extern u8 gOtherText_NoItems[];
-
extern u16 gNewGamePCItems[];
-extern u8 gOtherText_WhatWillYouDo[];
-extern u8 gOtherText_NoMailHere[];
-
extern u8 *gUnknown_02039314;
extern struct MenuAction gUnknown_08406298[];
@@ -57,7 +53,6 @@ extern u8 gUnknown_08406327[];
extern u8 gUnknown_08406330[];
extern u8 gUnknown_0840631E[];
extern u8 gUnknown_08406318[];
-extern u8 gOtherText_CancelNoTerminator[];
extern u8 gUnknown_030007B4;
extern u8 unk_201FE00[];
diff --git a/src/pokedex.c b/src/pokedex.c
index 03a7d916a..97bac3390 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -12,7 +12,9 @@
#include "songs.h"
#include "sound.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
+#include "trig.h"
// I'm #define-ing these just for now so I can keep using the old unkXXX member names
#define unk60E selectedPokemon
@@ -77,7 +79,6 @@ extern struct SpriteTemplate gSpriteTemplate_83A056C;
extern struct SpriteTemplate gSpriteTemplate_83A0584;
extern struct SpriteTemplate gSpriteTemplate_83A059C;
extern struct SpriteTemplate gSpriteTemplate_83A05B4;
-extern s16 gSineTable[];
extern struct PokedexListItem *gUnknown_0202FFBC;
extern IntrCallback gUnknown_03005CEC;
extern u8 gUnknown_08E96BD4[];
@@ -90,12 +91,6 @@ extern u8 gUnknown_08E96ACC[];
extern u8 gUnknown_08E96B58[];
extern struct PokedexEntry gPokedexEntries[];
-extern u8 gDexText_UnknownPoke[];
-extern u8 gDexText_UnknownHeight[];
-extern u8 gDexText_UnknownWeight[];
-extern u8 gDexText_CryOf[];
-extern u8 gDexText_SizeComparedTo[];
-extern u8 gDexText_RegisterComplete[];
extern void m4aMPlayVolumeControl(struct MusicPlayerInfo *mplayInfo, u16 trackBits, u16 volume);
extern bool8 BeginNormalPaletteFade(u32, s8, u8, u8, u16);
@@ -108,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 31b66fd9a..7fbfc1271 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"
@@ -8,6 +9,7 @@
#include "sprite.h"
#include "string_util.h"
#include "text.h"
+#include "strings2.h"
extern u8 gPlayerPartyCount;
extern struct Pokemon gPlayerParty[6];
@@ -34,16 +36,10 @@ extern u16 gTrainerBattleOpponent;
extern struct PokemonStorage gPokemonStorage;
extern u8 gBadEggNickname[];
-extern u8 gEggNickname[];
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 6b42d3272..f9eb3a7e9 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 6540858c1..b2f8a1569 100644
--- a/src/pokemon_size_record.c
+++ b/src/pokemon_size_record.c
@@ -1,8 +1,10 @@
#include "global.h"
#include "pokemon_size_record.h"
+#include "data2.h"
#include "event_data.h"
#include "species.h"
#include "string_util.h"
+#include "strings2.h"
#include "text.h"
extern u16 SpeciesToNationalPokedexNum(u16);
@@ -15,9 +17,7 @@ struct UnknownStruct
u16 unk4;
};
-extern u8 gOtherText_Marco[];
extern u16 gScriptResult;
-extern u8 gSpeciesNames[][11];
static const struct UnknownStruct sBigMonSizeTable[] =
{
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index 5f96512f0..56a56e455 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -4,22 +4,11 @@
#include "menu.h"
#include "pokemon.h"
#include "string_util.h"
+#include "strings2.h"
extern struct Pokemon *unk_2018000;
extern u8 *(gNatureNames[]);
-extern const u8 gOtherText_Terminator4[];
-extern const u8 gOtherText_Nature[];
-
-extern const u8 gOtherText_Met[];
-extern const u8 gOtherText_Egg2[];
-extern const u8 gOtherText_ObtainedInTrade[];
-extern const u8 gOtherText_FatefulEncounter[];
-extern const u8 gOtherText_Met2[];
-extern const u8 gOtherText_EggDayCare[];
-extern const u8 gOtherText_EggNicePlace[];
-extern const u8 gOtherText_EggObtainedInTrade[];
-extern const u8 gOtherText_EggHotSprings[];
u8 *sub_80A1E9C(u8 *dest, u8 *src, u8);
u8 PokemonSummaryScreen_CheckOT(struct Pokemon *pokemon);
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/record_mixing.c b/src/record_mixing.c
index 2e01ead61..c84cfd2ae 100644
--- a/src/record_mixing.c
+++ b/src/record_mixing.c
@@ -10,6 +10,7 @@
#include "songs.h"
#include "sound.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
extern void *recordMixingSecretBases;
@@ -28,8 +29,6 @@ extern u16 gSpecialVar_0x8005;
extern u32 gUnknown_03005D2C;
extern u8 gUnknown_03000718;
extern u8 gUnknown_0300071C[];
-extern u8 gOtherText_MixingComplete[];
-extern u8 gOtherText_MixingRecordsWithFriend[];
extern bool8 gReceivedRemoteLinkPlayers;
#define BUFFER_CHUNK_SIZE 200
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/save_failed_screen.c b/src/save_failed_screen.c
index 0de1e5ca9..a3de0bd00 100644
--- a/src/save_failed_screen.c
+++ b/src/save_failed_screen.c
@@ -7,6 +7,7 @@
#include "palette.h"
#include "save.h"
#include "sprite.h"
+#include "strings.h"
#include "task.h"
#include "text.h"
@@ -36,13 +37,6 @@ extern u32 gGameContinueCallback;
extern u8 gBirchHelpGfx[];
-extern u8 gSystemText_SaveFailedBackupCheck[];
-extern u8 gSystemText_CheckCompleteSaveAttempt[];
-extern u8 gSystemText_BackupDamagedGameContinue[];
-extern u8 gSystemText_SaveCompletedPressA[];
-extern u8 gSystemText_SaveCompletedGameEnd[];
-extern u8 gSystemText_GameplayEnded[];
-
extern u8 gBirchGrassTilemap[];
extern u8 gBirchBagTilemap[];
extern u8 gBirchBagGrassPal[0x40];
diff --git a/src/save_menu_util.c b/src/save_menu_util.c
index 7899fabb1..8910bb300 100644
--- a/src/save_menu_util.c
+++ b/src/save_menu_util.c
@@ -5,11 +5,7 @@
#include "menu.h"
#include "pokedex.h"
#include "string_util.h"
-
-extern u8 gOtherText_Player[];
-extern u8 gOtherText_Badges[];
-extern u8 gOtherText_Pokedex[];
-extern u8 gOtherText_PlayTime[];
+#include "strings2.h"
void HandleDrawSaveWindowInfo(s16 left, s16 top)
{
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 b87f5e956..d111cf8f6 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 e1d532b16..9e833ec34 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/shop.c b/src/shop.c
index 9f4a360df..81c403e92 100644
--- a/src/shop.c
+++ b/src/shop.c
@@ -9,6 +9,7 @@
#include "script.h"
#include "sound.h"
#include "sprite.h"
+#include "strings.h"
#include "task.h"
struct UnknownShopStruct
@@ -28,8 +29,6 @@ extern struct MenuAction gUnknown_083CC6D0[];
extern u8 gUnknown_083CC6E8[];
extern u8 gUnknown_083CC6EB[];
-extern u8 gOtherText_CanIHelpYou[];
-extern u8 gOtherText_AnythingElse[];
extern u8 gBuyMenuFrame_Gfx[];
extern u16 gBuyMenuFrame_Tilemap[];
@@ -38,7 +37,7 @@ extern u16 gUnknown_083CC710[2];
extern void sub_80A6300(void);
extern void sub_80BE3BC(void);
-extern void DisplayItemMessageOnField(u8, u8*, TaskFunc, u16);
+extern void DisplayItemMessageOnField(u8, const u8*, TaskFunc, u16);
extern u8 sub_807D770(void);
extern void pal_fill_black(void);
extern void sub_80B3764(int, int);
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/start_menu.c b/src/start_menu.c
index 8d7e50ea5..a3258bab1 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -21,6 +21,8 @@
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings.h"
+#include "strings2.h"
#include "task.h"
#include "trainer_card.h"
@@ -54,24 +56,11 @@ EWRAM_DATA static u8 sNumStartMenuActions = 0;
EWRAM_DATA static u8 sCurrentStartMenuActions[10] = {0};
//Text strings
-extern u8 gSystemText_Saving[];
extern u8 gSaveText_PlayerSavedTheGame[];
extern u8 gSaveText_DontTurnOff[];
-extern u8 gSystemText_SaveErrorExchangeBackup[];
extern u8 gSaveText_ThereIsAlreadyAFile[];
extern u8 gSaveText_ThereIsADifferentFile[];
extern u8 gSaveText_WouldYouLikeToSave[];
-extern u8 gOtherText_SafariStock[];
-extern u8 SystemText_Pokedex[];
-extern u8 SystemText_Pokemon[];
-extern u8 SystemText_BAG[];
-extern u8 SystemText_Pokenav[];
-extern u8 SystemText_Player[];
-extern u8 SystemText_Save[];
-extern u8 SystemText_Option[];
-extern u8 SystemText_Exit[];
-extern u8 SystemText_Retire[];
-extern u8 SystemText_Player[];
static u8 StartMenu_PokedexCallback(void);
static u8 StartMenu_PokemonCallback(void);
@@ -113,7 +102,7 @@ static u8 SaveCallback1(void);
static u8 SaveCallback2(void);
static void sub_807160C(void);
static u8 RunSaveDialogCallback(void);
-static void DisplaySaveMessageWithCallback(u8 *ptr, u8 (*func)(void));
+static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void));
static void Task_SaveDialog(u8 taskId);
static void sub_8071700(void);
static void HideSaveDialog(void);
@@ -517,7 +506,7 @@ void InitSaveDialog(void)
CreateTask(Task_SaveDialog, 0x50);
}
-static void DisplaySaveMessageWithCallback(u8 *ptr, u8 (*func)(void))
+static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void))
{
StringExpandPlaceholders(gStringVar4, ptr);
MenuDisplayMessageBox();
diff --git a/src/starter_choose.c b/src/starter_choose.c
index 4b857dba6..32b6adf36 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"
@@ -11,23 +12,11 @@
#include "species.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings.h"
#include "task.h"
#include "trig.h"
-struct MonCoords
-{
- u8 x, y;
-};
-
-extern void * const gUnknown_081FAF4C[];
-extern const u8 gOtherText_DoYouChoosePoke[];
extern u16 gScriptResult;
-extern const u8 gSpeciesNames[][11];
-extern const u8 gOtherText_Poke[];
-extern const struct SpriteSheet gMonFrontPicTable[];
-extern const struct MonCoords gMonFrontPicCoords[];
-extern const struct SpritePalette gMonPaletteTable[];
-extern const u8 gOtherText_BirchInTrouble[];
extern struct SpriteTemplate gUnknown_02024E8C;
//--------------------------------------------------
@@ -567,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/string_util.c b/src/string_util.c
index 957d70153..9686256a1 100644
--- a/src/string_util.c
+++ b/src/string_util.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "string_util.h"
+#include "strings.h"
#include "text.h"
u8 gUnknownStringVar[16];
@@ -23,20 +24,6 @@ static const s32 sPowersOfTen[] =
1000000000,
};
-extern u8 gExpandedPlaceholder_Empty[];
-extern u8 gExpandedPlaceholder_Kun[];
-extern u8 gExpandedPlaceholder_Chan[];
-extern u8 gExpandedPlaceholder_Sapphire[];
-extern u8 gExpandedPlaceholder_Ruby[];
-extern u8 gExpandedPlaceholder_Aqua[];
-extern u8 gExpandedPlaceholder_Magma[];
-extern u8 gExpandedPlaceholder_Archie[];
-extern u8 gExpandedPlaceholder_Maxie[];
-extern u8 gExpandedPlaceholder_Kyogre[];
-extern u8 gExpandedPlaceholder_Groudon[];
-extern u8 gExpandedPlaceholder_Brendan[];
-extern u8 gExpandedPlaceholder_May[];
-
u8 *StringCopy10(u8 *dest, const u8 *src)
{
u8 i;
@@ -473,17 +460,17 @@ static u8 *ExpandPlaceholder_StringVar3(void)
static u8 *ExpandPlaceholder_KunChan(void)
{
if (gSaveBlock2.playerGender == MALE)
- return gExpandedPlaceholder_Kun;
+ return (u8 *) gExpandedPlaceholder_Kun;
else
- return gExpandedPlaceholder_Chan;
+ return (u8 *) gExpandedPlaceholder_Chan;
}
static u8 *ExpandPlaceholder_RivalName(void)
{
if (gSaveBlock2.playerGender == MALE)
- return gExpandedPlaceholder_May;
+ return (u8 *) gExpandedPlaceholder_May;
else
- return gExpandedPlaceholder_Brendan;
+ return (u8 *) gExpandedPlaceholder_Brendan;
}
#define VERSION_DEPENDENT_PLACEHOLDER_LIST \
@@ -497,11 +484,11 @@ static u8 *ExpandPlaceholder_RivalName(void)
#ifdef SAPPHIRE
#define X(ph, r, s) \
-static u8 *ExpandPlaceholder_##ph(void) { return gExpandedPlaceholder_##s; }
+static u8 *ExpandPlaceholder_##ph(void) { return (u8 *) gExpandedPlaceholder_##s; }
VERSION_DEPENDENT_PLACEHOLDER_LIST
#else
#define X(ph, r, s) \
-static u8 *ExpandPlaceholder_##ph(void) { return gExpandedPlaceholder_##r; }
+static u8 *ExpandPlaceholder_##ph(void) { return (u8 *) gExpandedPlaceholder_##r; }
VERSION_DEPENDENT_PLACEHOLDER_LIST
#endif
@@ -530,7 +517,7 @@ u8 *GetExpandedPlaceholder(u32 id)
};
if (id >= ARRAY_COUNT(funcs))
- return gExpandedPlaceholder_Empty;
+ return (u8 *) gExpandedPlaceholder_Empty;
else
return funcs[id]();
}
diff --git a/src/trainer_card.c b/src/trainer_card.c
index e6ed79c15..ef3a2d857 100644
--- a/src/trainer_card.c
+++ b/src/trainer_card.c
@@ -14,6 +14,7 @@
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
+#include "strings2.h"
#include "task.h"
typedef void (*Callback)(void);
@@ -64,16 +65,6 @@ extern u16 gUnknown_083B5F4C[];
extern u16 gUnknown_08E8CFC0[];
extern u16 gUnknown_08E8D9C0[];
-extern u8 gOtherText_TrainersTrainerCard[];
-extern u8 gOtherText_FirstHOF[];
-extern u8 gOtherText_LinkCableBattles[];
-extern u8 gOtherText_BattleTowerWinRecord[];
-extern u8 gOtherText_ContestRecord[];
-extern u8 gOtherText_MixingRecord[];
-extern u8 gOtherText_TradeRecord[];
-extern u8 gOtherText_Boy[];
-extern u8 gOtherText_Girl[];
-
extern bool8 (*const gUnknown_083B5EBC[])(struct Task *);
extern bool8 (*const gUnknown_083B5ED8[])(struct Task *);
@@ -1831,7 +1822,7 @@ static void TrainerCard_Back_PrintPokemonTrades(void)
void unref_sub_8094588(u16 left, u16 top)
{
- u8 *text = gOtherText_Boy;
+ const u8 *text = gOtherText_Boy;
if (gSaveBlock2.playerGender == FEMALE)
{
diff --git a/src/trig.c b/src/trig.c
index 8b75b3838..d64231087 100644
--- a/src/trig.c
+++ b/src/trig.c
@@ -1,7 +1,6 @@
#include "global.h"
#include "trig.h"
-extern s16 gSineTable[];
extern s16 gSineDegreeTable[];
// amplitude * sin(index*(π/128))
diff --git a/src/tv.c b/src/tv.c
index dfda14d82..d2e38c088 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[];
diff --git a/src/wallclock.c b/src/wallclock.c
index de007c1b3..0b9948adc 100644
--- a/src/wallclock.c
+++ b/src/wallclock.c
@@ -8,6 +8,7 @@
#include "rtc.h"
#include "songs.h"
#include "sound.h"
+#include "strings2.h"
#include "task.h"
#include "trig.h"
@@ -15,7 +16,6 @@ extern u16 gSpecialVar_0x8004;
extern u8 gMiscClock_Gfx[];
extern u8 gUnknown_08E95774[];
extern u8 gUnknown_08E954B0[];
-extern u8 gOtherText_CorrectTimePrompt[];
extern const struct MenuAction gMenuYesNoItems[];
extern u16 gMiscClockMale_Pal[];
extern u16 gMiscClockFemale_Pal[];