diff --git a/include/battle_anim.h b/include/battle_anim.h index d0d323216..4e241686f 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -204,6 +204,9 @@ void sub_80A718C(struct Sprite *sprite); #define STAT_ANIM_MULTIPLE_MINUS2 58 void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId); +// battle_anim_8170478.c +void sub_8172EF0(u8 battler, struct Pokemon *mon); + // ground.c void sub_81152DC(u8 taskId); @@ -216,6 +219,12 @@ u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, void sub_8116EB4(u8); void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *arg8, const u32 *arg9, const u32 *palette); +// battle_anim_effects_1.c +void sub_810310C(u8 battler, struct Sprite* sprite); + +// smokescreen.c +u8 sub_807521C(s16 x, s16 y, u8 a3); + u32 UnpackSelectedBattleAnimPalettes(s16); u8 GetBattlerSpriteFinal_Y(u8, u16, u8); diff --git a/include/contest.h b/include/contest.h index e4391a327..8146486cb 100644 --- a/include/contest.h +++ b/include/contest.h @@ -478,5 +478,6 @@ bool32 sub_80FC4F4(void *, u16); bool8 sub_80FC55C(void); bool8 sub_80FC530(u8); u8 sub_80F86E0(u8 *); +void sub_80FC9F8(u8 taskId); #endif //GUARD_CONTEST_H diff --git a/include/event_obj_lock.h b/include/event_obj_lock.h index 59532fdcb..2f09ad36a 100644 --- a/include/event_obj_lock.h +++ b/include/event_obj_lock.h @@ -7,5 +7,6 @@ bool8 sub_809847C(void); void LockSelectedEventObject(void); void sub_8098630(void); bool8 sub_8098734(void); +void ScriptUnfreezeEventObjects(void); #endif // GUARD_EVENT_OBJ_LOCK_H diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 284bbe8db..63ac09f2d 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -193,6 +193,9 @@ void UpdateEventObjectSpriteVisibility(struct Sprite *sprite, bool8 invisible); s16 sub_809773C(s16 a1); s16 sub_8097728(s16 a1); void CameraObjectReset2(void); +u8 EventObjectGetBerryTreeId(u8 eventObjectId); +void sub_8092EF0(u8 mapId, u8 mapNumber, u8 mapGroup); +bool8 IsBerryTreeSparkling(u8, u8, u8); void MovementType_None(struct Sprite *); void MovementType_LookAround(struct Sprite *); diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h index 738cceb3e..feb20cef6 100644 --- a/include/field_control_avatar.h +++ b/include/field_control_avatar.h @@ -39,5 +39,6 @@ int SetCableClubWarp(void); u8 TrySetDiveWarp(void); const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction); u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position); +void ClearPoisonStepCounter(void); #endif // GUARD_FIELDCONTROLAVATAR_H diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index 6022467e4..6ea9771e6 100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h @@ -34,5 +34,6 @@ void UpdateSparkleFieldEffect(struct Sprite*); void SetSpriteInvisible(u8 spriteId); void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y); void sub_8155604(u8 spriteId, u8 value, s16 data1); +void sub_81555D8(u8 spriteId, u8 value); #endif //GUARD_FIELD_EFFECT_HELPERS_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 45cd0dbd9..ae7aa92d2 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -63,5 +63,12 @@ u8 sub_808BCD0(void); void sub_808B578(void); u8 GetFRLGAvatarGraphicsIdByGender(u8); u8 GetRSAvatarGraphicsIdByGender(u8); +void sub_808B980(u8 direction); +void sub_808B9BC(u8 direction); +void sub_808B9A4(u8 direction); +void sub_808C1B4(u8 direction); +void sub_808B9D4(u8 direction); +void sub_808D194(void); +void sub_808D1C8(void); #endif // GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 2b8b3a5a3..b4429c167 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -41,5 +41,6 @@ void sub_80B0534(void); void sub_80B058C(void); void sub_80B05B4(void); void WriteFlashScanlineEffectBuffer(u8 flashLevel); +bool8 walkrun_is_standing_still(void); #endif // GUARD_FIELD_SCREEN_EFFECT_H diff --git a/include/field_special_scene.h b/include/field_special_scene.h index 240e9ecb6..2219c9433 100644 --- a/include/field_special_scene.h +++ b/include/field_special_scene.h @@ -10,5 +10,6 @@ void Task_HandleTruckSequence(u8 taskId); void ExecuteTruckSequence(void); void EndTruckSequence(u8); void sub_80C791C(void); +void sub_80FB768(void); #endif // GUARD_FIELD_SPECIAL_SCENE_H diff --git a/include/field_specials.h b/include/field_specials.h index bff04a739..e6ed60593 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -26,6 +26,6 @@ void UpdateFrontierGambler(u16 a0); void ResetCyclingRoadChallengeData(void); bool8 warp0_in_pokecenter(void); void ResetFanClub(void); - +bool8 sub_813B21C(void); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 24bc4989a..8e10240d2 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -37,8 +37,8 @@ void copy_map_tileset1_tileset2_to_vram(struct MapLayout const *mapLayout); void apply_map_tileset1_tileset2_palette(struct MapLayout const *mapLayout); void apply_map_tileset2_palette(struct MapLayout const *mapLayout); void copy_map_tileset2_to_vram_2(struct MapLayout const *mapLayout); -extern void copy_map_tileset1_to_vram(const struct MapLayout *); -extern void copy_map_tileset2_to_vram(const struct MapLayout *); +void copy_map_tileset1_to_vram(const struct MapLayout *); +void copy_map_tileset2_to_vram(const struct MapLayout *); void SpriteCB_PokeballGlow(struct Sprite *); void SpriteCB_PokecenterMonitor(struct Sprite *); diff --git a/include/flying.h b/include/flying.h new file mode 100644 index 000000000..062320b4d --- /dev/null +++ b/include/flying.h @@ -0,0 +1,6 @@ +#ifndef GUARD_FLYING_H +#define GUARD_FLYING_H + +void sub_810E2C8(struct Sprite *sprite); + +#endif // GUARD_FLYING_H \ No newline at end of file diff --git a/include/item_menu.h b/include/item_menu.h index 2ca1af200..465e5966e 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -71,6 +71,7 @@ void sub_81AAC14(void); void sub_81AAC50(void); void sub_81AAC70(void); void sub_81AAC28(void); +void sub_81AABB0(void); void SetInitialScrollAndCursorPositions(u8 pocketId); void bag_menu_mail_related(void); void CB2_BagMenuFromStartMenu(void); @@ -80,6 +81,8 @@ void CB2_GoToSellMenu(void); void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)()); void DoWallyTutorialBagMenu(void); void ResetBagScrollPositions(void); +void sub_81AABF0(void (*callback)(void)); +void CB2_ChooseBerry(void); #endif //GUARD_item_menu_H diff --git a/include/link.h b/include/link.h index 83deab88f..400816fd0 100644 --- a/include/link.h +++ b/include/link.h @@ -261,6 +261,7 @@ void sub_800B3A4(u32 who); bool32 sub_800A07C(void); void sub_800AB98(void); void sub_800AA04(u8 a0); +void sub_800B4C0(void); extern u16 gLinkPartnersHeldKeys[6]; extern u32 gLinkDebugSeed; diff --git a/include/main.h b/include/main.h index 728064288..1b312550e 100644 --- a/include/main.h +++ b/include/main.h @@ -68,7 +68,7 @@ void ClearPokemonCrySongs(void); void RestoreSerialTimer3IntrHandlers(void); void StartTimer1(void); void SeedRngAndSetTrainerId(void); -extern u16 GetGeneratedTrainerIdLower(void); +u16 GetGeneratedTrainerIdLower(void); #endif // GUARD_MAIN_H diff --git a/include/match_call.h b/include/match_call.h index 17d40d41c..1bf654937 100644 --- a/include/match_call.h +++ b/include/match_call.h @@ -12,5 +12,8 @@ enum { s32 GetRematchIdxByTrainerIdx(s32 trainerIdx); void InitMatchCallCounters(void); +bool32 TryStartMatchCall(void); +bool32 IsMatchCallTaskActive(void); +void StartMatchCallFromScript(u8* script); #endif //GUARD_MATCH_CALL_H diff --git a/include/pokedex.h b/include/pokedex.h index 6136f7786..c3700c811 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -43,5 +43,6 @@ s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); u16 CreateMonSpriteFromNationalDexNumber(u16, s16, s16, u16); bool16 HasAllHoennMons(void); void ResetPokedexScrollPositions(void); +u16 sub_80C0944(void); #endif // GUARD_POKEDEX_H diff --git a/include/water.h b/include/water.h new file mode 100644 index 000000000..9f876021c --- /dev/null +++ b/include/water.h @@ -0,0 +1,6 @@ +#ifndef GUARD_WATER_H +#define GUARD_WATER_H + +void sub_8108C94(struct Sprite *sprite); + +#endif // GUARD_WATER_H \ No newline at end of file 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 "bg.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_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 "item_menu.h" -#include "option_menu.h" -#include "event_scripts.h" -#include "save.h" -#include "gpu_regs.h" -#include "scanline_effect.h" -#include "text_window.h" -#include "load_save.h" -#include "trainer_card.h" -#include "international_string_util.h" -#include "constants/songs.h" -#include "field_player_avatar.h" +#include "battle_pike.h" #include "battle_pyramid.h" #include "battle_pyramid_bag.h" -#include "battle_pike.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 "field_player_avatar.h" +#include "field_specials.h" +#include "field_weather.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 "overworld.h" +#include "palette.h" +#include "party_menu.h" +#include "pokedex.h" +#include "safari_zone.h" +#include "save.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 "trainer_card.h" +#include "window.h" +#include "constants/songs.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