diff --git a/include/code_807E5AC.h b/include/code_807E5AC.h deleted file mode 100644 index 756818a83..000000000 --- a/include/code_807E5AC.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GUARD_CODE_807E5AC_H -#define GUARD_CODE_807E5AC_H - -void sub_807FA9C(void); - -#endif // GUARD_CODE_807E5AC_H diff --git a/include/trap.h b/include/trap.h index 767eaba30..0f105d064 100644 --- a/include/trap.h +++ b/include/trap.h @@ -5,6 +5,7 @@ #include "structs/map.h" #include "structs/str_position.h" +void sub_807FA9C(void); bool8 CanLayTrap(DungeonPos *pos); bool8 LayTrap(DungeonPos *pos, u8 trapID, u8 param_3); bool8 sub_807FD84(Entity *entity); @@ -28,13 +29,7 @@ void HandlePPZeroTrap(Entity *pokemon, Entity *target); void HandleWonderTile(Entity *pokemon, Entity *target); void HandleSealTrap(Entity *pokemon, Entity *target); void HandleWhirlwindTrap(Entity *entity, Entity *target); - -// code_807FCD4.s -extern void HandleSealTrap(Entity *pokemon, Entity *target); -extern void HandleWhirlwindTrap(Entity *entity, Entity *target); -extern void HandlePokemonTrap(Entity *pokemon, DungeonPos *pos); - -// trap_1.c +void HandlePokemonTrap(Entity *pokemon, DungeonPos *pos); void HandleTripTrap(Entity *pokemon, Entity *target); void SetTrap(Tile *tile, u8 id); diff --git a/include/world_map.h b/include/world_map.h index a8c44c7da..ca9cc9582 100644 --- a/include/world_map.h +++ b/include/world_map.h @@ -10,6 +10,8 @@ #include "structs/str_pokemon.h" #include "structs/str_dungeon_setup.h" +#define UNK_WORLD_MAP_52E0_COUNT 1500 + struct UnkStruct_Sub1 { u8 unk0; @@ -29,8 +31,9 @@ struct WorldMap s32 unk52D4; DungeonPos bgPos; DungeonPos monSpritePos; - u16 unk52E0[1500]; - u8 unk5E98[1500]; + // Both fields below are effectively unused. Could be NDS-only? + u16 unk52E0[UNK_WORLD_MAP_52E0_COUNT]; + u8 unk5E98[UNK_WORLD_MAP_52E0_COUNT]; }; #define WORLD_MAP_UNK_6D_COUNT 63 diff --git a/src/dungeon_kecleon_shop.c b/src/dungeon_kecleon_shop.c index 355f8c9d2..69fb6c590 100644 --- a/src/dungeon_kecleon_shop.c +++ b/src/dungeon_kecleon_shop.c @@ -29,7 +29,6 @@ #include "constants/monster.h" #include "constants/type.h" #include "dungeon_misc.h" -#include "code_807E5AC.h" #include "sprite.h" #include "dungeon_strings.h" diff --git a/src/dungeon_util.c b/src/dungeon_util.c index 6e5fc9220..7e0151dd8 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -7,7 +7,6 @@ #include "code_800F958.h" #include "code_8041AD0.h" #include "code_8069E0C.h" -#include "code_807E5AC.h" #include "dungeon_items.h" #include "dungeon_map_access.h" #include "code_803E724.h" diff --git a/src/hurl_orb.c b/src/hurl_orb.c index 90a3d46ae..b094a8e44 100644 --- a/src/hurl_orb.c +++ b/src/hurl_orb.c @@ -8,7 +8,6 @@ #include "code_806CD90.h" #include "code_8077274_1.h" #include "code_807CD9C.h" -#include "code_807E5AC.h" #include "constants/ability.h" #include "constants/monster.h" #include "constants/type.h" diff --git a/src/weather.c b/src/weather.c index 5a08c3b4c..dedfbfa82 100644 --- a/src/weather.c +++ b/src/weather.c @@ -33,7 +33,6 @@ #include "constants/monster.h" #include "constants/type.h" #include "dungeon_misc.h" -#include "code_807E5AC.h" #include "sprite.h" #include "dungeon_strings.h" diff --git a/src/world_map.c b/src/world_map.c index 760a5c37f..9d195906d 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -300,8 +300,8 @@ static void sub_801059C(void) sWorldMapPtr->bgPos.x = 0; sWorldMapPtr->bgPos.y = 0; - for (i = 0; i < 1500; i++) { - sWorldMapPtr->unk52E0[i] |= 0xFFFF; + for (i = 0; i < UNK_WORLD_MAP_52E0_COUNT; i++) { + sWorldMapPtr->unk52E0[i] = 0xFFFF; sWorldMapPtr->unk5E98[i] = 0; }