From 9f571c0d949429026efdf7923db88a5f329dc7cd Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 6 Oct 2025 13:17:09 +0200 Subject: [PATCH] include file for move orb effects 2 --- include/code_8077274_1.h | 19 ++++-------------- include/move_orb_actions_2.h | 1 - include/move_orb_effects_2.h | 38 ++++++++++++++++++++++++++++++++++++ include/status.h | 20 ------------------- include/trap.h | 1 + src/code_8023144.c | 4 ---- src/code_8066D04.c | 4 ++-- src/dungeon_damage.c | 2 +- src/dungeon_item_action.c | 2 +- src/dungeon_misc.c | 2 +- src/dungeon_move_util.c | 1 + src/dungeon_turn_effects.c | 1 + src/friend_list.c | 12 ++++++------ src/move_orb_actions_1.c | 1 + src/move_orb_actions_2.c | 1 + src/move_orb_actions_3.c | 1 + src/move_orb_actions_4.c | 1 + src/move_orb_actions_5.c | 3 ++- src/move_orb_effects_2.c | 6 ++---- src/move_orb_effects_5.c | 4 ++-- src/trap.c | 1 + sym_ewram_init.txt | 1 + 22 files changed, 68 insertions(+), 58 deletions(-) diff --git a/include/code_8077274_1.h b/include/code_8077274_1.h index 964cec26b..ff268009c 100644 --- a/include/code_8077274_1.h +++ b/include/code_8077274_1.h @@ -3,21 +3,10 @@ #include "structs/dungeon_entity.h" -void MuzzleTarget(Entity *pokemon, Entity *target); -void TransformStatusTarget(Entity * pokemon, Entity * target); -void MobileStatusTarget(Entity * pokemon, Entity * target); -void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3); -void IdentityItemHolders(Entity *pokemon, Entity *target); -void BlindTarget(Entity *pokemon, Entity *target); -void CrossEyeVisionTarget(Entity *pokemon, Entity *target); -void RestoreVisionTarget(Entity *pokemon, Entity *target); -void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3); -void RaiseAtkStatTarget(Entity * pokemon,Entity * target, s32 increment); -void RaiseSpAtkStatTarget(Entity * pokemon,Entity * target, s32 increment); -void RaiseDefStatTarget(Entity * pokemon,Entity * target, s32 increment); -void RaiseSpDefStatTarget(Entity * pokemon,Entity * target, s32 increment); -void LongTossStatusTarget(Entity * pokemon,Entity * target); -void PierceStatusTarget(Entity * pokemon,Entity * target); +// TODO: Remove this file + + + void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *move, const u8 *message); void sub_8079764(Entity * pokemon); void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus); diff --git a/include/move_orb_actions_2.h b/include/move_orb_actions_2.h index fddf05910..46fa2a15a 100644 --- a/include/move_orb_actions_2.h +++ b/include/move_orb_actions_2.h @@ -49,7 +49,6 @@ bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); -void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3); bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 itemId); bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 itemId); diff --git a/include/move_orb_effects_2.h b/include/move_orb_effects_2.h index b615b9e45..bf58d7c51 100644 --- a/include/move_orb_effects_2.h +++ b/include/move_orb_effects_2.h @@ -3,6 +3,44 @@ #include "structs/dungeon_entity.h" +void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage); +void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage); +void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, bool32 displayMessage); +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); +void FixedDamageStatusTarget(Entity *pokemon, Entity * target); +void FocusEnergyStatusTarget(Entity *pokemon, Entity * target); +void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3); +void CurseStatusTarget(Entity *pokemon, Entity * target); +void SnatchStatusTarget(Entity * pokemon, Entity * target); +void TauntStatusTarget(Entity * pokemon, Entity * target); +void HandleStockpile(Entity * pokemon, Entity * target); +void InvisibleStatusTarget(Entity * pokemon, Entity * target); +void PerishSongTarget(Entity * pokemon, Entity * target); +void EncoreStatusTarget(Entity * pokemon, Entity * target); +void sub_8078A58(struct Entity *pokemon, struct Entity *target, s32 param_3, s32 param_4); +void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBellyIncrement, bool8 displayMessage); +void MuzzleTarget(Entity *pokemon, Entity *target); +void TransformStatusTarget(Entity * pokemon, Entity * target); +void MobileStatusTarget(Entity * pokemon, Entity * target); +void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3); +void IdentityItemHolders(Entity *pokemon, Entity *target); +void BlindTarget(Entity *pokemon, Entity *target); +void CrossEyeVisionTarget(Entity *pokemon, Entity *target); +void RestoreVisionTarget(Entity *pokemon, Entity *target); +void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3); +void RaiseAtkStatTarget(Entity * pokemon,Entity * target, s32 increment); +void RaiseSpAtkStatTarget(Entity * pokemon,Entity * target, s32 increment); +void RaiseDefStatTarget(Entity * pokemon,Entity * target, s32 increment); +void RaiseSpDefStatTarget(Entity * pokemon,Entity * target, s32 increment); +void LongTossStatusTarget(Entity * pokemon,Entity * target); +void PierceStatusTarget(Entity * pokemon,Entity * target); #endif diff --git a/include/status.h b/include/status.h index 9bd8ca56f..56ed61bb2 100644 --- a/include/status.h +++ b/include/status.h @@ -18,25 +18,5 @@ void CringeStatusTarget(Entity * pokemon,Entity * target, bool8 displayMessage); void ParalyzeStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage); void RaiseMovementSpeedTarget(Entity * pokemon, Entity * target, s32 turns, bool8 diplayMessage); void LowerMovementSpeedTarget(Entity * pokemon, Entity * target, s32 levels, bool8 displayMessage); -void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage); -void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage); -void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, bool32 displayMessage); -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 DestinyBondStatusTarget(Entity * pokemon, Entity * target); -void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns); -void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns); -void FixedDamageStatusTarget(Entity *pokemon, Entity * target); -void FocusEnergyStatusTarget(Entity *pokemon, Entity * target); -void CurseStatusTarget(Entity *pokemon, Entity * target); -void SnatchStatusTarget(Entity * pokemon, Entity * target); -void TauntStatusTarget(Entity * pokemon, Entity * target); -void HandleStockpile(Entity * pokemon, Entity * target); -void InvisibleStatusTarget(Entity * pokemon, Entity * target); -void PerishSongTarget(Entity * pokemon, Entity * target); -void EncoreStatusTarget(Entity * pokemon, Entity * target); -void sub_8078A58(struct Entity *pokemon, struct Entity *target, s32 param_3, s32 param_4); #endif diff --git a/include/trap.h b/include/trap.h index ae07d1579..87c0e59fe 100644 --- a/include/trap.h +++ b/include/trap.h @@ -6,6 +6,7 @@ #include "structs/str_position.h" void sub_807FA9C(void); +void sub_807FC3C(DungeonPos *pos, u32 trapID, u32 param_3); bool8 CanLayTrap(DungeonPos *pos); bool8 LayTrap(DungeonPos *pos, u8 trapID, u8 param_3); bool8 sub_807FD84(Entity *entity); diff --git a/src/code_8023144.c b/src/code_8023144.c index 394796c56..7503d93b5 100644 --- a/src/code_8023144.c +++ b/src/code_8023144.c @@ -18,10 +18,6 @@ EWRAM_INIT static u32 gUnknown_203B298 = {1}; EWRAM_INIT static u16 gUnknown_203B29C = {0}; EWRAM_INIT static u16 gUnknown_203B29E = {0}; -EWRAM_INIT s32 gUnknown_203B2A0 = 2; -EWRAM_INIT s32 gUnknown_203B2A4 = 1; -EWRAM_INIT u16 gUnknown_203B2A8 = 0; -EWRAM_INIT u16 gUnknown_203B2AA = 0; static IWRAM_INIT unkStruct_3001B5C *gUnknown_3001B5C = {NULL}; diff --git a/src/code_8066D04.c b/src/code_8066D04.c index d6af519d9..581aaced3 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -46,8 +46,8 @@ #include "dungeon_monster_house.h" #include "warp_target.h" -extern void sub_8057588(Entity * pokemon, u8 param_2); -void sub_8042208(Entity *pokemon, u8 r1); +extern void sub_8042208(Entity *pokemon, u8 r1); + Entity *sub_806773C(Entity *entity); void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2); void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2); diff --git a/src/dungeon_damage.c b/src/dungeon_damage.c index 8d0996f4d..e5fe4ad68 100644 --- a/src/dungeon_damage.c +++ b/src/dungeon_damage.c @@ -47,6 +47,7 @@ #include "hurl_orb.h" #include "dungeon_mon_spawn.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" extern void sub_8041B18(Entity *pokemon); extern void sub_8041B90(Entity *pokemon); @@ -59,7 +60,6 @@ extern bool8 sub_806A58C(s16 a0); extern void sub_8042148(Entity *pokemon); extern void sub_8042A24(Entity *r0); extern void sub_806A390(Entity *r0); -extern void sub_8078084(Entity * pokemon); extern void sub_800DBBC(void); extern bool8 sub_806FA5C(Entity *, Entity *, struct unkStruct_8069D4C *); extern void EntityUpdateStatusSprites(Entity *); diff --git a/src/dungeon_item_action.c b/src/dungeon_item_action.c index a14535c79..83207463a 100644 --- a/src/dungeon_item_action.c +++ b/src/dungeon_item_action.c @@ -40,8 +40,8 @@ #include "dungeon_leveling.h" #include "warp_target.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" -extern void sub_8078B5C(Entity *, Entity *, u32, u32, u32); extern void sub_804245C(Entity *, Item *); extern s32 sub_8042520(Entity *); extern void sub_8042390(Entity *, Item *); diff --git a/src/dungeon_misc.c b/src/dungeon_misc.c index ef8acdb79..c518caf89 100644 --- a/src/dungeon_misc.c +++ b/src/dungeon_misc.c @@ -52,12 +52,12 @@ #include "dungeon_mon_spawn.h" #include "dungeon_info.h" #include "dungeon_monster_house.h" +#include "move_orb_effects_2.h" static void EnsureCastformLoaded(void); static void EnsureDeoxysLoaded(void); extern bool8 sub_806A58C(s16 r0); -extern void sub_8078084(Entity * pokemon); extern void sub_8067A80(u8 a0, s32 a1, s32 a2, Pokemon **a3); extern bool8 sub_8070F80(Entity * pokemon, s32 direction); extern s32 sub_806A4DC(EntityInfo *info); diff --git a/src/dungeon_move_util.c b/src/dungeon_move_util.c index e3f131235..7b1ab07c0 100644 --- a/src/dungeon_move_util.c +++ b/src/dungeon_move_util.c @@ -34,6 +34,7 @@ #include "sprite.h" #include "status.h" #include "move_orb_actions_4.h" +#include "move_orb_effects_2.h" #include "weather.h" #include "targeting_flags.h" #include "pokemon_types.h" diff --git a/src/dungeon_turn_effects.c b/src/dungeon_turn_effects.c index e49e1a472..09f89935c 100644 --- a/src/dungeon_turn_effects.c +++ b/src/dungeon_turn_effects.c @@ -38,6 +38,7 @@ #include "dungeon_misc.h" #include "dungeon_range.h" #include "dungeon_move_util.h" +#include "move_orb_effects_2.h" #include "warp_target.h" extern void sub_805229C(void); diff --git a/src/friend_list.c b/src/friend_list.c index 4dc1ccd3d..7c026a854 100644 --- a/src/friend_list.c +++ b/src/friend_list.c @@ -17,8 +17,6 @@ #include "ground_map.h" #include "constants/input.h" -static IWRAM_INIT struct unkStruct_3001B60 *sFriendList = {NULL}; - static void SortbyAlphabetNo(s32, s32); static void SortbyInternalNo(s32, s32); static void SortbyName(s32, s32); @@ -28,10 +26,12 @@ static void SetUpWindowHeader(void); static s32 sub_8023BD8(void); static s32 sub_8023F8C(void); -extern s32 gUnknown_203B2A0; -extern s32 gUnknown_203B2A4; -extern u16 gUnknown_203B2A8; -extern u16 gUnknown_203B2AA; +static IWRAM_INIT struct unkStruct_3001B60 *sFriendList = {NULL}; + +static EWRAM_INIT s32 gUnknown_203B2A0 = 2; +static EWRAM_INIT s32 gUnknown_203B2A4 = 1; +static EWRAM_INIT u16 gUnknown_203B2A8 = 0; +static EWRAM_INIT u16 gUnknown_203B2AA = 0; static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY; diff --git a/src/move_orb_actions_1.c b/src/move_orb_actions_1.c index dd6392101..b7aff0247 100644 --- a/src/move_orb_actions_1.c +++ b/src/move_orb_actions_1.c @@ -1,6 +1,7 @@ #include "global.h" #include "globaldata.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" #include "dungeon_move_util.h" #include "dungeon_vram.h" #include "dungeon_tilemap.h" diff --git a/src/move_orb_actions_2.c b/src/move_orb_actions_2.c index 27306687d..563364a1f 100644 --- a/src/move_orb_actions_2.c +++ b/src/move_orb_actions_2.c @@ -1,6 +1,7 @@ #include "global.h" #include "globaldata.h" #include "move_orb_actions_2.h" +#include "move_orb_effects_2.h" #include "dungeon_move_util.h" #include "dungeon_vram.h" #include "dungeon_tilemap.h" diff --git a/src/move_orb_actions_3.c b/src/move_orb_actions_3.c index 5abbc869c..7e32d4ea8 100644 --- a/src/move_orb_actions_3.c +++ b/src/move_orb_actions_3.c @@ -35,6 +35,7 @@ #include "status.h" #include "move_orb_actions_4.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" #include "structs/dungeon_entity.h" #include "structs/map.h" #include "dungeon_damage.h" diff --git a/src/move_orb_actions_4.c b/src/move_orb_actions_4.c index 7180fa66b..a8b81aa7e 100644 --- a/src/move_orb_actions_4.c +++ b/src/move_orb_actions_4.c @@ -3,6 +3,7 @@ #include "move_orb_actions_4.h" #include "move_orb_actions_2.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" #include "dungeon_ai.h" #include "dungeon_move_util.h" #include "dungeon_message.h" diff --git a/src/move_orb_actions_5.c b/src/move_orb_actions_5.c index 6ba61b924..c409d0097 100644 --- a/src/move_orb_actions_5.c +++ b/src/move_orb_actions_5.c @@ -17,8 +17,9 @@ #include "dungeon_pos_data.h" #include "dungeon_floor_spawns.h" #include "hurl_orb.h" +#include "trap.h" +#include "move_orb_effects_2.h" -extern void sub_807FC3C(DungeonPos *, u32, u32); extern void sub_8042A54(DungeonPos *); extern void sub_8042A64(DungeonPos *); diff --git a/src/move_orb_effects_2.c b/src/move_orb_effects_2.c index d1af8cfe6..e521554a7 100644 --- a/src/move_orb_effects_2.c +++ b/src/move_orb_effects_2.c @@ -1,5 +1,6 @@ #include "global.h" #include "globaldata.h" +#include "move_orb_effects_2.h" #include "status.h" #include "dungeon_vram.h" #include "code_806CD90.h" @@ -14,6 +15,7 @@ #include "dungeon_map_access.h" #include "dungeon_message.h" #include "dungeon_util.h" +#include "dungeon_map.h" #include "math.h" #include "move_effects_target.h" #include "number_util.h" @@ -50,10 +52,8 @@ extern void nullsub_82(Entity *); extern void nullsub_83(Entity *); extern void nullsub_84(Entity *); extern void nullsub_85(Entity *); -extern void UpdateMinimap(); extern void EntityUpdateStatusSprites(Entity *); extern void sub_8042A74(Entity *r0); -extern void DealDamageToEntity(Entity *, s16, u32, u32); extern void sub_80420C8(Entity *r0); extern void nullsub_68(Entity *); extern void nullsub_67(Entity *); @@ -90,7 +90,6 @@ extern void sub_8041CA8(Entity *); extern void sub_8041C94(Entity *); extern void sub_8041BF8(Entity *); extern void sub_8041BE8(Entity *); -extern void EntityUpdateStatusSprites(Entity *); void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage) { @@ -1308,4 +1307,3 @@ void PierceStatusTarget(Entity * pokemon, Entity * target) } EntityUpdateStatusSprites(target); } - diff --git a/src/move_orb_effects_5.c b/src/move_orb_effects_5.c index 1759e8566..072ae87a0 100644 --- a/src/move_orb_effects_5.c +++ b/src/move_orb_effects_5.c @@ -32,11 +32,11 @@ #include "dungeon_misc.h" #include "dungeon_mon_spawn.h" #include "dungeon_kecleon_shop.h" +#include "dungeon_map.h" +#include "move_orb_effects_2.h" -extern void UpdateMinimap(); extern void EntityUpdateStatusSprites(Entity *); extern void sub_8042A74(Entity *r0); -extern void HealTargetHP(Entity *pokemon, Entity *r1, s16, s16, u32); extern void sub_80420C8(Entity *r0); extern void nullsub_68(Entity *); extern void nullsub_67(Entity *); diff --git a/src/trap.c b/src/trap.c index 0554d700a..483d2d143 100644 --- a/src/trap.c +++ b/src/trap.c @@ -38,6 +38,7 @@ #include "explosion.h" #include "dungeon_mon_spawn.h" #include "move_orb_actions_1.h" +#include "move_orb_effects_2.h" void sub_80421EC(DungeonPos *, u32); void sub_804225C(Entity *, DungeonPos *, u8); diff --git a/sym_ewram_init.txt b/sym_ewram_init.txt index daa877e9e..b0bc35ac3 100644 --- a/sym_ewram_init.txt +++ b/sym_ewram_init.txt @@ -59,6 +59,7 @@ .include "src/wigglytuff_shop3.o" .include "src/code_80227B8.o" .include "src/code_8023144.o" +.include "src/friend_list.o" .include "src/code_8024458.o" .include "src/luminous_cave.o" .include "src/friend_list_menu.o"