diff options
author | Phlosioneer <mattmdrr2@gmail.com> | 2019-03-01 22:32:50 -0500 |
---|---|---|
committer | Phlosioneer <mattmdrr2@gmail.com> | 2019-03-01 22:32:50 -0500 |
commit | 3ceb1667c9b5e81934c7d608efc08905f21c372e (patch) | |
tree | 345a20d3189cfbf8ad00824f16872883dfdb1975 /src | |
parent | 3b04cfa437b093a21cdc5021843b5f52a124861e (diff) |
Reduce externs
Diffstat (limited to 'src')
33 files changed, 55 insertions, 124 deletions
diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index ee6676e64..a72b2c8dc 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -15,9 +15,7 @@ #include "util.h" #include "constants/rgb.h" #include "constants/songs.h" - -extern void sub_8108C94(struct Sprite *); -extern void sub_810310C(u8, struct Sprite *); +#include "water.h" void sub_8103448(struct Sprite *); void sub_8103498(struct Sprite *); diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 49fb69342..de00892ba 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -23,9 +23,7 @@ #include "constants/songs.h" #include "constants/species.h" #include "constants/weather.h" - -extern u8 sub_807521C(s16 x, s16 y, u8 a3); -extern void sub_810E2C8(struct Sprite *); +#include "flying.h" extern const struct SpriteTemplate gUnknown_08593114; extern const union AffineAnimCmd *const gUnknown_082FF6C0[]; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 05da72e16..6c0f81d41 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -26,15 +26,12 @@ #include "constants/battle_anim.h" #include "constants/songs.h" #include "constants/trainers.h" +#include "recorded_battle.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_81851A8(u8 *); -extern u16 sub_8068B48(void); - // this file's functions static void LinkOpponentHandleGetMonData(void); static void LinkOpponentHandleGetRawMonData(void); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 19d39609f..59fc2aae5 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -26,13 +26,11 @@ #include "constants/battle_anim.h" #include "constants/songs.h" #include "constants/trainers.h" +#include "recorded_battle.h" extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_81851A8(u8 *); - // this file's functions static void LinkPartnerHandleGetMonData(void); static void LinkPartnerHandleGetRawMonData(void); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 99bb0c588..9fee8134d 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -32,14 +32,12 @@ #include "constants/moves.h" #include "constants/songs.h" #include "constants/trainers.h" +#include "trainer_hill.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern u8 GetTrainerHillTrainerFrontSpriteId(u16 trainerId); - // this file's functions static void OpponentHandleGetMonData(void); static void OpponentHandleGetRawMonData(void); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 6bcc97c68..42d29dbbd 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -39,10 +39,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern void sub_81AABB0(void); -extern void sub_81851A8(u8 *); - // this file's functions static void PlayerHandleGetMonData(void); static void PlayerHandleSetMonData(void); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index a9b0f376b..95a3f698b 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -30,9 +30,6 @@ extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_81358F4(void); -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); - // this file's functions static void PlayerPartnerHandleGetMonData(void); static void PlayerPartnerHandleGetRawMonData(void); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 911eb6ce5..c66a1b49c 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -33,9 +33,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); -extern u16 sub_8068B48(void); - // this file's functions static void RecordedOpponentHandleGetMonData(void); static void RecordedOpponentHandleGetRawMonData(void); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index b2dfca6a0..cc40f159a 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -30,8 +30,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); - // this file's functions static void RecordedPlayerHandleGetMonData(void); static void RecordedPlayerHandleGetRawMonData(void); diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index 54ba04ab4..b0173df68 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -25,8 +25,6 @@ extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_81358F4(void); - // this file's functions static void SafariHandleGetMonData(void); static void SafariHandleGetRawMonData(void); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index d891b96b6..a3dc92757 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -33,8 +33,6 @@ extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; -extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon); - // this file's functions static void WallyHandleGetMonData(void); static void WallyHandleGetRawMonData(void); diff --git a/src/battle_main.c b/src/battle_main.c index 043e75808..befef364f 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -57,6 +57,7 @@ #include "constants/songs.h" #include "constants/species.h" #include "constants/trainers.h" +#include "cable_club.h" extern struct MusicPlayerInfo gMPlayInfo_SE1; extern struct MusicPlayerInfo gMPlayInfo_SE2; @@ -69,9 +70,6 @@ extern const u8 *const gBattlescriptsForRunningByItem[]; extern const u8 *const gBattlescriptsForUsingItem[]; extern const u8 *const gBattlescriptsForSafariActions[]; -// functions -extern void sub_80B3AF8(u8 taskId); // cable club - // this file's functions static void CB2_InitBattleInternal(void); static void CB2_PreInitMultiBattle(void); diff --git a/src/battle_records.c b/src/battle_records.c index f9c40d8de..d905ccaf3 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -21,8 +21,7 @@ #include "alloc.h" #include "gpu_regs.h" #include "constants/game_stat.h" - -extern void PrintOnTrainerHillRecordsWindow(void); // pokenav.s +#include "trainer_hill.h" // this file's functions static void Task_CloseTrainerHillRecordsOnButton(u8 taskId); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a53fa30f2..8a4436a3f 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -48,6 +48,7 @@ #include "battle_pyramid.h" #include "field_specials.h" #include "pokemon_summary_screen.h" +#include "pokenav.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; @@ -55,9 +56,6 @@ extern const u8* const gBattleScriptsForMoveEffects[]; // functions extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s -extern void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s -extern void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s -extern u8 sub_813B21C(void); #define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) diff --git a/src/battle_setup.c b/src/battle_setup.c index 7626420e9..3d27b517e 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -44,6 +44,7 @@ #include "mirage_tower.h" #include "constants/map_types.h" #include "constants/battle_frontier.h" +#include "field_screen_effect.h" enum { @@ -62,10 +63,6 @@ struct TrainerBattleParameter u8 ptrType; }; -extern void ClearPoisonStepCounter(void); -extern void sub_808BCF4(void); -extern void sub_80AF6F0(void); - // this file's functions static void DoBattlePikeWildBattle(void); static void DoSafariBattle(void); diff --git a/src/berry.c b/src/berry.c index bd596db7f..cbac06a3d 100644 --- a/src/berry.c +++ b/src/berry.c @@ -11,11 +11,9 @@ #include "text.h" #include "constants/event_object_movement_constants.h" #include "constants/items.h" +#include "event_object_movement.h" + -extern u8 EventObjectGetBerryTreeId(u8 eventObjectId); -extern void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup); -extern void CB2_ChooseBerry(void); -extern bool8 IsBerryTreeSparkling(u8, u8, u8); extern const u8 BerryTreeScript[]; diff --git a/src/berry_blender.c b/src/berry_blender.c index 87d24e717..70e50a72e 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -142,9 +142,6 @@ extern const u8 gText_Space[]; extern const u8 gText_BlenderMaxSpeedRecord[]; extern const u8 gText_234Players[]; -extern void sub_81AABF0(void (*callback)(void)); -extern void sub_800B4C0(void); - // this file's functions static void BerryBlender_SetBackgroundsPos(void); static void sub_8080EA4(u8 taskId); diff --git a/src/bike.c b/src/bike.c index 1e91baab0..530742bdf 100644 --- a/src/bike.c +++ b/src/bike.c @@ -14,12 +14,6 @@ extern bool8 gBikeCyclingChallenge; extern u8 gBikeCollisions; -extern u8 sub_808B980(u8 direction); -extern u8 sub_808B9BC(u8 direction); -extern u8 sub_808B9A4(u8 direction); -extern u8 sub_808C1B4(u8 direction); -extern u8 sub_808B9D4(u8 direction); - // this file's functions static void MovePlayerOnMachBike(u8, u16, u16); static u8 GetMachBikeTransition(u8 *); diff --git a/src/contest.c b/src/contest.c index 7be4aa23b..230ccd1b4 100644 --- a/src/contest.c +++ b/src/contest.c @@ -45,8 +45,6 @@ #include "constants/rgb.h" #include "contest_ai.h" -extern void sub_80FC9F8(u8); // contest_link_80FC4F4.c - // This file's functions. static void sub_80D782C(void); static void sub_80D7C7C(u8 taskId); diff --git a/src/contest_link_80F57C4.c b/src/contest_link_80F57C4.c index c0a79af81..881d9847e 100644 --- a/src/contest_link_80F57C4.c +++ b/src/contest_link_80F57C4.c @@ -39,6 +39,7 @@ #include "constants/rgb.h" #include "constants/songs.h" #include "constants/vars.h" +#include "contest.h" struct ContestLinkUnk0 { @@ -99,8 +100,6 @@ extern const struct SpriteSheet gUnknown_0858D810[]; extern const struct SpritePalette gUnknown_0858D850; extern const struct SpriteTemplate gSpriteTemplate_858D860; -extern void sub_81D9DE4(u8); - static void sub_80F6A9C(void); static void sub_80F71C8(void); u8 sub_80F7310(u8, u8); diff --git a/src/diploma.c b/src/diploma.c index b3d5a48fa..78d49527f 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -13,8 +13,7 @@ #include "text.h" #include "overworld.h" #include "menu.h" - -extern bool16 sub_80C0944(void); +#include "pokedex.h" extern const u8 gText_DexNational[]; extern const u8 gText_DexHoenn[]; diff --git a/src/electric.c b/src/electric.c index 142a9ca09..6c6c33746 100644 --- a/src/electric.c +++ b/src/electric.c @@ -4,9 +4,7 @@ #include "trig.h" #include "constants/songs.h" #include "sound.h" - -extern void sub_810E2C8(struct Sprite *); -extern void TranslateAnimSpriteToTargetMonLocation(struct Sprite *); +#include "flying.h" static void sub_810A1A8(struct Sprite *); static void sub_810A1F8(struct Sprite *); diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index cffafaf9f..f5961bb48 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -32,8 +32,7 @@ #include "constants/map_types.h" #include "constants/maps.h" #include "constants/songs.h" - -extern bool32 TryStartMatchCall(void); +#include "match_call.h" static EWRAM_DATA u8 sWildEncounterImmunitySteps = 0; static EWRAM_DATA u16 sPreviousPlayerMetatileBehavior = 0; diff --git a/src/field_effect.c b/src/field_effect.c index 7f11a8e58..fcdc483e6 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -240,12 +240,6 @@ static IWRAM_DATA u8 sActiveList[32]; extern u8 *gFieldEffectScriptPointers[]; extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; -extern void sub_81555D8(u8, u8); -extern void pal_fill_for_maplights(void); -extern void sub_80E1558(u8); -extern void sub_80E1570(void); -extern bool8 sub_80E1584(void); -extern void WarpFadeScreen(void); // .rodata const u32 gNewGameBirchPic[] = INCBIN_U32("graphics/birch_speech/birch.4bpp"); diff --git a/src/field_message_box.c b/src/field_message_box.c index 299aafaf2..fa1aee566 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -4,9 +4,7 @@ #include "string_util.h" #include "task.h" #include "text.h" - -extern bool32 IsMatchCallTaskActive(void); -extern void StartMatchCallFromScript(u8*); +#include "match_call.h" static EWRAM_DATA u8 sFieldMessageBoxMode = 0; diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index e7476dea3..3e4965667 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -10,7 +10,6 @@ #include "field_screen_effect.h" #include "field_special_scene.h" #include "field_weather.h" -// #include "fldeff_flash.h" #include "gpu_regs.h" #include "link.h" #include "link_rfu.h" @@ -31,15 +30,9 @@ #include "constants/event_object_movement_constants.h" #include "constants/songs.h" #include "constants/rgb.h" +#include "trainer_hill.h" +#include "event_obj_lock.h" -extern bool32 sub_81D6534(void); -extern bool8 walkrun_is_standing_still(void); -extern void ScriptUnfreezeEventObjects(void); -extern void sub_80FB768(void); -extern void sub_808D194(void); -extern void sub_808D1C8(void); -extern bool32 sub_808D1B4(void); -extern bool32 sub_808D1E8(void); extern void sub_80B6B68(void); extern void sub_80B6E4C(u8, u8); extern void sub_80B75D8(u8); @@ -47,6 +40,8 @@ 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); extern const u16 gUnknown_82EC7CC[]; diff --git a/src/field_specials.c b/src/field_specials.c index 639d86e68..3994f8c36 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -3379,7 +3379,7 @@ u16 get_unknown_box_id(void) return gUnknown_0203AB6F; } -bool32 sub_813B21C(void) +bool8 sub_813B21C(void) { if (FlagGet(FLAG_SYS_STORAGE_UNKNOWN_FLAG) == FALSE) { diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 348a1f46c..a715608c5 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -20,7 +20,6 @@ #include "constants/field_effects.h" #include "constants/songs.h" -extern void ScriptUnfreezeEventObjects(void); extern bool8 IsMewPlayingHideAndSeek(void); extern struct MapPosition gPlayerFacingPosition; diff --git a/src/item_menu.c b/src/item_menu.c index 43f2afce3..b3d341c2e 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -476,7 +476,7 @@ void CB2_ChooseBerry(void) GoToBagMenu(RETURN_LOCATION_FIELD_2, BERRIES_POCKET, CB2_ReturnToFieldContinueScript); } -void sub_81AABF0(void(*callback)(void)) +void sub_81AABF0(void (*callback)(void)) { GoToBagMenu(RETURN_LOCATION_FIELD_3, BERRIES_POCKET, callback); } diff --git a/src/item_use.c b/src/item_use.c index 97d6292c4..16fb22d94 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -37,10 +37,10 @@ #include "constants/items.h" #include "constants/songs.h" #include "constants/vars.h" +#include "event_obj_lock.h" extern void unknown_ItemMenu_Confirm(u8 taskId); extern void sub_81C5B14(u8 taskId); -extern void ScriptUnfreezeEventObjects(void); extern void ItemUseOutOfBattle_TMHM(u8 a); extern void ItemUseOutOfBattle_EvolutionStone(u8 b); extern bool8 IsPlayerFacingSurfableFishableWater(void); diff --git a/src/normal.c b/src/normal.c index 87c8792f1..cbf0caa83 100644 --- a/src/normal.c +++ b/src/normal.c @@ -5,6 +5,7 @@ #include "task.h" #include "trig.h" #include "constants/rgb.h" +#include "flying.h" void AnimConfusionDuck(struct Sprite *); void AnimSimplePaletteBlend(struct Sprite *); @@ -36,8 +37,6 @@ static void sub_81162F8(u8); static void sub_81163D0(struct Sprite *); static void sub_81165E4(struct Sprite *); -extern void sub_810E2C8(struct Sprite *); - const union AnimCmd gUnknown_0859722C[] = { ANIMCMD_FRAME(0, 8), diff --git a/src/safari_zone.c b/src/safari_zone.c index accf94981..703c3d0cd 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -10,6 +10,7 @@ #include "string_util.h" #include "tv.h" #include "constants/game_stat.h" +#include "field_screen_effect.h" struct PokeblockFeeder { @@ -27,8 +28,6 @@ extern const u8 EventScript_2A4B6F[]; extern const u8 EventScript_2A4B4C[]; extern const u8 EventScript_2A4B9B[]; -extern void sub_80AF6F0(void); - EWRAM_DATA u8 gNumSafariBalls = 0; EWRAM_DATA static u16 sSafariZoneStepCounter = 0; EWRAM_DATA static u8 sSafariZoneCaughtMons = 0; diff --git a/src/start_menu.c b/src/start_menu.c index 4b71f6147..79404d0b2 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -1,44 +1,45 @@ #include "global.h" -#include "start_menu.h" -#include "menu.h" -#include "safari_zone.h" -#include "event_data.h" -#include "window.h" -#include "string_util.h" -#include "text.h" -#include "strings.h" +#include "battle_pike.h" +#include "battle_pyramid.h" +#include "battle_pyramid_bag.h" #include "bg.h" +#include "event_data.h" +#include "event_object_movement.h" +#include "event_obj_lock.h" +#include "event_scripts.h" #include "field_effect.h" -#include "party_menu.h" -#include "frontier_pass.h" -#include "task.h" -#include "overworld.h" -#include "link.h" -#include "frontier_util.h" +#include "field_player_avatar.h" #include "field_specials.h" -#include "event_object_movement.h" -#include "script.h" -#include "main.h" -#include "sound.h" -#include "pokedex.h" #include "field_weather.h" -#include "palette.h" +#include "frontier_pass.h" +#include "frontier_util.h" +#include "gpu_regs.h" +#include "international_string_util.h" #include "item_menu.h" +#include "link.h" +#include "load_save.h" +#include "main.h" +#include "menu.h" +#include "new_game.h" #include "option_menu.h" -#include "event_scripts.h" +#include "overworld.h" +#include "palette.h" +#include "party_menu.h" +#include "pokedex.h" +#include "safari_zone.h" #include "save.h" -#include "gpu_regs.h" #include "scanline_effect.h" +#include "script.h" +#include "sound.h" +#include "start_menu.h" +#include "strings.h" +#include "string_util.h" +#include "task.h" +#include "text.h" #include "text_window.h" -#include "load_save.h" #include "trainer_card.h" -#include "international_string_util.h" +#include "window.h" #include "constants/songs.h" -#include "field_player_avatar.h" -#include "battle_pyramid.h" -#include "battle_pyramid_bag.h" -#include "battle_pike.h" -#include "new_game.h" // Menu actions enum @@ -93,7 +94,6 @@ extern void sub_808B864(void); extern void CB2_Pokedex(void); extern void PlayRainStoppingSoundEffect(void); extern void CB2_PokeNav(void); -extern void ScriptUnfreezeEventObjects(void); extern void save_serialize_map(void); // Menu action callbacks |