remove more externs from dungeon files

This commit is contained in:
DizzyEggg
2025-10-26 17:55:23 +01:00
parent db0b90b255
commit a25912e9fa
19 changed files with 21 additions and 78 deletions

View File

@@ -4,5 +4,6 @@
#include "structs/dungeon_entity.h"
void RunMonsterAI(Entity *pokemon, u32 unused);
void sub_8075BA4(Entity *param_1, u8 param_2);
#endif

View File

@@ -31,6 +31,7 @@ extern bool8 gUnknown_203B434;
void sub_80521D0(void);
void sub_8052210(bool8 a0);
void sub_805229C(void);
// These functions display the string if certain conditions are met. The conditions differ depending on the function. The string is then saved to the message log.
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str);

View File

@@ -55,6 +55,7 @@ void sub_806A1B0(Entity *pokemon);
void sub_806A1E8(Entity *pokemon);
void sub_806A240(Entity *pokemon, Entity *target);
void TryPointCameraToMonster(Entity *pokemon, u8 param_2);
void nullsub_95(Entity *pokemon);
void sub_806A338(void);
void sub_806A390(Entity *pokemon);
void sub_806A3D4(u8 *dst, s32 _a1, s32 id, bool32 _a3);

View File

@@ -17,9 +17,13 @@ bool8 EntityIsValid(Entity *pokemon);
u32 GetEntityType(Entity *entity);
u8 GetEntityRoom(Entity *entity);
Tile *GetTileAtEntitySafe(Entity *entity);
void sub_804513C(void);
void sub_804522C(void);
void UpdateEntityPixelPos(Entity *entity, PixelPos *pos);
void SetEntityPixelPos(Entity *entity, s32 x, s32 y);
void IncreaseEntityPixelPos(Entity *entity, s32 x, s32 y);
Entity *sub_80453AC(s32 _species);
Entity *sub_804550C(s32 _species);
Item *GetItemInfo(Entity *entity);
Item *GetItemData_1(Entity *entity);
Trap *GetTrapInfo(Entity *entity);
@@ -27,6 +31,7 @@ Trap* GetTrapData_1(Entity *entity);
Entity *SpawnTrap(u8 trapID, DungeonPos *pos, u8 c);
Entity *SpawnItemEntity(DungeonPos *pos);
void sub_80457DC(Entity* ent);
bool8 ShouldMinimapDisplayEntity(Entity *ent);
bool8 ShouldDisplayEntity(Entity *ent);
bool8 CanSeeTarget(Entity *entity, Entity *targetEntity);
bool8 CanTargetEntity(Entity *entity, Entity *targetEntity);

View File

@@ -41,12 +41,8 @@
#include "dungeon_entity_movement.h"
#include "dungeon_ai_items.h"
#include "dungeon_ai_attack.h"
void sub_8075BA4(Entity *param_1, u8 param_2);
void nullsub_95(Entity *);
void sub_8041888(u8 param_1);
void sub_805EFB4(Entity *, u8);
void sub_806A1E8(Entity *pokemon);
#include "dungeon_ai.h"
#include "dungeon_main.h"
EWRAM_DATA u8 gUnknown_202F32C = 0;
EWRAM_DATA u8 gUnknown_202F32D = 0;

View File

@@ -47,13 +47,8 @@
#include "move_orb_actions_1.h"
#include "move_orb_effects_2.h"
#include "move_orb_effects_5.h"
extern void sub_803ED30(s32, Entity *r0, u8, s32);
extern bool8 sub_806A458(Entity *);
extern bool8 sub_806A58C(s16 a0);
extern void sub_806A390(Entity *r0);
extern void sub_800DBBC(void);
extern void PointCameraToMonster(Entity *);
#include "dungeon_tilemap.h"
#include "effect_main.h"
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8);
static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 type, DamageStruct *dmgStruct);

View File

@@ -23,8 +23,6 @@
#include "dungeon_entity_movement.h"
#include "dungeon_wind.h"
extern void sub_805F02C(void);
static void sub_8044454(void);
static bool8 RunLeaderTurn(bool8);
static void sub_8044574(void);

