From 0369264407563b64d60c885f8bf79322b6f663c8 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sat, 18 Dec 2021 00:22:03 -0500 Subject: Decomped GetMapTileAtPosition() --- src/dungeon_util.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/dungeon_util.c') diff --git a/src/dungeon_util.c b/src/dungeon_util.c index 50b3e08..3594274 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -1,7 +1,8 @@ #include "global.h" #include "dungeon_util.h" -extern struct MapTile* GetMapTileAtPosition(s16, s16); +#include "dungeon_map_access.h" + extern struct MapTile* GetMapEntity(s16, s16); bool8 EntityExists(struct DungeonEntity *entity) @@ -23,32 +24,32 @@ u8 GetEntityRoomIndex(struct DungeonEntity *entity) return entity->roomIndex; } -struct DungeonEntityData *GetTrapData(struct DungeonEntity *entity) +struct DungeonEntityData* GetTrapData(struct DungeonEntity *entity) { return entity->entityData; } -struct ItemSlot *GetItemData(struct DungeonEntity *entity) +struct ItemSlot* GetItemData(struct DungeonEntity *entity) { return (struct ItemSlot *)entity->entityData; } -struct DungeonEntityData *sub_804510C(struct DungeonEntity *entity) +struct DungeonEntityData* sub_804510C(struct DungeonEntity *entity) { return entity->entityData; } -struct DungeonEntityData *sub_8045110(struct DungeonEntity *entity) +struct DungeonEntityData* sub_8045110(struct DungeonEntity *entity) { return entity->entityData; } -struct MapTile *sub_8045114(struct DungeonEntity *entity) +struct MapTile* GetMapTileForDungeonEntity(struct DungeonEntity *entity) { return GetMapTileAtPosition(entity->posWorld.x, entity->posWorld.y); } -struct MapTile *sub_8045128(struct DungeonEntity *entity) +struct MapTile* GetMapEntityForDungeonEntity(struct DungeonEntity *entity) { return GetMapEntity(entity->posWorld.x, entity->posWorld.y); } -- cgit v1.2.3