diff --git a/include/code_800C9CC.h b/include/code_800C9CC.h index 6fcbb5e9..e213b60b 100644 --- a/include/code_800C9CC.h +++ b/include/code_800C9CC.h @@ -1,5 +1,5 @@ -#ifndef GUARD_CODE_800D090_H -#define GUARD_CODE_800D090_H +#ifndef GUARD_CODE_800C9CC_H +#define GUARD_CODE_800C9CC_H #include "input.h" @@ -8,4 +8,4 @@ void xxx_call_update_bg_sound_input(void); void sub_800CB20(void); -#endif // GUARD_CODE_800D090_H \ No newline at end of file +#endif // GUARD_CODE_800C9CC_H diff --git a/include/dungeon.h b/include/dungeon.h index a6138569..4d57c00d 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -38,13 +38,23 @@ extern const DungeonName gDungeonNames[]; s32 GetDungeonFloorCount(u8 dungeon); const u8 *GetDungeonName1(u8 dungeon); +const u8 *GetDungeonName2(u8 dungeon); bool8 IsStairDirectionUp(u8 dungeon); +s16 GetTurnLimit(u8 dungeon); u32 GetMaxItemsAllowed(u8 dungeon); s8 GetRescuesAllowed(u8 dungeon); bool8 HasCheckpoint(u8 dungeon); s16 GetRandomMovementChance(u8 dungeon); void PrintYellowDungeonNametoBuffer(u8 *buffer, DungeonLocation *dungeonLocation); void PrintDungeonLocationtoBuffer(u8 *buffer, DungeonLocation *dungeonLocation); +bool8 IsKeepMoney(u8 dungeon); +bool8 IsLevelResetTo1(u8 dungeon); +bool8 DoEnemiesEvolveWhenKOed(u8 dungeon); +void CopyDungeonName1toBuffer(u8 *buffer, DungeonLocation *dungeonLocation); +s32 sub_80902C8(u8 dungeon); +void sub_80901D8(DungeonLocation *param_1,DungeonLocation *param_2); +bool8 CanLeaderSwitch(u8 dungeon); +bool8 sub_809017C(DungeonLocation* a1); u32 sub_80908D8(DungeonLocation *dungeon); u8 sub_8090910(DungeonLocation *dungeon, u32 param_2); diff --git a/include/dungeon_action.h b/include/dungeon_action.h index d8acfa2f..052e3bd5 100644 --- a/include/dungeon_action.h +++ b/include/dungeon_action.h @@ -3,6 +3,7 @@ #include "structs/dungeon_entity.h" +void SetLeaderActionToNothing(bool8 clearActionFields); void sub_8044C50(u16 action); void ClearMonsterActionFields(ActionContainer *actionPointer); void SetMonsterActionFields(ActionContainer *actionPointer, u16 action); diff --git a/include/dungeon_move.h b/include/dungeon_move.h index ccb15e65..dc928e93 100644 --- a/include/dungeon_move.h +++ b/include/dungeon_move.h @@ -4,6 +4,7 @@ #include "structs/str_pokemon.h" #include "structs/str_moves.h" +bool8 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId); bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30, bool32 isLinkedMove, struct Move *move); #endif diff --git a/include/dungeon_music.h b/include/dungeon_music.h index 53a70f40..c094e904 100644 --- a/include/dungeon_music.h +++ b/include/dungeon_music.h @@ -1,6 +1,8 @@ #ifndef GUARD_DUNGEON_MUSIC_H #define GUARD_DUNGEON_MUSIC_H +#include "structs/dungeon_entity.h" + void PlaySoundEffect(u32 songIndex); void StopSoundEffect(u32 songIndex); bool8 IsFanfareSEPlaying_2(u16 songIndex); @@ -11,6 +13,13 @@ void DungeonStopBGM(void); u16 DungeonGetCurrentBGSong(void); void StopDungeonBGM(void); void UpdateDungeonMusic(void); +void PlayDungeonCursorSE(bool8 checkMenuEntriesCount); +void PlayDungeonConfirmationSE(void); +void PlayDungeonCancelSE(void); +void PlayDungeonStartButtonSE(void); +void sub_8083D1C(void); +void sub_8083AB0(s16 param_0, Entity * target, Entity * entity); + #endif diff --git a/include/game_options.h b/include/game_options.h index 73f320bf..cd405511 100644 --- a/include/game_options.h +++ b/include/game_options.h @@ -67,5 +67,8 @@ bool8 GameOptionsNotChange(GameOptions *); void InitializeGameOptions(bool8 initializeGender); void LoadGameOptions(void); void SetWindowBGColor(void); +bool8 sub_8094C48(void); +bool8 DoesNotHaveShadedMap(void); +void sub_8094C88(void); -#endif // GUARD_GAME_OPTIONS_H \ No newline at end of file +#endif // GUARD_GAME_OPTIONS_H diff --git a/include/item_actions.h b/include/item_actions.h new file mode 100644 index 00000000..5d6410c0 --- /dev/null +++ b/include/item_actions.h @@ -0,0 +1,51 @@ +#ifndef INCLUDE_ITEM_ACTIONS_H +#define INCLUDE_ITEM_ACTIONS_H + +#include "structs/dungeon_entity.h" +void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Entity *target, Item *item); +bool8 sub_8048D50(Entity * pokemon, Item *item); +bool8 sub_8048950(Entity *param_1, Item *item); +bool8 sub_8048A68(Entity *param_1,Item *item); +bool8 sub_8048B9C(Entity *entity, Item *item); +void StunSeedItemAction(Entity *pokemon, Entity *target); +void MaxElixirAction(Entity *pokemon, Entity *target); +void ProteinItemAction(Entity *pokemon, Entity *target); +void CalciumItemAction(Entity *pokemon, Entity *target); +void IronItemAction(Entity *pokemon, Entity *target); +void ZincItemAction(Entity *pokemon, Entity *target); +void sub_80487CC(Entity *pokemon, Entity *target, u32 param_3, u32 param_4); +void GrimyFoodItemAction(Entity *pokemon, Entity *target); +void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 r2); +void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2); +void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2); +void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2); +void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2); +void nullsub_94(Entity *pokemon, Entity *target, u8 r2); +void KeyItemAction(Entity *pokemon, Entity *target, u8 r2); +void sub_8048340(Entity *pokemon, Entity *target, u32 r2); +void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2); +void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2); +void OranBerryItemAction(Entity *pokemon, Entity *target); +void ChestoBerryItemAction(Entity *pokemon, Entity *target); +void JoySeedItemAction(Entity *pokemon, Entity *target); +void GinsengItemAction(Entity *pokemon, Entity *target); +void BlastSeedItemAction(Entity *pokemon, Entity *target, u8 r2); +void SitrusBerryItemAction(Entity *pokemon, Entity *target); +void WarpSeedItemAction(Entity *pokemon, Entity *target); +void PlainSeedItemAction(Entity *pokemon, Entity *target); +void SleepSeedItemAction(Entity *pokemon, Entity *target); +void TotterSeedItemAction(Entity *pokemon, Entity *target); +void CheriBerryItemAction(Entity *pokemon, Entity *target); +void PechaBerryItemAction(Entity *pokemon, Entity *target); +void QuickSeedItemAction(Entity *pokemon, Entity *target); +void HungerSeedItemAction(Entity *pokemon, Entity *target); +void RawstBerryItemAction(Entity *pokemon, Entity *target); +void LifeSeedItemAction(Entity *pokemon, Entity *target); +void AllureSeedItemAction(Entity *pokemon, Entity *target); +void EyedropSeedItemAction(Entity *pokemon, Entity *target); +void BlinkerSeedItemAction(Entity *pokemon, Entity *target); +void DoomSeedItemAction(Entity *pokemon, Entity *target); +void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4); + + +#endif /* ifndef INCLUDE_ITEM_ACTIONS_H */ diff --git a/include/move_actions.h b/include/move_actions.h new file mode 100644 index 00000000..adc7be23 --- /dev/null +++ b/include/move_actions.h @@ -0,0 +1,233 @@ +#ifndef INCLUDE_MOVE_ACTION_H +#define INCLUDE_MOVE_ACTION_H + +#include "structs/dungeon_entity.h" + +bool8 MoveRequiresCharging(Entity* pokemon, u16 moveID); +void sub_8057588(Entity * pokemon, u8 param_2); +s16 sub_8057600(Move *move, s32 itemID); +bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); +bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); +bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FocusEnergyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); +bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); +bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BasicSleepMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TailGlowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SolarBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 LightScreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RazorWindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FocusPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MagicCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MorningSunMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MudWaterSportMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SpikesMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 VitalThrowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 FlyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BounceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DiveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DigMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 GrudgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805AAD0(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 sub_805B314(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ProtectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MirrorCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PerishSongMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 WeatherBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 TransformMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SplashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ReboundOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 ConversionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SnatchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 PsychUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); +bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); +bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); +bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4, s32 param_5); + + + +#endif // INCLUDE_MOVE_ACTION_H diff --git a/include/pokemon.h b/include/pokemon.h index 17db8060..83e76136 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -104,9 +104,14 @@ bool8 ComparePokemonNames(s16, s16); void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon); void GetPokemonLevelData(LevelData* a1, s32 _id, s32 level); const u8* DecompressMoveID(const u8* a1, u16* moveID); +s32 GetMovesLearnedAtLevel(u16* dst, s16 species, s32 level, s32 IQPoints); bool8 sub_808DA44(s32, u32); void sub_808D144(PokemonStruct1 *pokemon, struct unkStruct_808D144 *r1); void sub_808CE74(s16 _species, bool32 _isLeader, u8* name); +void xxx_pokemonstruct_index_to_pokemon2_808DE30(PokemonStruct2 *r0, u32 r1); +void xxx_pokemon2_to_pokemonstruct_index_808DF2C(s32 a1, PokemonStruct2* a2); +void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1* pokemon, PokemonStruct2* a2); +void sub_808DFDC(s32 a1, PokemonStruct2* a2); static inline bool8 PokemonFlag1(PokemonStruct1 *mon) { diff --git a/include/status.h b/include/status.h index 9bd8ca56..176e80c7 100644 --- a/include/status.h +++ b/include/status.h @@ -25,6 +25,7 @@ void HandleScannerOrb(Entity* pokemon, Entity* target); void HandleStairsOrb(Entity* pokemon, Entity* target); void HandleRadarOrb(Entity* pokemon, Entity* target); void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage); +void sub_8078084(Entity * pokemon); void DestinyBondStatusTarget(Entity * pokemon, Entity * target); void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns); void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns); diff --git a/ld_script.txt b/ld_script.txt index 4148b76d..b67a5858 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -211,7 +211,7 @@ SECTIONS { src/code_8045A00.o(.text); src/dungeon_items.o(.text); asm/code_8046CE4.o(.text); - src/code_8048480.o(.text); + src/item_actions.o(.text); src/dungeon_ai_item_weight.o(.text); src/dungeon_map_access.o(.text); src/tile_types.o(.text); @@ -578,7 +578,7 @@ SECTIONS { data/data_8109D10.o(.rodata); src/pokemon_3.o(.rodata); src/items.o(.rodata); - src/code_8048480.o(.rodata); + src/item_actions.o(.rodata); src/friend_area.o(.rodata); data/data_810AC60.o(.rodata); src/tile_types.o(.rodata); diff --git a/src/code_803D110.c b/src/code_803D110.c index 762afb0d..af76d32b 100644 --- a/src/code_803D110.c +++ b/src/code_803D110.c @@ -16,12 +16,9 @@ #include "structs/str_202EDE8.h" extern void sub_803E13C(void); -extern void sub_80901D8(DungeonLocation *param_1,DungeonLocation *param_2); -extern s32 sub_80902C8(u8 dungeon); extern void sub_808E9C4(UnkDungeonGlobal_unk1CD98 *r0, s16 r1); extern bool8 sub_80848EC(void); extern u8 GetFloorType(void); -extern const u8 *GetDungeonName2(u8 dungeon); extern const char gUnknown_80F4D8C[]; // "mapparam" extern const char gUnknown_80F60F8[]; // "banrpal" diff --git a/src/code_803E46C.c b/src/code_803E46C.c index c1cf6c4d..fd068c3f 100644 --- a/src/code_803E46C.c +++ b/src/code_803E46C.c @@ -5,8 +5,10 @@ #include "code_800558C.h" #include "code_8009804.h" #include "code_800C9CC.h" +#include "code_800DAC0.h" #include "code_80118A4.h" #include "code_803E668.h" +#include "code_806CD90.h" #include "dungeon_map.h" #include "bg_palette_buffer.h" #include "bg_control.h" @@ -15,6 +17,7 @@ #include "input.h" #include "play_time.h" #include "sprite.h" +#include "text.h" EWRAM_INIT u8 gUnknown_203B40C = 0; EWRAM_INIT u8 gUnknown_203B40D = 0; @@ -28,13 +31,10 @@ extern void sub_803E490(u32); void xxx_draw_string_80524F0(void); void sub_8085F78(void); void sub_803F580(s32); -void sub_806CC10(); void sub_804522C(); void sub_803F9CC(); -extern void xxx_call_update_bg_vram(void); void sub_803ECE0(); void sub_803EDF0(); -void sub_800E90C(); void sub_8042E5C(); void sub_800F7D0(DungeonPos *); void sub_803E874(s32, s32); diff --git a/src/code_803E724.c b/src/code_803E724.c index 64a70a27..e0ea4989 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -12,6 +12,7 @@ #include "code_800E9E4.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_map_access.h" +#include "dungeon_music.h" #include "sprite.h" #include "bg_control.h" #include "dungeon_map.h" @@ -56,11 +57,8 @@ extern u8 gUnknown_20274A5; extern s32 gDungeonFramesCounter; -extern void PlayDungeonStartButtonSE(void); -extern void ShowWholeRevealedDungeonMap(void); extern void sub_80400D4(void); extern void sub_8041888(u8 param_1); -extern void ShowDungeonMapAtPos(s32, s32); void sub_803EC94(void); s32 sub_803EF90(s32 a0, u8 a1); diff --git a/src/code_8042B34.c b/src/code_8042B34.c index 4fcad96d..e7a1828b 100644 --- a/src/code_8042B34.c +++ b/src/code_8042B34.c @@ -253,7 +253,6 @@ extern u8 gUnknown_203B40C; extern void sub_8040094(u8 r0); extern void sub_8068BDC(u8 r0); -extern s16 GetTurnLimit(u8 dungeon); extern void sub_8041888(u8 param_1); extern void sub_803D4AC(void); extern void sub_804513C(void); @@ -294,7 +293,6 @@ extern void nullsub_16(void); extern void sub_80521D0(void); extern void sub_803F27C(u8); extern void sub_807E7FC(u8); -extern bool8 IsLevelResetTo1(u8 dungeon); extern void sub_8068A84(PokemonStruct1 *pokemon); extern void sub_807EAA0(u32, u32); extern void sub_803D4D0(void); @@ -322,12 +320,9 @@ extern void ShowDungeonNameBanner(void); extern void sub_803EAF0(u32, u32); extern void sub_806A914(bool8 a0, bool8 a1, bool8 showRunAwayEffect); extern void sub_803F4A0(Entity *a0); -extern void sub_8083AB0(s16 param_0, Entity * target, Entity * entity); extern bool8 sub_8083C50(void); extern void sub_8068FE0(Entity *, u32, Entity *r2); extern void ResetMonEntityData(EntityInfo *, u32); -extern s32 GetMovesLearnedAtLevel(u16* dst, s16 species, s32 level, s32 IQPoints); -extern bool8 IsKeepMoney(u8 dungeon); extern void sub_8042B0C(Entity *); extern s16 gUnknown_2026E4E; diff --git a/src/code_8066D04.c b/src/code_8066D04.c index 9a240b9a..d19c510a 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -2,12 +2,14 @@ #include "globaldata.h" #include "code_8045A00.h" #include "dungeon_message.h" +#include "code_803E668.h" #include "code_807CD9C.h" #include "code_8041AD0.h" #include "code_806CD90.h" #include "dungeon_map_access.h" #include "dungeon_movement.h" #include "dungeon_music.h" +#include "item_actions.h" #include "position_util.h" #include "dungeon_util.h" #include "items.h" @@ -34,6 +36,7 @@ #include "constants/item.h" #include "constants/dungeon.h" #include "constants/move_id.h" +#include "move_actions.h" extern u8 *gUnknown_80F8BE0[]; extern u8 *gUnknown_80FF76C[]; @@ -82,21 +85,15 @@ extern u32 gUnknown_202F208; extern void sub_8071DA4(Entity *); extern void sub_806A1B0(Entity *); extern void sub_806A9B4(Entity *, u32); -extern void sub_8057588(Entity * pokemon, u8 param_2); extern void sub_8068FE0(Entity *, u32, Entity *r2); extern bool8 sub_806A58C(s16 a0); extern bool8 sub_806A564(s16 r0); extern void sub_8045C08(u8 *buffer, Item *item); extern bool8 sub_8045888(Entity *); extern Item *sub_8044D90(Entity *, s32, u32); -void sub_8045BF8(u8 *, Item *); -u8 sub_8048D50(); void SetActionUnusableInDungeonSubMenu(u16 param_1); void AddActionToDungeonSubMenu(u16 param_1, u8 param_2); -void sub_8044DF0(); void sub_8042208(Entity *pokemon, u8 r1); -void sub_803E708(); -void sub_80479B8(); extern void sub_807AB38(Entity *, u32); extern Entity * sub_8044DA4(Entity *param_1,int param_2); extern void sub_806A6E8(Entity *); @@ -514,7 +511,7 @@ void sub_8067110(Entity *entity) item2 = *item; sub_8044DF0(entity,0,0x66); sub_803E708(0x1e,0x11); - sub_80479B8(0,0,0,entity,entity,&item2); + sub_80479B8(FALSE,FALSE,FALSE,entity,entity,&item2); sub_807AB38(entity,gDungeon->forceMonsterHouse); } } diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 41748231..242ecc24 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -8,6 +8,7 @@ #include "constants/type.h" #include "constants/dungeon.h" #include "constants/iq_skill.h" +#include "dungeon.h" #include "dungeon_util.h" #include "code_803E668.h" #include "exclusive_pokemon.h" @@ -278,10 +279,8 @@ extern void sub_8042148(Entity *pokemon); extern void sub_8042A24(Entity *r0); extern void sub_806A390(Entity *r0); extern void sub_806F63C(Entity *r0); -extern void sub_8078084(Entity * pokemon); extern void sub_800DBBC(void); extern void sub_80464C8(Entity *, DungeonPos *, Item *); -extern bool8 DoEnemiesEvolveWhenKOed(u8 dungeon); extern bool8 sub_806FA5C(Entity *, Entity *, struct unkStruct_8069D4C *); extern void EntityUpdateStatusSprites(Entity *); extern bool8 sub_8045888(Entity *r0); diff --git a/src/code_80958E8.c b/src/code_80958E8.c index 52dec177..dfcdd03c 100644 --- a/src/code_80958E8.c +++ b/src/code_80958E8.c @@ -17,7 +17,6 @@ #include "event_flag.h" #include "rescue_team_info.h" -extern bool8 sub_809017C(DungeonLocation *); extern void sub_803C37C(struct DungeonLocation *, u8, u8 *); extern u8 sub_8097318(s16 param_1); diff --git a/src/dungeon.c b/src/dungeon.c index 2595455c..633f9705 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -42,7 +42,6 @@ extern u8 *gUnknown_8115E28[]; extern u8 *gUnknown_8115E80[]; extern u8 gUnknown_8108F50[]; -void sub_80901D8(DungeonLocation *param_1,DungeonLocation *param_2); s32 sub_8091E94(s32 a1, s32 a2, s32 a3); // items.c void sub_8090888(u8 *param_1, u8 *param_2); bool8 sub_8090820(u16 moveID); @@ -127,7 +126,7 @@ bool8 sub_809017C(DungeonLocation* a1) return FALSE; } -void sub_80901D8(DungeonLocation *param_1,DungeonLocation *param_2) +void sub_80901D8(DungeonLocation *param_1, DungeonLocation *param_2) { if (DUNGEON_IS_MAZE(param_2->id)) { param_1->id = DUNGEON_NORMAL_MAZE; @@ -169,7 +168,7 @@ s32 GetDungeonFloorCount(u8 dungeon) return gDungeonFloorCount[dungeon]; } -u8 sub_80902C8(u8 dungeon) +s32 sub_80902C8(u8 dungeon) { if (DUNGEON_IS_MAZE(dungeon)) return 0; diff --git a/src/dungeon_action.c b/src/dungeon_action.c index cabeda82..69be96f3 100644 --- a/src/dungeon_action.c +++ b/src/dungeon_action.c @@ -21,15 +21,12 @@ extern u8 gUnknown_80F697C[]; extern s16 gSpeedTurns[2][0x19]; extern void sub_8071B48(void); -extern void sub_8043ED0(u32); extern u8 GetFloorType(void); extern bool8 sub_8044B28(void); extern void sub_8086AC0(void); extern void sub_8043ED0(u32); extern void sub_807EAA0(u32, u32); extern void UseAttack(u32); - -extern void sub_8071B48(void); extern void TriggerWeatherAbilities(void); extern void sub_8074094(Entity *); extern void sub_8071DA4(Entity *); diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index b5b6193f..d330cbc3 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -18,12 +18,15 @@ #include "dungeon_capabilities.h" #include "dungeon_config.h" #include "dungeon_engine.h" +#include "dungeon_items.h" #include "dungeon_map_access.h" +#include "dungeon_move.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_random.h" #include "dungeon_util.h" #include "dungeon_visibility.h" #include "items.h" +#include "move_actions.h" #include "move_checks.h" #include "move_util.h" #include "moves.h" @@ -50,15 +53,11 @@ EWRAM_DATA Entity *gPotentialTargets[NUM_DIRECTIONS] = {0}; extern void sub_8055A00(Entity *, u8, u32, u32, u32); extern bool8 sub_8044B28(void); -extern void sub_8057588(Entity *, u32); extern void sub_806A1B0(Entity *); extern Item *sub_8044D90(Entity *, s32, u32); extern bool8 sub_8044D40(ActionContainer *, u32); -extern bool8 TryUseChosenMove(struct Entity *, u32, u32, u32, u32, struct Move *); -extern void sub_8045BF8(u8 *, struct Item *); extern void sub_8044DF0(struct Entity *, u32, u32); extern void sub_8071DA4(struct Entity *); -extern void sub_804AC20(DungeonPos *); extern void sub_807EC28(bool8); extern void sub_806A5B8(struct Entity *entity); diff --git a/src/dungeon_config.c b/src/dungeon_config.c index ca4fc5ed..c16e2419 100644 --- a/src/dungeon_config.c +++ b/src/dungeon_config.c @@ -1,122 +1,15 @@ #include "global.h" #include "globaldata.h" #include "dungeon_config.h" +#include "dungeon_move.h" #include "math.h" +#include "move_actions.h" #include "constants/weather.h" #include "constants/type.h" #include "constants/monster.h" #include "constants/dungeon_action.h" #include "constants/move_id.h" -// TODO: move these to header files -extern bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HandleRegularDamagingMove(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); - // Huge list of various config variables for dungeon moves/music/abilities/items/etc. All in one file, because these are scattered all around the codebase with only one pksdir present. // Monster House config diff --git a/src/dungeon_cutscenes.c b/src/dungeon_cutscenes.c index e7d67616..01aec60f 100644 --- a/src/dungeon_cutscenes.c +++ b/src/dungeon_cutscenes.c @@ -15,6 +15,7 @@ #include "constants/weather.h" #include "dungeon_items.h" #include "dungeon_leader.h" +#include "dungeon_map.h" #include "dungeon_map_access.h" #include "dungeon_message.h" #include "dungeon_music.h" @@ -372,17 +373,11 @@ extern s32 GetCameraYPos(void); extern void sub_803F878(u32, s32); extern void BgColorCallNullsub4(void); extern void sub_8085EB0(void); -extern void sub_8049884(void); -extern void sub_8049B8C(void); -extern void ShowWholeRevealedDungeonMap(void); -extern void sub_8086A54(Entity *); extern void ResetMonEntityData(EntityInfo *, u32); extern void sub_808BBA8(Entity * ); extern void sub_8041888(u32); extern u32 sub_80861F8(u32, Entity *, u32); extern u8 sub_80860A8(u32); -extern void sub_8052D44(s16 *, Entity *, Entity *); -extern void sub_80464C8(Entity *, DungeonPos *, Item *); extern void SetDungeonBGColorRGB(u32, u32, u32, u32, u32); extern u32 sub_8085EC8(u32, u32, u32, DungeonPos *, u32); extern void sub_807EAA0(u32, u32); @@ -393,7 +388,6 @@ extern u8 sub_8044B28(void); extern bool8 sub_8085B80(struct_8085B80 *); void sub_8085F44(s32); -void sub_808BBA8(Entity * ); void DeoxysScreenFlash(void); void sub_8086A54(Entity *); void ZapdosScreenFlash(s32 numFlashes); diff --git a/src/dungeon_engine.c b/src/dungeon_engine.c index 8ab386c0..3dcc4790 100644 --- a/src/dungeon_engine.c +++ b/src/dungeon_engine.c @@ -6,6 +6,7 @@ #include "dungeon_ai_leader.h" #include "dungeon_ai.h" #include "dungeon_leader.h" +#include "dungeon_main.h" #include "dungeon_movement.h" #include "dungeon_util.h" #include "structs/dungeon_entity.h" @@ -25,8 +26,6 @@ extern void sub_8086AC0(void); extern void sub_8043ED0(u32); extern void sub_8071DA4(Entity *); extern void TriggerWeatherAbilities(void); -extern void DungeonHandlePlayerInput(void); -extern void sub_805F02C(void); static void sub_8044454(void); static bool8 xxx_dungeon_80442D0(bool8); diff --git a/src/dungeon_generation.c b/src/dungeon_generation.c index a1559dbf..efd4fc93 100644 --- a/src/dungeon_generation.c +++ b/src/dungeon_generation.c @@ -2,6 +2,7 @@ #include "dungeon_generation.h" #include "file_system.h" #include "tile_types.h" +#include "dungeon_items.h" #include "dungeon_map_access.h" #include "dungeon_message.h" #include "dungeon_random.h" @@ -21,11 +22,8 @@ extern const u8 gUnknown_80F6DCC[]; extern struct FileArchive gDungeonFileArchive; -extern void AddItemToDungeonAt(DungeonPos *, Item *, u32); extern s32 sub_803DA20(s16 species); -extern void sub_8049840(void); extern void sub_80429FC(DungeonPos *r0); -extern void sub_80498A8(s32, s32); extern void sub_8049B8C(void); extern u8 GetFloorType(); extern void sub_806C330(s32 a0, s32 a1, s16 a2, u8 a3); diff --git a/src/dungeon_items.c b/src/dungeon_items.c index 0ccc4561..a4639aa5 100644 --- a/src/dungeon_items.c +++ b/src/dungeon_items.c @@ -1,6 +1,7 @@ #include "global.h" #include "globaldata.h" #include "dungeon_items.h" +#include "code_803E46C.h" #include "code_803E668.h" #include "code_8041AD0.h" #include "code_8045A00.h" @@ -10,6 +11,7 @@ #include "dungeon_leader.h" #include "dungeon_random.h" #include "dungeon_util.h" +#include "dungeon_util_1.h" #include "pokemon.h" #include "structs/str_dungeon.h" #include "constants/item.h" @@ -53,11 +55,8 @@ extern const u8 *gItemLost; extern const u8 *gAllItemsLost; extern void sub_80416E0(PixelPos *r0, u32, bool8); -extern void sub_80855E4(void *); -extern void PlaySoundEffect(u32); extern void sub_804178C(u32); extern void sub_804219C(PixelPos *pos); -extern void DungeonRunFrameActions(u32); extern bool8 sub_8045888(Entity *); extern u32 GetRandomFloorItem(u32); diff --git a/src/dungeon_main.c b/src/dungeon_main.c index 804f6c26..97d67165 100644 --- a/src/dungeon_main.c +++ b/src/dungeon_main.c @@ -1,6 +1,7 @@ #include "global.h" #include "globaldata.h" #include "dungeon_main.h" +#include "item_actions.h" #include "structs/str_dungeon.h" #include "number_util.h" #include "input.h" @@ -20,6 +21,7 @@ #include "code_8045A00.h" #include "string_format.h" #include "code_803E46C.h" +#include "code_803E668.h" #include "code_801602C.h" #include "code_800D090.h" #include "trap.h" @@ -60,28 +62,15 @@ extern void HandleSetItemAction(Entity *,bool8); extern void HandleUnsetItemAction(Entity *,bool8); -extern bool8 sub_8048A68(Entity *param_1,Item *item); -extern bool8 sub_8048950(Entity *param_1,Item *item); -extern bool8 sub_8048B9C(Entity *param_1,Item *item); extern Item *sub_8044D90(Entity *, s32, u32); -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); extern void sub_806A6E8(Entity *); -extern void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); bool8 sub_807EF48(void); void sub_806A2BC(Entity *a0, u8 a1); bool8 sub_80701A4(Entity *a0); -void sub_803E708(s32 a0, s32 a1); void sub_8075680(u32); -void sub_8094C88(void); -void ClearUnpaidFlagFromAllItems(void); void sub_806A914(u8 a0, u8 a1, u8 a2); -void SetLeaderActionToNothing(u8 a0); -u16 GetLeaderActionId(void); void sub_80978C8(s16 a0); static void TryCreateModeArrows(Entity *leader); -bool8 sub_8094C48(void); void sub_803E724(s32 a0); void HandleTalkFieldAction(Entity *); bool8 sub_8044B28(void); @@ -90,7 +79,6 @@ s32 GetTeamMemberEntityIndex(Entity *pokemon); bool8 sub_8070F80(Entity * pokemon, s32 direction); void sub_806752C(ActionContainer *a0); void sub_8067768(ActionContainer *a0); -void ChangeDungeonCameraPos(DungeonPos *pos, s32 a1, u8 a2, u8 a3); extern bool8 sub_8071A8C(Entity *pokemon); extern void GetWeatherName(u8 *dst, u8 weatherId); extern bool8 sub_8070F14(Entity * pokemon, s32 direction); @@ -101,8 +89,6 @@ extern void sub_803F508(Entity *); extern void sub_8041AD0(Entity *pokemon); extern void sub_8041AE0(Entity *pokemon); extern void sub_807EC28(bool8); -extern void PlayDungeonCursorSE(u8 param_1); -extern const u8 *GetCurrentDungeonName(void); extern Entity *gLeaderPointer; @@ -431,7 +417,7 @@ void DungeonHandlePlayerInput(void) } // SELECT button - if (!gDungeon->unk181e8.blinded && gGameOptionsRef->mapOption != 6 && gRealInputs.pressed & SELECT_BUTTON) { + if (!gDungeon->unk181e8.blinded && gGameOptionsRef->mapOption != TOP_MAP_AND_TEAM_NO_BOTTOM && gRealInputs.pressed & SELECT_BUTTON) { s32 prevMapOption = gGameOptionsRef->mapOption; gShowMonsterDotsInDungeonMap = TRUE; gDungeon->unk181e8.inFloorMapMode = TRUE; diff --git a/src/dungeon_map.c b/src/dungeon_map.c index 5de20775..de65ce47 100644 --- a/src/dungeon_map.c +++ b/src/dungeon_map.c @@ -25,9 +25,7 @@ extern s32 gUnknown_202EDD0; extern void nullsub_11(SpriteOAM *, s32, UnkSpriteMem *, unkStruct_2039DB0 *); extern u8 GetFloorType(void); -extern bool8 sub_8094C48(void); extern bool8 sub_8045804(Entity *ent); -extern bool8 DoesNotHaveShadedMap(void); struct UnkStruct1 { diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c index 85b325ea..d3992382 100644 --- a/src/dungeon_map_access.c +++ b/src/dungeon_map_access.c @@ -1,5 +1,6 @@ #include "global.h" #include "dungeon_map_access.h" +#include "dungeon_map.h" #include "code_8004AA0.h" #include "constants/walkable_tile.h" #include "decompress.h" @@ -37,7 +38,6 @@ EWRAM_DATA Tile gOutOfBoundsTileData = {0}; EWRAM_INIT const Tile *gCurTilesetOobTile = {NULL}; extern u8 sub_8043CE4(u32); -extern void ShowDungeonMapAtPos(s32, s32); extern int sprintf(char *, const char *, ...); const Tile *GetTile(s32 x, s32 y) diff --git a/src/dungeon_menu_items.c b/src/dungeon_menu_items.c index 848c3cec..30d97cb8 100644 --- a/src/dungeon_menu_items.c +++ b/src/dungeon_menu_items.c @@ -30,15 +30,10 @@ #include "code_801B3C0.h" #include "dungeon_capabilities.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); extern void sub_806A2BC(Entity *a0, u8 a1); -extern void SetLeaderActionToNothing(u8 a0); extern void sub_803E708(s32 a0, s32 a1); extern Item *sub_8044D90(Entity *, s32, u32); extern bool8 sub_8070F14(Entity * pokemon, s32 direction); -bool8 sub_805EC2C(Entity *a0, s32 x, s32 y); extern Entity *sub_80696A8(Entity *a0); extern u8 sub_806A538(s32); extern void sub_803EAF0(u32, u8 *); @@ -46,7 +41,6 @@ extern void sub_803F508(Entity *); extern void sub_8041AD0(Entity *pokemon); extern void sub_8041AE0(Entity *pokemon); extern void sub_807EC28(bool8); -extern void PlayDungeonCursorSE(u8 param_1); extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); extern s32 gDungeonSubMenuItemsCount; @@ -56,7 +50,6 @@ extern Item * sub_8044CC8(Entity *param_1, ActionParameter *param_2, UNUSED s32 extern void AddActionToDungeonSubMenu(u16 param_1, u8 param_2); extern void SetActionUnusableInDungeonSubMenu(u16 param_1); extern u16 sub_8044DC8(Item *param_1); -extern bool8 sub_8046F00(Item *item); extern void sub_8045064(void); extern bool8 PosHasItem(DungeonPos *pos); diff --git a/src/dungeon_menu_moves.c b/src/dungeon_menu_moves.c index ec55f194..ee04a6a7 100644 --- a/src/dungeon_menu_moves.c +++ b/src/dungeon_menu_moves.c @@ -7,6 +7,7 @@ #include "input.h" #include "structs/map.h" #include "dungeon_main.h" +#include "dungeon_map_access.h" #include "dungeon_message.h" #include "dungeon_action.h" #include "dungeon_random.h" @@ -17,6 +18,7 @@ #include "code_8045A00.h" #include "string_format.h" #include "code_803E46C.h" +#include "code_803E668.h" #include "status_checks_1.h" #include "dungeon_leader.h" #include "tile_types.h" @@ -28,27 +30,18 @@ #include "code_8044CC8.h" #include "move_util.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); extern void sub_8045064(void); extern void sub_803EAF0(u32, u8 *); -extern void sub_803E708(s32 a0, s32 a1); extern void AddActionToDungeonSubMenu(u16 param_1, u8 param_2); extern void SetActionUnusableInDungeonSubMenu(u16 param_1); extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); extern s32 GetTeamMemberEntityIndex(Entity *pokemon); -extern void ChangeDungeonCameraPos(DungeonPos *pos, s32 a1, u8 a2, u8 a3); -extern void SetLeaderActionToNothing(u8 a0); extern void sub_806752C(ActionContainer *a0); -extern void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 a1); extern void sub_8067768(ActionContainer *a0); extern void sub_806A2BC(Entity *a0, u8 a1); extern bool8 sub_8071A8C(Entity *pokemon); -extern void sub_8083D1C(void); extern s32 ActionToDungeonSubMenuId(u16 param_1); extern s32 gDungeonSubMenuItemsCount; diff --git a/src/dungeon_menu_others.c b/src/dungeon_menu_others.c index abd6c853..6346c769 100644 --- a/src/dungeon_menu_others.c +++ b/src/dungeon_menu_others.c @@ -2,11 +2,14 @@ #include "globaldata.h" #include "dungeon_menu_others.h" #include "dungeon_menu_recruitment.h" +#include "dungeon_engine.h" +#include "dungeon_music.h" #include "dungeon_submenu.h" #include "dungeon.h" #include "text.h" #include "menu_input.h" #include "input.h" +#include "code_803E46C.h" #include "code_8044CC8.h" #include "dungeon_action.h" #include "dungeon_util.h" @@ -20,20 +23,12 @@ #include "dungeon_main.h" #include "dungeon_map.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern void sub_803EAF0(u32, u8 *); extern bool8 CanSubMenuItemBeChosen(s32 param_1); -extern void DungeonRunFrameActions(u32 a0); extern void DungeonShowWindows(WindowTemplates *a0, bool8 a1); extern void AddActionToDungeonSubMenu(u16 actionId, u8 param_2); extern void sub_8045064(void); -extern bool8 IsBossFight(void); -extern u16 GetLeaderActionId(void); extern void sub_803E13C(void); -extern void sub_8083AB0(s16 param_0, Entity * target, Entity * entity); extern MenuInputStruct gDungeonMenu; diff --git a/src/dungeon_menu_recruitment.c b/src/dungeon_menu_recruitment.c index d2406bb3..c5f848a7 100644 --- a/src/dungeon_menu_recruitment.c +++ b/src/dungeon_menu_recruitment.c @@ -1,7 +1,9 @@ #include "global.h" #include "globaldata.h" #include "dungeon_menu_recruitment.h" +#include "code_803E46C.h" #include "dungeon.h" +#include "dungeon_music.h" #include "text.h" #include "menu_input.h" #include "input.h" @@ -11,16 +13,10 @@ #include "sprite.h" #include "exclusive_pokemon.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern void sub_803EAF0(u32, u8 *); extern bool8 CanSubMenuItemBeChosen(s32 param_1); -extern void DungeonRunFrameActions(u32 a0); extern void DungeonShowWindows(const WindowTemplates *a0, bool8 a1); extern void AddActionToDungeonSubMenu(u16 actionId, u8 param_2); -extern u16 GetLeaderActionId(void); extern u32 sub_8014140(s32 a0, const void *a1); extern void sprintfStatic(char *buffer, const char *text, ...); extern u8 sub_806F9BC(s32); diff --git a/src/dungeon_menu_stairs.c b/src/dungeon_menu_stairs.c index 182faa68..622280f3 100644 --- a/src/dungeon_menu_stairs.c +++ b/src/dungeon_menu_stairs.c @@ -3,11 +3,13 @@ #include "dungeon_menu_stairs.h" #include "dungeon_menu_team.h" #include "dungeon_menu_moves.h" +#include "dungeon_music.h" #include "dungeon_submenu.h" #include "dungeon.h" #include "text.h" #include "menu_input.h" #include "input.h" +#include "code_803E46C.h" #include "code_8044CC8.h" #include "dungeon_action.h" #include "dungeon_util.h" @@ -16,13 +18,8 @@ #include "code_8097DD0.h" #include "dungeon_generation.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern void sub_803EAF0(u32, u8 *); extern bool8 CanSubMenuItemBeChosen(s32 param_1); -extern void DungeonRunFrameActions(u32 a0); extern void DungeonShowWindows(WindowTemplates *a0, bool8 a1); extern void AddActionToDungeonSubMenu(u16 actionId, u8 param_2); extern void sub_8045064(void); diff --git a/src/dungeon_menu_team.c b/src/dungeon_menu_team.c index 38783049..03ec4499 100644 --- a/src/dungeon_menu_team.c +++ b/src/dungeon_menu_team.c @@ -7,9 +7,11 @@ #include "number_util.h" #include "input.h" #include "structs/map.h" +#include "dungeon.h" +#include "dungeon_action.h" #include "dungeon_main.h" #include "dungeon_message.h" -#include "dungeon_action.h" +#include "dungeon_misc.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_random.h" #include "dungeon_util.h" @@ -46,63 +48,26 @@ #include "code_8097DD0.h" #include "move_util.h" -extern bool8 sub_8048A68(Entity *param_1,Item *item); -extern bool8 sub_8048950(Entity *param_1,Item *item); -extern bool8 sub_8048B9C(Entity *param_1,Item *item); extern Item *sub_8044D90(Entity *, s32, u32); -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern void sub_806A6E8(Entity *); -extern void HandleTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4); bool8 sub_807EF48(void); void sub_806A2BC(Entity *a0, u8 a1); -bool8 sub_805E874(void); bool8 sub_80701A4(Entity *a0); -void sub_805E738(Entity *a0); void sub_803E708(s32 a0, s32 a1); -void sub_8040A78(void); -void sub_805E804(void); -void ShowDungeonOthersMenu(void); void sub_8075680(u32); -void sub_8094C88(void); -void sub_8040A84(void); void sub_806A914(u8 a0, u8 a1, u8 a2); -void SetLeaderActionToNothing(u8 a0); -u16 GetLeaderActionId(void); void sub_80978C8(s16 a0); bool8 sub_8094C48(void); -bool8 sub_805EC4C(Entity *a0, u8 a1); void sub_803E724(s32 a0); void HandleTalkFieldAction(Entity *); bool8 sub_8044B28(void); bool8 IsNotAttacking(Entity *param_1, bool8 param_2); -void ShowMainMenu(bool8 fromBPress, bool8 a1); -bool8 sub_805EF60(Entity *a0, EntityInfo *a1); bool8 sub_8070F80(Entity * pokemon, s32 direction); -void PrintOnMainMenu(bool8 printAll); -bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1); -void DungeonShowItemDescription(UNUSED ActionContainer *a0); -bool8 ShowDungeonTeamMenu(Entity *a0); -void ActionShowMoveInfo(ActionContainer *a0); -void ActionToggleMoveUsableForAi(ActionContainer *a0); -void ActionLinkMoves(ActionContainer *a0); -void sub_806752C(ActionContainer *a0); -void ActionSetOrUnsetMove(ActionContainer *a0, bool8 a1); -void ActionDelinkMoves(ActionContainer *a0, bool8 a1); -void sub_8067768(ActionContainer *a0); -void ChangeDungeonCameraPos(DungeonPos *pos, s32 a1, u8 a2, u8 a3); extern void sub_80643AC(Entity *pokemon); -extern bool8 ShowDungeonMovesMenu(Entity * entity, u8 a1, u8 a2, s32 a3, s32 a4); extern bool8 sub_8070F14(Entity * pokemon, s32 direction); -bool8 sub_805EC2C(Entity *a0, s32 x, s32 y); extern Entity *sub_80696A8(Entity *a0); -extern u8 sub_806A538(s32); extern void sub_803EAF0(u32, u8 *); extern void sub_803F508(Entity *); -extern void sub_8041AD0(Entity *pokemon); -extern void sub_8041AE0(Entity *pokemon); extern void sub_807EC28(bool8); extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); @@ -116,9 +81,7 @@ extern u16 sub_8044DC8(Item *param_1); extern bool8 sub_8046F00(Item *item); extern void sub_8045064(void); extern void sub_8070968(u8 *buffer, EntityInfo *entityInfo, s32 colorNum); -extern bool8 CanLeaderSwitch(u8 dungeon); extern void GetAvailTacticsforLvl(u8 *tacticsBuffer, s32 pokeLevel); -extern void sub_8069844(struct unkStruct_808FF20 *param_1, Entity *target); extern u32 sub_8014140(s32 a0, const void *a1); extern char* sub_808E4FC(s32 a1); extern char* sub_808E51C(s32 a1); diff --git a/src/dungeon_menu_tile.c b/src/dungeon_menu_tile.c index 79d5bea0..7ff13534 100644 --- a/src/dungeon_menu_tile.c +++ b/src/dungeon_menu_tile.c @@ -3,6 +3,7 @@ #include "dungeon_menu_tile.h" #include "dungeon_menu_team.h" #include "dungeon_menu_moves.h" +#include "dungeon_music.h" #include "dungeon_submenu.h" #include "dungeon.h" #include "text.h" @@ -16,10 +17,6 @@ #include "trap.h" #include "code_8097DD0.h" -extern void PlayDungeonStartButtonSE(void); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void PlayDungeonCursorSE(u8 param_1); extern void sub_803EAF0(u32, u8 *); extern bool8 CanSubMenuItemBeChosen(s32 param_1); extern void DungeonRunFrameActions(u32 a0); diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 69220ffc..29f9c3c7 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -1,6 +1,8 @@ #include "global.h" #include "dungeon_message.h" #include "dungeon_map.h" +#include "dungeon_main.h" +#include "dungeon_music.h" #include "dungeon.h" #include "structs/dungeon_entity.h" #include "code_803E46C.h" @@ -32,15 +34,9 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, u8 r2); static bool8 sub_8052DC0(Entity *); extern bool8 sub_8045888(Entity *pokemon); -extern void sub_805E804(void); extern void sub_803EAF0(s32, s32); extern void sub_8083E28(void); extern u32 sub_8014140(s32 a0, const void *a1); -extern void PlayDungeonCancelSE(void); -extern void PlayDungeonConfirmationSE(void); -extern void sub_8007334(s32 a0); -extern void sub_80087EC(s32 a0, s32 a1, s32 a2, s32 a3, s32 a4); -extern void PlayDungeonCursorSE(u8 param_1); extern u32 gUnknown_202EDD0; extern u8 gUnknown_203B40C; diff --git a/src/dungeon_misc.c b/src/dungeon_misc.c index 792ea387..ace84143 100644 --- a/src/dungeon_misc.c +++ b/src/dungeon_misc.c @@ -1,12 +1,14 @@ #include "global.h" #include "globaldata.h" #include "dungeon_misc.h" +#include "status.h" #include "structs/str_dungeon.h" #include "dungeon_util.h" #include "dungeon_util_1.h" #include "file_system.h" #include "pokemon.h" #include "pokemon_3.h" +#include "structs/str_pokemon.h" #include "text.h" #include "moves.h" #include "string_format.h" @@ -14,12 +16,14 @@ #include "code_80450F8.h" #include "code_8045A00.h" #include "code_803E668.h" +#include "dungeon.h" #include "dungeon_engine.h" #include "move_effects_target.h" #include "dungeon_map_access.h" #include "dungeon_map.h" #include "dungeon_leader.h" #include "dungeon_message.h" +#include "dungeon_music.h" #include "dungeon_pokemon_attributes.h" #include "constants/dungeon.h" #include "constants/friend_area.h" @@ -50,55 +54,22 @@ static void EnsureCastformLoaded(void); static void EnsureDeoxysLoaded(void); extern s32 sprintf(char *, const char *, ...); -extern bool8 IsLevelResetTo1(u8 dungeon); -extern void xxx_pokemonstruct_index_to_pokemon2_808DE30(void* r0, u32 r1); -extern void DeletePokemonDungeonSprite(s32 id); extern void sub_803E178(void); extern void sub_806C264(s32 teamIndex, EntityInfo *entInfo); -extern void sub_8083AB0(s16 param_0, Entity * target, Entity * entity); -extern bool8 sub_806A58C(s16 r0); extern void sub_8084E00(Entity *entity, u8 param_2, u8 param_3); -extern void sub_8078084(Entity * pokemon); -extern void xxx_pokemon2_to_pokemonstruct_index_808DF2C(s32 a1, PokemonStruct2* a2); -extern void sub_808DFDC(s32 a1, PokemonStruct2* a2); -extern void xxx_pokemon2_to_pokemonstruct_808DF44(PokemonStruct1*, PokemonStruct2*); extern void sub_8067A80(u8 a0, s32 a1, s32 a2, PokemonStruct1 **a3); extern bool8 sub_8070F80(Entity * pokemon, s32 direction); -extern s32 sub_806A4DC(EntityInfo *info); extern void sub_8042900(Entity *r0); extern void sub_8042968(Entity *r0); -extern void EndAbilityImmuneStatus(Entity *, Entity *); extern void sub_8041BBC(Entity *r0); extern bool8 sub_8045888(Entity *); -extern void sub_806A2BC(Entity *, u8); extern void sub_804178C(u32); extern void sub_803F508(Entity *); extern void sub_8042B20(Entity *entity); extern void sub_8042B0C(Entity *entity); -extern s32 sub_803D808(UnkDungeonGlobal_unk1CD98 *strPtr, s32 id); -extern void sub_8072AC8(u16 *param_1, s32 species, s32 param_3); -extern s16 sub_803D970(u32); -extern bool8 sub_8083660(const DungeonPos *param_1); -extern void sub_803F4A0(Entity *a0); -extern bool8 sub_80860A8(u8 id); -extern u8 sub_803D73C(s32 a0); extern void DeletePokemonDungeonSprite(s32 id); -extern void sub_80429E8(Entity *r0); -extern s32 sub_803DA20(s32 param_1); -extern s32 gDungeonFramesCounter; -extern void sub_800F958(s32 dungeonSpriteID, DungeonPos *pos, DungeonPos *statusOffsets, u32 a3); -extern void sub_8005700(DungeonPos *a0, struct axObject *a1); -extern u32 EntityGetStatusSprites(Entity *entity); -extern void UpdateDungeonPokemonSprite(int id, short species, int status, char visible); -extern void sub_8042EC8(Entity *a0, s32 a1); -extern Entity *sub_804550C(s16 a); -extern Entity *sub_80453AC(s16 id); extern void sub_803F580(s32); -extern void ShowWholeRevealedDungeonMap(void); -extern void sub_806B678(void); extern void EntityUpdateStatusSprites(Entity *); -extern Entity *sub_80696A8(Entity *a0); -extern int sprintf(char *, const char *, ...); extern const struct FileArchive gDungeonFileArchive; extern u8 *gUnknown_80FE168[]; @@ -134,8 +105,6 @@ extern DungeonPos gPlayerDotMapPosition; extern DungeonPos gUnknown_202EE0C; extern u8 gUnknown_202F32C; -bool8 sub_806A538(s16 r0); -bool8 sub_806A564(s16 r0); static bool8 sub_806A5A4(s16 r0); void OpenDungeonPaletteFile(void) diff --git a/src/dungeon_move.c b/src/dungeon_move.c index 504ba78e..cb080691 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -40,12 +40,12 @@ #include "code_8041AD0.h" #include "code_800E9E4.h" #include "dungeon_config.h" +#include "move_actions.h" extern void sub_80429C8(Entity *r0); extern bool8 sub_8045888(Entity *r0); extern void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4, bool32 arg8, s32 argC); extern void CalcDamage(Entity *, Entity *, u8, u32, u32, struct DamageStruct *dmgStruct, s24_8, u16, u32); -extern s16 sub_8057600(Move *move, s32 itemID); extern void sub_803ED30(s32, Entity *r0, u8, s32); extern void sub_8042238(Entity *pokemon, Entity *target); extern void sub_806A1E8(Entity *pokemon); @@ -68,238 +68,15 @@ extern Entity *sub_806977C(Entity *); extern void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct DamageStruct *dmgStruct); extern void MarkLastUsedMonMove(Entity *entity, Move *move); extern s32 sub_8057070(Move *move); -extern bool8 MoveRequiresCharging(Entity* pokemon,u16 param_2); extern s32 sub_800ED20(u16 param_1); -extern bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); extern void sub_8042930(Entity *r0); extern void sub_8041B48(Entity *pokemon); extern void sub_8041BA8(Entity *pokemon); extern void sub_8042950(Entity *r0); -extern void sub_80421C0(Entity *pokemon, u16 r1); -extern bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 YawnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 NightmareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PainSplitMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WhirlpoolMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FakeTearsMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SpiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ReturnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); -extern bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4); -extern bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GigaDrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ReversalMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmellingSaltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FocusEnergyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); -extern bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,u32 param_4,u8 param_5); extern void SetShopkeeperAggression(Entity *, Entity *); extern bool8 MoveCausesPaused(Move *move); extern void sub_8069F9C(Entity *pokemon,Entity * target,Move *move); extern void sub_806A120(Entity *pokemon,Entity * target,Move *move); -extern bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5); -extern bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BasicSleepMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TailGlowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SolarBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 LightScreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RazorWindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FocusPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MagicCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MorningSunMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MudWaterSportMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SpikesMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 VitalThrowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 FlyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BounceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DiveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DigMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 GrudgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805AAD0(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 sub_805B314(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ProtectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MirrorCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PerishSongMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 WeatherBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 TransformMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SplashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ReboundOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 ConversionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SnatchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 PsychUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); -extern bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4); s32 HandleDamagingMove(Entity *, Entity *, Move *, s24_8, s32); static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk); @@ -1645,7 +1422,7 @@ static void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move } } -bool32 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId) +bool8 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId) { return (HandleDamagingMove(attacker, target, move, IntToF248_2(1), itemId) != 0); } diff --git a/src/friend_areas_map.c b/src/friend_areas_map.c index 9fd1d79c..b92152e8 100644 --- a/src/friend_areas_map.c +++ b/src/friend_areas_map.c @@ -18,16 +18,9 @@ #include "decompress.h" #include "constants/friend_area.h" -extern u32 sub_809034C(u8 dungeonIndex, s32 speciesId_, u8 *buffer, bool32 param_4_, bool32 param_5_); -extern void sub_801178C(void); -extern void sub_80117C4(void); extern void PlayCancelSoundEffect(void); extern void PlayAcceptSoundEffect(void); extern void PlayCursorUpDownSoundEffect(void); -extern s32 sprintf(char *, const char *, ...); -extern void sub_800CB20(void); -extern void xxx_call_update_bg_sound_input(void); -extern void CopyDungeonName1toBuffer(u8 *buffer, DungeonLocation *dungeonLocation); extern s32 Atan2_4096(PixelPos *a); extern void sub_80117AC(void); extern void sub_8011760(void); diff --git a/src/friend_areas_map_util.c b/src/friend_areas_map_util.c index 03199647..1013f3b6 100644 --- a/src/friend_areas_map_util.c +++ b/src/friend_areas_map_util.c @@ -20,8 +20,6 @@ #include "decompress.h" #include "constants/direction.h" -extern void sub_800CB20(void); -extern void xxx_call_update_bg_sound_input(void); extern s32 sprintf(char *, const char *, ...); extern const FileArchive gTitleMenuFileArchive; diff --git a/src/code_8048480.c b/src/item_actions.c similarity index 93% rename from src/code_8048480.c rename to src/item_actions.c index 7ac03bd5..fdbad9f7 100644 --- a/src/code_8048480.c +++ b/src/item_actions.c @@ -1,4 +1,5 @@ #include "global.h" +#include "item_actions.h" #include "code_803E668.h" #include "code_8041AD0.h" #include "code_8045A00.h" @@ -70,11 +71,8 @@ extern void sub_8078B5C(Entity *, Entity *, u32, u32, u32); extern u8 sub_806A538(s32); extern void sub_8051E7C(Entity *pokemon); extern void sub_8045BF8(u8 *, Item *); -extern void ActionShowMoveInfo(ActionContainer *); -extern void ActionLinkMoves(ActionContainer *); extern void sub_8044DF0(Entity *, u32, u32); extern void sub_803EAF0(u32, u32); -extern void SetLeaderActionToNothing(bool8); extern void sub_8044E24(Entity *, u32, u32); extern void sub_804245C(Entity *, Item *); extern u8 sub_8072938(Entity *, u16); @@ -86,50 +84,8 @@ Entity *sub_80696FC(Entity *); extern void DisplayMsgIfNewIqSkillLearned(EntityInfo *, s32); extern u32 HandleDamagingMove(struct Entity *, struct Entity *, struct Move *, u32, u32); -void StunSeedItemAction(Entity *, Entity *); -void MaxElixirAction(Entity *, Entity *); -void ProteinItemAction(Entity *, Entity *); -void CalciumItemAction(Entity *, Entity *); -void IronItemAction(Entity *, Entity *); -void ZincItemAction(Entity *, Entity *); -void sub_80487CC(Entity *, Entity *, u32, u32); -void GrimyFoodItemAction(Entity *, Entity *); -void HandleGummiItemAction(Entity *, Entity *, u8); -void IcePartItemAction(Entity *, Entity *, u8); -void SteelPartItemAction(Entity *, Entity *, u8); -void RockPartItemAction(Entity *, Entity *, u8); -void MusicBoxItemAction(Entity *, Entity *, u8); -void nullsub_94(Entity *, Entity *, u8); -void KeyItemAction(Entity *, Entity *, u8); -void sub_8078B5C(Entity *, Entity *, u32, u32, u32); -void sub_8048340(Entity *, Entity *, u32); -void HealSeedItemAction(Entity *, Entity *, u8); -void WishStoneItemAction(Entity *, Entity *, u8); -void OranBerryItemAction(Entity *, Entity *); -void ChestoBerryItemAction(Entity *, Entity *); -void JoySeedItemAction(Entity *, Entity *); -void GinsengItemAction(Entity *, Entity *); -void BlastSeedItemAction(Entity *, Entity *, u8); -void SitrusBerryItemAction(Entity *, Entity *); -void WarpSeedItemAction(Entity *, Entity *); -void PlainSeedItemAction(Entity *, Entity *); -void SleepSeedItemAction(Entity *, Entity *); -void TotterSeedItemAction(Entity *, Entity *); -void CheriBerryItemAction(Entity *, Entity *); -void PechaBerryItemAction(Entity *, Entity *); -void QuickSeedItemAction(Entity *, Entity *); -void HungerSeedItemAction(Entity *, Entity *); -void RawstBerryItemAction(Entity *, Entity *); -void LifeSeedItemAction(Entity *, Entity *); -void AllureSeedItemAction(Entity *, Entity *); -void EyedropSeedItemAction(Entity *, Entity *); -void BlinkerSeedItemAction(Entity *, Entity *); -void DoomSeedItemAction(Entity *, Entity *); -void sub_80482FC(Entity *, Entity *, u32, u8); - extern void sub_8071DA4(Entity *); extern void SetShopkeeperAggression(Entity *, Entity *); -extern void sub_80464C8(Entity *, DungeonPos *, Item *); extern void sub_806A6E8(Entity *); extern void sub_8042390(Entity *, Item *); @@ -163,7 +119,7 @@ bool8 sub_8047930(Entity *pokemon, Entity *target) return flag; } -void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity *target, Item *item) +void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Entity *target, Item *item) { EntityInfo *info; u32 flag; diff --git a/src/move_actions.c b/src/move_actions.c index 1047ef50..c7e45313 100644 --- a/src/move_actions.c +++ b/src/move_actions.c @@ -12,6 +12,7 @@ #include "constants/targeting.h" #include "constants/type.h" #include "constants/weather.h" +#include "dungeon_ai.h" #include "dungeon_ai_targeting.h" #include "dungeon_items.h" #include "dungeon_map_access.h" @@ -112,14 +113,12 @@ extern bool8 gUnknown_202F220; extern void sub_806A5B8(Entity *entity); extern void sub_80694C0(Entity *, s32, s32, u32); -void sub_8075900(Entity *pokemon, u8 r1); extern u8 sub_8044B28(void); extern void sub_807EC28(bool8); extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32); extern void CalcDamage(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32); static void sub_805A7D4(Entity *, Entity *, Item *, DungeonPos *); extern void MudWaterSportEffect(u32); -extern void CalcDamage(Entity *, Entity *, u8, u32, u32, s32 *, u32, u16, u32); extern void sub_806A6E8(Entity *); extern void EndAbilityImmuneStatus(Entity *, Entity *); diff --git a/src/pokemon.c b/src/pokemon.c index f7855d4a..c8721000 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -9,6 +9,7 @@ #include "decompress.h" #include "file_system.h" #include "pokemon_3.h" +#include "structs/str_pokemon.h" #include "text_util.h" #include "moves.h" #include "friend_area.h" @@ -935,7 +936,7 @@ bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId) return (gMonsterParameters[index].dialogueSprites >> spriteId) & 1; } -void xxx_pokemonstruct_index_to_pokemon2_808DE30(void* r0, u32 r1) +void xxx_pokemonstruct_index_to_pokemon2_808DE30(PokemonStruct2 *r0, u32 r1) { xxx_pokemonstruct_to_pokemon2_808DE50(r0, &gRecruitedPokemonRef->pokemon[r1], r1); } diff --git a/src/status.c b/src/status.c index 22b92fe9..c527dbe2 100644 --- a/src/status.c +++ b/src/status.c @@ -11,6 +11,7 @@ #include "dungeon_ai_movement.h" #include "dungeon_ai_targeting.h" #include "dungeon_items.h" +#include "dungeon_map.h" #include "dungeon_map_access.h" #include "dungeon_message.h" #include "dungeon_movement.h" @@ -140,7 +141,6 @@ extern void nullsub_84(Entity *); extern void nullsub_85(Entity *); extern void sub_803F580(u32); -extern void ShowWholeRevealedDungeonMap(void); extern void sub_8041D9C(Entity *); extern void sub_8041DB0(Entity *pokemon); extern void sub_8041CA8(Entity *); diff --git a/src/status_actions.c b/src/status_actions.c index 1f714d7d..8e62aa41 100644 --- a/src/status_actions.c +++ b/src/status_actions.c @@ -16,10 +16,12 @@ #include "dungeon_ai_targeting.h" #include "dungeon_engine.h" #include "dungeon_items.h" +#include "dungeon_map.h" #include "dungeon_map_access.h" #include "dungeon_pokemon_attributes.h" #include "dungeon_util.h" #include "dungeon_visibility.h" +#include "move_actions.h" #include "move_util.h" #include "moves.h" #include "number_util.h" @@ -42,11 +44,7 @@ extern void sub_8068FE0(Entity *, u32, Entity *r2); extern void sub_806F370(Entity *r0, Entity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32); extern void sub_807FC3C(DungeonPos *, u32, u32); extern void sub_8042A64(DungeonPos *); -extern void ShowWholeRevealedDungeonMap(void); -extern void sub_80498A8(s32, s32); extern void sub_8042A54(DungeonPos *); -extern void sub_8049BB0(s32, s32); -extern s16 sub_8057600(Move*, u32); extern u32 sub_8055864(Entity *pokemon, Entity *target, Move *param_3, s32 param_4, s32 param_5); extern void HandleDroughtOrbAction(Entity *); extern void HandleLuminousOrbAction(Entity *pokemon); @@ -76,7 +74,6 @@ extern void SqueezedStatusTarget(Entity *, Entity *, s32, bool32); extern void SleepStatusTarget(Entity *, Entity *, s32, s32); extern void DealDamageToEntity(Entity *, s32, u32, u32); -extern bool8 MoveRequiresCharging(Entity* pokemon,u16 moveID); extern void sub_80783C4(Entity *, Entity *, bool8); @@ -122,7 +119,7 @@ extern u32 gMetronomeCalledArrayId; extern u8 *gUnknown_80FEFF4[]; -bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 param_4) +bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { EntityInfo *entityInfo; s32 maxHp; @@ -149,7 +146,7 @@ bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, u32 para return flag; } -bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move) +bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4) { ParalyzeStatusTarget(pokemon,target, TRUE); return TRUE; @@ -182,13 +179,13 @@ bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa return flag; } -bool8 RoarMoveAction(Entity * pokemon, Entity * target) +bool8 RoarMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4) { BlowAwayTarget(pokemon, target, GetEntInfo(pokemon)->action.direction); return TRUE; } -bool8 HandleColorChange(Entity * pokemon, Entity * target) +bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 param_4) { u8 newType; const char *typeString; diff --git a/src/world_map.c b/src/world_map.c index 67f3d3cb..746c3c5a 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -3,12 +3,12 @@ #include "world_map.h" #include "sprite.h" #include "code_8004AA0.h" +#include "dungeon.h" #include "input.h" #include "text.h" #include "code_8009804.h" #include "bg_palette_buffer.h" #include "string_format.h" -#include "code_800D090.h" #include "friend_area.h" #include "bg_control.h" #include "code_800558C.h" @@ -30,9 +30,6 @@ extern void PlayCancelSoundEffect(void); extern void PlayAcceptSoundEffect(void); extern void PlayCursorUpDownSoundEffect(void); extern s32 sprintf(char *, const char *, ...); -extern void sub_800CB20(void); -extern void xxx_call_update_bg_sound_input(void); -extern void CopyDungeonName1toBuffer(u8 *buffer, DungeonLocation *dungeonLocation); extern s32 Atan2_4096(PixelPos *a); extern void sub_80117AC(void); extern void sub_8011760(void);