diff --git a/include/dungeon_misc.h b/include/dungeon_misc.h index e303da8e4..3473128b6 100644 --- a/include/dungeon_misc.h +++ b/include/dungeon_misc.h @@ -6,20 +6,13 @@ #include "structs/str_pokemon.h" #include "pokemon_3.h" -// NOTE: basically Offense struct but packed to match -struct unkStruct_8069D4C_sub -{ - - u8 att[2]; // Atk, SpAtk - u8 def[2]; // Def, SpDef -} __attribute__((packed)); - struct unkStruct_8069D4C { s16 id; DungeonPos pos; s16 HP; - struct unkStruct_8069D4C_sub offense; + u8 att[2]; // Atk, SpAtk + u8 def[2]; // Def, SpDef u16 level; u32 exp; FixedPoint belly; diff --git a/src/code_806CD90.c b/src/code_806CD90.c index 0810e0ac0..e054d151d 100644 --- a/src/code_806CD90.c +++ b/src/code_806CD90.c @@ -12,7 +12,7 @@ #include "code_803E668.h" #include "exclusive_pokemon.h" #include "code_8077274_1.h" -#include "code_8069D4C.h" +#include "dungeon_misc.h" #include "code_8045A00.h" #include "position_util.h" #include "game_options.h" @@ -20,7 +20,7 @@ #include "status.h" #include "pokemon.h" #include "random.h" -#include "targeting.h" +#include "dungeon_misc.h" #include "sprite.h" #include "structs/str_dungeon.h" #include "tile_types.h" @@ -275,8 +275,6 @@ extern bool8 sub_806F660(Entity *, Entity *); extern bool8 sub_806A58C(s16 a0); extern void sub_8071D4C(Entity *pokemon, Entity *target, s32 exp); extern void sub_8042148(Entity *pokemon); -extern void sub_8068FE0(Entity *, u32, Entity *r2); -extern void sub_80694C0(Entity *, s32, s32, u32); extern void sub_8042A24(Entity *r0); extern void sub_806A390(Entity *r0); extern void sub_806F63C(Entity *r0); diff --git a/src/code_806FDF4.c b/src/code_806FDF4.c index 7aa696d21..c4ed20b67 100644 --- a/src/code_806FDF4.c +++ b/src/code_806FDF4.c @@ -1,7 +1,7 @@ #include "global.h" #include "constants/type.h" #include "structs/str_pokemon.h" -#include "code_8069D4C.h" +#include "dungeon_misc.h" #include "code_80118A4.h" #include "code_803E668.h" #include "code_8045A00.h" @@ -38,7 +38,6 @@ extern u8 *gUnknown_80FA0C8[]; extern u8 *gUnknown_80FA120[]; extern u8 *gUnknown_80FA090[]; -void sub_8068FE0(Entity *, u32, Entity *); u8 sub_806B8CC(); bool8 DungeonGiveNameToRecruitedMon(u8 *a0); void sub_8083D88(); @@ -435,8 +434,8 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa for(iVar2 = 0; iVar2 < 2; iVar2++) { - pokeStruct2->offense.att[iVar2] = param_3->offense.att[iVar2]; - pokeStruct2->offense.def[iVar2] = param_3->offense.def[iVar2]; + pokeStruct2->offense.att[iVar2] = param_3->att[iVar2]; + pokeStruct2->offense.def[iVar2] = param_3->def[iVar2]; } pokeStruct2->currExp = param_3->exp; @@ -567,8 +566,8 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr) for(index2 = 0; index2 < 2; index2++) { - pokeStruct2->offense.att[index2] = local_74.offense.att[index2]; - pokeStruct2->offense.def[index2] = local_74.offense.def[index2]; + pokeStruct2->offense.att[index2] = local_74.att[index2]; + pokeStruct2->offense.def[index2] = local_74.def[index2]; } pokeStruct2->currExp = local_74.exp; diff --git a/src/dungeon_ai.c b/src/dungeon_ai.c index 0eff12a29..fd2847195 100644 --- a/src/dungeon_ai.c +++ b/src/dungeon_ai.c @@ -33,7 +33,7 @@ #include "status_checks.h" #include "structs/map.h" #include "structs/str_dungeon.h" -#include "targeting.h" +#include "dungeon_misc.h" #include "tile_types.h" extern char *gPtrCouldntBeUsedMessage; diff --git a/src/dungeon_ai_attack.c b/src/dungeon_ai_attack.c index 481b9f82e..b5b6193f6 100644 --- a/src/dungeon_ai_attack.c +++ b/src/dungeon_ai_attack.c @@ -32,7 +32,7 @@ #include "status_checks.h" #include "structs/str_dungeon.h" #include "targeting_flags.h" -#include "targeting.h" +#include "dungeon_misc.h" #include "type_effectiveness.h" #define REGULAR_ATTACK_INDEX 4 @@ -49,7 +49,6 @@ EWRAM_DATA s32 gPotentialAttackTargetWeights[NUM_DIRECTIONS] = {0}; EWRAM_DATA Entity *gPotentialTargets[NUM_DIRECTIONS] = {0}; extern void sub_8055A00(Entity *, u8, u32, u32, u32); -extern void sub_806A9B4(Entity *, u8); extern bool8 sub_8044B28(void); extern void sub_8057588(Entity *, u32); extern void sub_806A1B0(Entity *); diff --git a/src/dungeon_misc.c b/src/dungeon_misc.c index 0297c5ea2..792ea3872 100644 --- a/src/dungeon_misc.c +++ b/src/dungeon_misc.c @@ -152,7 +152,7 @@ void LoadDungeonPokemonSprites(void) { s32 index; - for(index = 0; index < 0x1A8; index++) + for(index = 0; index < MONSTER_MAX; index++) { gDungeon->sprites[index] = NULL; } @@ -1100,10 +1100,10 @@ void sub_8069D4C(struct unkStruct_8069D4C *r0, Entity *target) GetPokemonLevelData(&leveldata, info->id, info->level); r0->exp = leveldata.expRequired; - r0->offense.att[0] = info->atk[0]; - r0->offense.att[1] = info->atk[1]; - r0->offense.def[0] = info->def[0]; - r0->offense.def[1] = info->def[1]; + r0->att[0] = info->atk[0]; + r0->att[1] = info->atk[1]; + r0->def[0] = info->def[0]; + r0->def[1] = info->def[1]; r0->heldItem = info->heldItem; memcpy(r0->moves.moves, info->moves.moves, sizeof(r0->moves)); r0->belly = info->belly; diff --git a/src/dungeon_move.c b/src/dungeon_move.c index e73cad7f3..504ba78e1 100644 --- a/src/dungeon_move.c +++ b/src/dungeon_move.c @@ -24,7 +24,7 @@ #include "charge_move.h" #include "dungeon_random.h" #include "targeting_flags.h" -#include "targeting.h" +#include "dungeon_misc.h" #include "dungeon_map_access.h" #include "math.h" #include "code_800DAC0.h" diff --git a/src/move_effects_target.c b/src/move_effects_target.c index c358f5397..f2efd6080 100644 --- a/src/move_effects_target.c +++ b/src/move_effects_target.c @@ -32,7 +32,7 @@ #include "status_checks_1.h" #include "structs/map.h" #include "structs/str_dungeon.h" -#include "targeting.h" +#include "dungeon_misc.h" #include "tile_types.h" #include "dungeon_config.h"