View File

@@ -22,10 +22,6 @@
#include "dungeon_mon_spawn.h"
#include "run_dungeon.h"
extern s32 sub_803DA20(s16 species);
extern void sub_8049840(void);
extern void sub_80498A8(s32, s32);
enum CardinalDirection
{
CARDINAL_DIR_RIGHT,

View File

@@ -32,8 +32,6 @@
static EWRAM_DATA s32 sNewAtkStats[2] = {0, 0};
static EWRAM_DATA s32 sNewDefStats[2] = {0, 0};
void sub_8042A44(Entity *r0);
static const u8 gUnknown_8107010[8] = {0, 1, 1, 2, 1, 1, 0, 0};
static const u8 * const gUnknown_8107018[3] = {
_(""),

View File

@@ -23,8 +23,6 @@
#include "trap.h"
#include "run_dungeon.h"
extern bool8 ShouldMinimapDisplayEntity(Entity *ent);
struct UnkStruct1
{
u32 **unk0;

View File

@@ -32,10 +32,6 @@
#include "text_3.h"
#include "run_dungeon.h"
extern bool8 IsFloorwideFixedRoom(void);
extern u16 GetLeaderActionId(void);
static void PrintOthersMenuOptions(void);
static void ShowGameOptionsMenu(void);
static void ShowQuickSaveGiveUpMenu(void);

View File

@@ -55,24 +55,10 @@
#include "move_orb_effects_5.h"
#include "dungeon_recruit_release_menu.h"
#include "dungeon_8041AD0.h"
#include "dungeon_pokemon_sprites.h"
static void EnsureCastformLoaded(void);
static void EnsureDeoxysLoaded(void);
extern bool8 sub_806A58C(s16 r0);
extern bool8 sub_8070F80(Entity * pokemon, s32 direction);
extern s32 sub_806A4DC(EntityInfo *info);
extern s16 sub_803D970(u32);
extern bool8 sub_80860A8(u8 id);
extern u8 sub_803D73C(s32 a0);
extern void DeletePokemonDungeonSprite(s32 id);
extern s32 sub_803DA20(s32 param_1);
extern Entity *sub_804550C(s16 a);
extern Entity *sub_80453AC(s16 id);
extern u8 gUnknown_202F32C;
bool8 sub_806A564(s16 r0);
static bool8 sub_806A5A4(s16 r0);
void OpenDungeonPaletteFile(void)
@@ -1282,7 +1268,7 @@ void TryPointCameraToMonster(Entity *pokemon, u8 param_2)
}
}
void nullsub_95(void)
void nullsub_95(Entity *pokemon)
{}
void ReevaluateSnatchMonster(void)
@@ -1512,8 +1498,6 @@ void sub_806A6E8(Entity *entity)
}
}
void DisplayMsgIfNewIqSkillLearned(EntityInfo *info, s32 pokeIq);
UNUSED static void DisplayMsgIfTeamMonsLearnedNewIqSkill(void)
{
s32 i;

View File

@@ -37,11 +37,8 @@
#include "dungeon_engine.h"
#include "dungeon_leveling.h"
#include "dungeon_8041AD0.h"
extern bool8 sub_80860A8(u8 id);
extern u8 gUnknown_202F32C;
extern Entity *sub_804550C(s16 a);
extern Entity *sub_80453AC(s16 id);
#include "dungeon_cutscene.h"
#include "dungeon_action_execution.h"
static s32 CalcSpeciesHPAtLevel(s32 species, s32 level);
static s32 CalcSpeciesAtkAtLevel(s32 species, s32 level, s32 categoryIndex);

View File

@@ -44,13 +44,6 @@
#include "warp_target.h"
#include "dungeon_ai_attack.h"
extern s16 GetDungeonExitReasonFromMoveOrItem(Move *move, s32 itemID);
extern void sub_806A1E8(Entity *pokemon);
extern bool8 sub_8040BB0(Entity *entity, Move *move, bool8);
extern void sub_8040DA0(Entity *entity, Move *move);
extern u16 GetEffectiveMoveId(u16 moveId, u8 weather, u8 hasSpecialEffect);
extern void sub_800EF10(u16 r0);
extern void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2);
extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *);
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_);

