From ee6942683882e2abd4bde79f8355b71abbd21af9 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 02:44:02 -0500 Subject: [PATCH] Eliminate more externs --- include/agb_flash.h | 1 + include/easy_chat.h | 1 + include/field_effect.h | 5 ++++ include/field_player_avatar.h | 3 +++ include/field_specials.h | 1 + include/fieldmap.h | 7 ++++++ include/hall_of_fame.h | 3 +++ include/item_menu.h | 4 +++ include/link.h | 1 + include/rom_8011DC0.h | 1 + include/script_menu.h | 2 ++ src/field_player_avatar.c | 4 +-- src/field_screen_effect.c | 11 +------- src/field_specials.c | 2 -- src/frontier_util.c | 5 +--- src/hall_of_fame.c | 2 -- src/hof_pc.c | 4 --- src/ice.c | 47 +++++++++++++++++------------------ src/item_menu.c | 1 - src/item_use.c | 30 ++++++---------------- src/link.c | 2 +- src/link_rfu.c | 2 +- src/load_save.c | 2 +- src/main.c | 5 ---- src/match_call.c | 2 -- src/menu.c | 24 ++++++++---------- src/menu_helpers.c | 2 -- src/mystery_event_script.c | 2 -- src/option_menu.c | 3 +-- src/poison.c | 2 -- src/pokeblock_feed.c | 2 -- src/pokemon.c | 5 +--- src/pokemon_size_record.c | 4 +-- src/script_menu.c | 2 +- src/water.c | 1 - 35 files changed, 82 insertions(+), 113 deletions(-) diff --git a/include/agb_flash.h b/include/agb_flash.h index 27e45e8fa..3dd60df0f 100644 --- a/include/agb_flash.h +++ b/include/agb_flash.h @@ -8,5 +8,6 @@ // Exported ROM declarations u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void)); +u16 IdentifyFlash(void); #endif //GUARD_AGB_FLASH_H diff --git a/include/easy_chat.h b/include/easy_chat.h index 2efdc4e5d..84ac15422 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -134,5 +134,6 @@ u16 EasyChat_GetNumWordsInGroup(u8); u16 sub_811EE90(u16); void DoEasyChatScreen(u8 type, u16 *words, MainCallback callback, u8 displayedPersonType); void sub_811F8BC(void); +void sub_811EFC0(u8 additionalPhraseId); #endif // GUARD_EASYCHAT_H diff --git a/include/field_effect.h b/include/field_effect.h index 205dbb68a..1f5f4ee29 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -36,6 +36,10 @@ bool8 FieldEffectCmd_end(u8 **script, u32 *val); bool8 FieldEffectCmd_loadgfx_callnative(u8 **script, u32 *val); bool8 FieldEffectCmd_loadtiles_callnative(u8 **script, u32 *val); bool8 FieldEffectCmd_loadfadedpal_callnative(u8 **script, u32 *val); +void sub_80B6B68(void); +void sub_80B6E4C(u8 a0, u8 priority); +void sub_80B75D8(u8 priority); +void sub_80B7A74(u8 priority); void sub_80B9C28(s16*, u8); void sub_80B9C54(s16*, u8); @@ -47,5 +51,6 @@ void sub_80B7A58(struct Sprite*); void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b); void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId); u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority); +void StartEscapeRopeFieldEffect(void); #endif //GUARD_FIELD_EFFECTS_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index ae7aa92d2..ca3d41546 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -70,5 +70,8 @@ void sub_808C1B4(u8 direction); void sub_808B9D4(u8 direction); void sub_808D194(void); void sub_808D1C8(void); +bool32 sub_808D1B4(void); +bool32 sub_808D1E8(void); +void sub_808C0A8(u8 a); #endif // GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_specials.h b/include/field_specials.h index e6ed60593..3131531dc 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -27,5 +27,6 @@ void ResetCyclingRoadChallengeData(void); bool8 warp0_in_pokecenter(void); void ResetFanClub(void); bool8 sub_813B21C(void); +void set_unknown_box_id(u8 id); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 8e10240d2..bb5b0e290 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -9,6 +9,8 @@ #define NUM_PALS_TOTAL 13 #define MAX_MAP_DATA_SIZE 0x2800 +#include "main.h" + extern struct BackupMapLayout gBackupMapLayout; u32 MapGridGetMetatileIdAt(int, int); @@ -39,9 +41,14 @@ void apply_map_tileset2_palette(struct MapLayout const *mapLayout); void copy_map_tileset2_to_vram_2(struct MapLayout const *mapLayout); void copy_map_tileset1_to_vram(const struct MapLayout *); void copy_map_tileset2_to_vram(const struct MapLayout *); +struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection); +struct MapConnection *sub_8088A8C(s16 x, s16 y); void SpriteCB_PokeballGlow(struct Sprite *); void SpriteCB_PokecenterMonitor(struct Sprite *); void SpriteCB_HallOfFameMonitor(struct Sprite *); +// field_region_map.c +void FieldInitRegionMap(MainCallback callback); + #endif //GUARD_FIELDMAP_H diff --git a/include/hall_of_fame.h b/include/hall_of_fame.h index d35ecf268..5c8a01bcb 100644 --- a/include/hall_of_fame.h +++ b/include/hall_of_fame.h @@ -6,4 +6,7 @@ void CB2_DoHallOfFameScreenDontSaveData(void); void CB2_DoHallOfFamePC(void); void sub_8175280(void); +// hof_pc.c +void ReturnFromHallOfFamePC(void); + #endif // GUARD_HALL_OF_FAME_H diff --git a/include/item_menu.h b/include/item_menu.h index 465e5966e..70d6b5a94 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -2,6 +2,7 @@ #define GUARD_item_menu_H #include "item.h" +#include "menu_helpers.h" #define RETURN_LOCATION_FIELD 0 #define RETURN_LOCATION_BATTLE 1 @@ -83,6 +84,9 @@ void DoWallyTutorialBagMenu(void); void ResetBagScrollPositions(void); void sub_81AABF0(void (*callback)(void)); void CB2_ChooseBerry(void); +void unknown_ItemMenu_Confirm(u8 taskId); +void bag_menu_yes_no(u8, u8, const struct YesNoFuncTable*); +void sub_81AB9A8(u8 pocketId); #endif //GUARD_item_menu_H diff --git a/include/link.h b/include/link.h index 400816fd0..24a834c68 100644 --- a/include/link.h +++ b/include/link.h @@ -262,6 +262,7 @@ bool32 sub_800A07C(void); void sub_800AB98(void); void sub_800AA04(u8 a0); void sub_800B4C0(void); +bool32 sub_800B504(void); extern u16 gLinkPartnersHeldKeys[6]; extern u32 gLinkDebugSeed; diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index faffd3375..9940a5b44 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -17,5 +17,6 @@ u16 mevent_081445C0(u8); void sub_801B990(u32, u32); u8 sub_8013F78(void); bool32 sub_802C908(u16); +void nullsub_89(u8 taskId); #endif //GUARD_rom_8011DC0_H diff --git a/include/script_menu.h b/include/script_menu.h index a6d52c31e..1f4e549fe 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -14,5 +14,7 @@ u8 CreateWindowFromRect(u8, u8, u8, u8); void sub_80E2A78(u8); int display_text_and_get_width(const u8*, int); int sub_80E2D5C(int arg0, int tileWidth); +bool16 ScrSpecial_CreatePCMenu(void); +void ScriptMenu_DisplayPCStartupPrompt(void); #endif //GUARD_SCRIPT_MENU_H diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index b1291f0ce..66f176d39 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -2125,7 +2125,7 @@ void sub_808D194(void) sub_808D1FC(CreateTask(sub_808D1FC, 0)); } -bool8 sub_808D1B4(void) +bool32 sub_808D1B4(void) { return FuncIsActiveTask(sub_808D1FC); } @@ -2135,7 +2135,7 @@ void sub_808D1C8(void) sub_808D094(CreateTask(sub_808D094, 0)); } -bool8 sub_808D1E8(void) +bool32 sub_808D1E8(void) { return FuncIsActiveTask(sub_808D094); } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 3e4965667..b6dcf212c 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -32,16 +32,7 @@ #include "constants/rgb.h" #include "trainer_hill.h" #include "event_obj_lock.h" - -extern void sub_80B6B68(void); -extern void sub_80B6E4C(u8, u8); -extern void sub_80B75D8(u8); -extern void sub_80B7A74(u8); -extern void sub_808C0A8(u8); -extern u8 GetMapPairFadeToType(u8, u8); -extern u8 GetMapPairFadeFromType(u8, u8); -extern bool32 sub_808D1B4(void); -extern bool32 sub_808D1E8(void); +#include "fldeff.h" extern const u16 gUnknown_82EC7CC[]; diff --git a/src/field_specials.c b/src/field_specials.c index 629dd8015..85bc41723 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -81,8 +81,6 @@ extern const u16 gEventObjectPalette17[]; extern const u16 gEventObjectPalette33[]; extern const u16 gEventObjectPalette34[]; -extern void BlendPalettes(u32, u8, u16); -extern void FieldInitRegionMap(MainCallback callback); void UpdateMovedLilycoveFanClubMembers(void); void sub_813BF60(void); diff --git a/src/frontier_util.c b/src/frontier_util.c index 6fcbd4ffb..8c190f522 100644 --- a/src/frontier_util.c +++ b/src/frontier_util.c @@ -35,8 +35,7 @@ #include "constants/moves.h" #include "constants/items.h" #include "constants/event_objects.h" - -extern u8 gSelectedOrderFromParty[]; +#include "party_menu.h" struct FrontierBrainMon { @@ -48,8 +47,6 @@ struct FrontierBrainMon u16 moves[4]; }; -extern void sub_81B8558(void); - // This file's functions. static void sub_81A17A0(void); static void sub_81A1830(void); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 3f217b782..48e4f8bec 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -66,8 +66,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; #define HALL_OF_FAME_MAX_TEAMS 50 -extern void ReturnFromHallOfFamePC(void); - // this file's functions static void ClearVramOamPltt_LoadHofPal(void); static void sub_8174F70(void); diff --git a/src/hof_pc.c b/src/hof_pc.c index 2cea5540a..d76f04372 100644 --- a/src/hof_pc.c +++ b/src/hof_pc.c @@ -7,10 +7,6 @@ #include "script_menu.h" #include "task.h" -extern void Overworld_PlaySpecialMapMusic(void); -extern bool16 ScrSpecial_CreatePCMenu(void); -extern void ScriptMenu_DisplayPCStartupPrompt(void); - static void ReshowPCMenuAfterHallOfFamePC(void); static void Task_WaitForPaletteFade(u8); diff --git a/src/ice.c b/src/ice.c index 34ad572e8..fa1913b96 100644 --- a/src/ice.c +++ b/src/ice.c @@ -21,30 +21,29 @@ struct HailStruct { }; static void sub_810B6C4(struct Sprite *); -extern void sub_810B848(struct Sprite *); -extern void AnimIcePunchSwirlingParticle(struct Sprite *); -extern void AnimIceBeamParticle(struct Sprite *); -extern void AnimIceEffectParticle(struct Sprite *); -extern void AnimFlickerIceEffectParticle(struct Sprite *); -extern void AnimSwirlingSnowball_Step1(struct Sprite *); -extern void AnimSwirlingSnowball_Step2(struct Sprite *); -extern void AnimSwirlingSnowball_Step3(struct Sprite *); -extern void AnimSwirlingSnowball_End(struct Sprite *); -extern void AnimMoveParticleBeyondTarget(struct Sprite *); -extern void AnimWiggleParticleTowardsTarget(struct Sprite *); -extern void AnimWaveFromCenterOfTarget(struct Sprite *); -extern void InitSwirlingFogAnim(struct Sprite *); -extern void AnimSwirlingFogAnim(struct Sprite *); -extern void AnimThrowMistBall(struct Sprite *); -extern void InitPoisonGasCloudAnim(struct Sprite *); -extern void MovePoisonGasCloud(struct Sprite *); -extern void AnimHailBegin(struct Sprite *); -extern void AnimHailContinue(struct Sprite *); -extern void sub_80A8EE4(struct Sprite *); -extern void InitIceBallAnim(struct Sprite *); -extern void AnimThrowIceBall(struct Sprite *); -extern void InitIceBallParticle(struct Sprite *); -extern void AnimIceBallParticle(struct Sprite *); +void sub_810B848(struct Sprite *); +void AnimIcePunchSwirlingParticle(struct Sprite *); +void AnimIceBeamParticle(struct Sprite *); +void AnimIceEffectParticle(struct Sprite *); +void AnimFlickerIceEffectParticle(struct Sprite *); +void AnimSwirlingSnowball_Step1(struct Sprite *); +void AnimSwirlingSnowball_Step2(struct Sprite *); +void AnimSwirlingSnowball_Step3(struct Sprite *); +void AnimSwirlingSnowball_End(struct Sprite *); +void AnimMoveParticleBeyondTarget(struct Sprite *); +void AnimWiggleParticleTowardsTarget(struct Sprite *); +void AnimWaveFromCenterOfTarget(struct Sprite *); +void InitSwirlingFogAnim(struct Sprite *); +void AnimSwirlingFogAnim(struct Sprite *); +void AnimThrowMistBall(struct Sprite *); +void InitPoisonGasCloudAnim(struct Sprite *); +void MovePoisonGasCloud(struct Sprite *); +void AnimHailBegin(struct Sprite *); +void AnimHailContinue(struct Sprite *); +void InitIceBallAnim(struct Sprite *); +void AnimThrowIceBall(struct Sprite *); +void InitIceBallParticle(struct Sprite *); +void AnimIceBallParticle(struct Sprite *); void AnimTask_Haze2(u8); void AnimTask_OverlayFogTiles(u8); void AnimTask_Hail2(u8); diff --git a/src/item_menu.c b/src/item_menu.c index b3d341c2e..877444575 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -140,7 +140,6 @@ void unknown_ItemMenu_Confirm2(u8 taskId); void unknown_item_menu_type(u8 taskId); void item_menu_type_2(u8 taskId); void display_sell_item_ask_str(u8 taskId); -void unknown_ItemMenu_Confirm(u8 taskId); void display_deposit_item_ask_str(u8 taskId); void item_menu_type_b(u8 taskId); void BagMenuActuallyToss(u8 taskId); diff --git a/src/item_use.c b/src/item_use.c index 16fb22d94..f9d81bfc0 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -8,13 +8,15 @@ #include "coins.h" #include "data2.h" #include "event_data.h" -#include "fieldmap.h" #include "event_object_movement.h" +#include "fieldmap.h" +#include "field_effect.h" #include "field_player_avatar.h" #include "field_screen_effect.h" #include "field_weather.h" #include "item.h" #include "item_menu.h" +#include "item_use.h" #include "mail.h" #include "main.h" #include "menu.h" @@ -39,29 +41,13 @@ #include "constants/vars.h" #include "event_obj_lock.h" -extern void unknown_ItemMenu_Confirm(u8 taskId); -extern void sub_81C5B14(u8 taskId); -extern void ItemUseOutOfBattle_TMHM(u8 a); -extern void ItemUseOutOfBattle_EvolutionStone(u8 b); -extern bool8 IsPlayerFacingSurfableFishableWater(void); -extern bool8 sub_81221AC(void); extern u8 Route102_EventScript_274482[]; extern u8 Route102_EventScript_2744C0[]; extern u8 BattleFrontier_OutsideEast_EventScript_242CFC[]; -extern int sub_80247BC(void); -extern struct MapHeader* mapconnection_get_mapheader(struct MapConnection *connection); -extern void SetUpItemUseCallback(u8 taskId); -extern void ItemUseCB_Medicine(u8, TaskFunc); -extern void bag_menu_yes_no(u8, u8, const struct YesNoFuncTable*); -extern void sub_81C5924(void); -extern void sub_81C59BC(void); -extern void sub_81AB9A8(u8); -extern void StartEscapeRopeFieldEffect(void); -extern u8* sub_806CF78(u16); -extern void sub_81B89F0(void); -extern u8 GetItemEffectType(u16); -extern struct MapConnection *sub_8088A8C(s16, s16); +extern s32 sub_80247BC(void); + +void SetUpItemUseCallback(u8 taskId); void MapPostLoadHook_UseItem(void); void sub_80AF6D4(void); void Task_CallItemUseOnFieldCallback(u8 taskId); @@ -404,12 +390,12 @@ bool8 sub_80FD6D4(const struct MapEvents *events, s16 x, s16 y) bool8 sub_80FD730(struct MapConnection *connection, int x, int y) { - struct MapHeader *mapHeader; + u16 localX, localY; u32 localOffset; s32 localLength; - mapHeader = mapconnection_get_mapheader(connection); + struct MapHeader const *const mapHeader = mapconnection_get_mapheader(connection); switch (connection->direction) { diff --git a/src/link.c b/src/link.c index 72ac3e878..05da4e458 100644 --- a/src/link.c +++ b/src/link.c @@ -1893,7 +1893,7 @@ u32 GetLinkRecvQueueLength(void) return gLink.recvQueue.count; } -bool8 sub_800B504(void) +bool32 sub_800B504(void) { if (GetLinkRecvQueueLength() > 2) { diff --git a/src/link_rfu.c b/src/link_rfu.c index 8da6b166a..d80ff2ae9 100644 --- a/src/link_rfu.c +++ b/src/link_rfu.c @@ -17,9 +17,9 @@ #include "text.h" #include "constants/species.h" #include "save.h" +#include "rom_8011DC0.h" extern u16 gHeldKeyCodeToSend; -extern void nullsub_89(u8 taskId); struct UnkRfuStruct_1 gUnknown_03004140; struct UnkRfuStruct_2 gUnknown_03005000; diff --git a/src/load_save.c b/src/load_save.c index 0d19c6dae..a0d2568d3 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -11,10 +11,10 @@ #include "trainer_hill.h" #include "gba/flash_internal.h" #include "decoration_inventory.h" +#include "agb_flash.h" static void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey); -extern bool16 IdentifyFlash(void); extern void ApplyNewEncryptionKeyToBerryPowder(u32 key); #define SAVEBLOCK_MOVE_RANGE 128 diff --git a/src/main.c b/src/main.c index 61c5e3386..aa42c5958 100644 --- a/src/main.c +++ b/src/main.c @@ -24,9 +24,6 @@ #include "main.h" #include "trainer_hill.h" -extern void sub_800B9B8(void); -extern u8 gUnknown_03002748; - static void VBlankIntr(void); static void HBlankIntr(void); static void VCountIntr(void); @@ -313,8 +310,6 @@ void SetSerialCallback(IntrCallback callback) gMain.serialCallback = callback; } -extern void CopyBufferedValuesToGpuRegs(void); - static void VBlankIntr(void) { if (gWirelessCommType != 0) diff --git a/src/match_call.c b/src/match_call.c index e7e91969f..ce1573164 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -111,8 +111,6 @@ static void PopulateSpeciesFromTrainerParty(int, u8 *); static void PopulateBattleFrontierFacilityName(int, u8 *); static void PopulateBattleFrontierStreak(int, u8 *); -extern void sub_81973A4(void); - #define TEXT_ID(topic, id) (((topic) << 8) | ((id) & 0xFF)) static const struct MatchCallTrainerTextInfo sMatchCallTrainers[] = diff --git a/src/menu.c b/src/menu.c index ae589dff4..e82a6355c 100644 --- a/src/menu.c +++ b/src/menu.c @@ -122,20 +122,18 @@ const struct MoveMenuInfoIcon gMoveMenuInfoIcons[] = { 8, 8, 0xAF }, // Unused (Small dark pokeball) }; + // Forward declarations -extern void sub_81973A4(void); -extern void DrawStandardFrame(u8, u8, u8, u8, u8, u8); -extern void DrawDialogueFrame(u8, u8, u8, u8, u8, u8); -extern void sub_81977BC(u8, u8, u8, u8, u8, u8); -extern void sub_8197804(u8, u8, u8, u8, u8, u8); -extern void sub_8197BB4(u8, u8, u8, u8, u8, u8); -extern void sub_8197E30(u8, u8, u8, u8, u8, u8); -extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8); -extern void sub_81980A8(u8, u8, u8, u8, u8, u8); -extern u8 Menu_MoveCursor(s8); -extern u8 sub_8199134(s8, s8); -extern void sub_8198C78(void); -extern void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); +void DrawStandardFrame(u8, u8, u8, u8, u8, u8); +void DrawDialogueFrame(u8, u8, u8, u8, u8, u8); +void sub_81977BC(u8, u8, u8, u8, u8, u8); +void sub_8197804(u8, u8, u8, u8, u8, u8); +void sub_8197BB4(u8, u8, u8, u8, u8, u8); +void sub_8197E30(u8, u8, u8, u8, u8, u8); +void DrawWindowBorder(u8, u8, u8, u8, u8, u8); +void sub_81980A8(u8, u8, u8, u8, u8, u8); +void task_free_buf_after_copying_tile_data_to_vram(u8 taskId); +void sub_8198C78(void); void InitStandardTextBoxWindows(void) { diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 846c23b6b..1f9979eca 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -18,8 +18,6 @@ #include "constants/items.h" #include "constants/maps.h" -extern bool32 sub_800B504(void); - // this file's functions static void Task_ContinueTaskAfterMessagePrints(u8 taskId); static void Task_CallYesOrNoCallback(u8 taskId); diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index 4196bb34c..dba914b51 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -17,8 +17,6 @@ #include "mystery_event_msg.h" #include "pokemon_storage_system.h" -extern void sub_811EFC0(u8); - extern ScrCmdFunc gMysteryEventScriptCmdTable[]; extern ScrCmdFunc gMysteryEventScriptCmdTableEnd[]; diff --git a/src/option_menu.c b/src/option_menu.c index 122ba8d8a..caeb3d5da 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -13,8 +13,7 @@ #include "text_window.h" #include "international_string_util.h" #include "strings.h" - -extern void SetPokemonCryStereo(u32 val); +#include "gba/m4a_internal.h" // Task data enum diff --git a/src/poison.c b/src/poison.c index c86ec2cd8..9af981694 100644 --- a/src/poison.c +++ b/src/poison.c @@ -3,8 +3,6 @@ #include "trig.h" #include "constants/rgb.h" -extern void sub_80A77C8(struct Sprite *); - void sub_810DBAC(struct Sprite *); void sub_810DC2C(struct Sprite *); void sub_810DCD0(struct Sprite *); diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index b1f182b66..42a71ad52 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -55,8 +55,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpriteSheet gMonFrontPicTable[]; extern const u16 gUnknown_0860F074[]; -extern bool8 sub_81221EC(void); - // this file's functions static void HandleInitBackgrounds(void); static void HandleInitWindows(void); diff --git a/src/pokemon.c b/src/pokemon.c index a35033d49..a984abbb9 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -10,6 +10,7 @@ #include "battle_tower.h" #include "event_data.h" #include "evolution_scene.h" +#include "field_specials.h" #include "item.h" #include "link.h" #include "main.h" @@ -72,10 +73,6 @@ extern const struct CompressedSpritePalette gMonPaletteTable[]; extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; extern const u8 gTrainerClassNames[][13]; -extern u16 get_unknown_box_id(void); -extern void set_unknown_box_id(u8); -extern bool8 sub_806F104(void); - // this file's functions static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c index b0e14d2b1..98d83d8ce 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon_size_record.c @@ -1,5 +1,6 @@ #include "global.h" #include "event_data.h" +#include "pokedex.h" #include "pokemon.h" #include "pokemon_size_record.h" #include "string_util.h" @@ -15,9 +16,6 @@ struct UnknownStruct u16 unk4; }; -extern u16 GetPokedexHeightWeight(u16 dexNo, bool8 height); -extern u16 SpeciesToNationalPokedexNum(u16 species); - static const struct UnknownStruct sBigMonSizeTable[] = { { 290, 1, 0 }, diff --git a/src/script_menu.c b/src/script_menu.c index 7180bfc60..d9dbc770c 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1312,7 +1312,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId) #undef tWindowId -bool8 ScrSpecial_CreatePCMenu(void) +bool16 ScrSpecial_CreatePCMenu(void) { if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE) { diff --git a/src/water.c b/src/water.c index d13b1378e..c856b9aa4 100644 --- a/src/water.c +++ b/src/water.c @@ -41,7 +41,6 @@ extern void sub_8108BE0(struct Sprite *); extern void sub_8108C08(struct Sprite *); extern void sub_8108C54(struct Sprite *); extern void sub_8108CDC(struct Sprite *); -extern void sub_80A8EE4(struct Sprite *); void sub_810756C(u8); void sub_81076F4(u8); void sub_8107B84(u8);