View File

@@ -44,12 +44,9 @@
#include "dungeon_damage.h"
#include "dungeon_leveling.h"
extern void sub_806A1E8(Entity *pokemon);
extern bool8 sub_8040BB0(Entity *entity, Move *move, bool8);
extern void sub_8040DA0(Entity *entity, Move *move);
extern u16 GetEffectiveMoveId(u16 moveId, u8 weather, u8 hasSpecialEffect);
extern void sub_800EF10(u16 r0);
extern void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2);
extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *);
static u8 ToItemID(u32 itemID);

View File

@@ -42,9 +42,7 @@
#include "move_orb_effects_5.h"
#include "dungeon_8041AD0.h"
#include "dungeon_entity_movement.h"
extern void sub_805229C(void);
extern void sub_805E804(void);
#include "dungeon_main.h"
void ApplyEndOfTurnEffects(Entity *entity)
{

View File

@@ -33,6 +33,8 @@
#include "dungeon_engine.h"
#include "dungeon_cutscene.h"
#include "effect_main.h"
#include "dungeon_mon_sprite_render.h"
#include "dungeon_8041AD0.h"
// File split is correct. This technical file deals with windows, advancing frames(v-blanks) and vram / pal set-up.
@@ -47,10 +49,6 @@ extern struct DungeonPalFile *gUnknown_202EC94;
extern RGB gUnknown_202ECA4[];
extern OpenedFile *gUnknown_202EC9C;
void sub_806CC10();
void sub_804522C();
void sub_8042E5C();
static void sub_803E490(u32);
static void sub_803EC94(void);
static void sub_803ECE0(void);

View File

@@ -61,6 +61,7 @@
#include "dungeon_action_execution.h"
#include "dungeon_8041AD0.h"
#include "ground_main.h"
#include "dungeon_mon_sprite_render.h"
EWRAM_INIT struct UnkStruct_203B414 *gUnknown_203B414 = NULL;
EWRAM_INIT Dungeon *gDungeon = NULL;
@@ -68,7 +69,6 @@ static EWRAM_INIT u8 *gSerializedData_203B41C = NULL;
extern void sub_8068BDC(u8 r0);
extern void sub_803D4AC(void);
extern void sub_804513C(void);
extern void sub_8068F28(void);
extern void IncrementThievingSuccesses(void);
extern void sub_8043D60(void);
@@ -84,16 +84,9 @@ extern void ReevaluateSnatchMonster(void);
extern void sub_8051E3C(void);
extern void sub_807FA18(void);
extern void sub_806A974(void);
extern void DetermineAllMonsterShadow(void);
extern void sub_8068F80(void);
extern bool8 TryForcedLoss(bool8);
extern void sub_806A914(bool8 a0, bool8 a1, bool8 showRunAwayEffect);
extern u8 gUnknown_202F1A8;
void EnforceMaxItemsAndMoney(void);
static void sub_8043FD0(void);
extern OpenedFile *gDungeonNameBannerPalette;
// These functions are not part of dungeon's overlay5 and connect, in a way, overworld with dungeon.
@@ -101,6 +94,7 @@ extern OpenedFile *gDungeonNameBannerPalette;
static const s16 sDeoxysForms[4] = {MONSTER_DEOXYS_NORMAL, MONSTER_DEOXYS_ATTACK, MONSTER_DEOXYS_DEFENSE, MONSTER_DEOXYS_SPEED};
static void sub_8043CD8(void);
static void sub_8043FD0(void);
// Actual function in Sky. Macro instead of static inline for matching
#define GetForcedLossReason()(gDungeon->unk10)

View File

@@ -39,9 +39,6 @@
#include "move_orb_effects_2.h"
#include "move_orb_effects_4.h"
void sub_806A1E8(Entity *pokemon);
Entity *sub_8045684(u8, DungeonPos *, u8);
void sub_807FA18(void)
{
s32 x, y;