From bfaa55f2fe3d557570260f6b4956e39c3b0f1218 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Mon, 15 Nov 2021 11:02:26 -0800 Subject: Label and doc iq skills and tactics info (#75) * label/doc iq skills/tactics info * decomp a few more dungeon_util and label some funcs * doc the IQSkills field --- src/dungeon_util.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src/dungeon_util.c') diff --git a/src/dungeon_util.c b/src/dungeon_util.c index 60b796f..94cd327 100644 --- a/src/dungeon_util.c +++ b/src/dungeon_util.c @@ -1,6 +1,19 @@ #include "global.h" #include "dungeon_util.h" +extern struct MapTile* GetMapTileAtPosition(s16, s16); + +struct unk8049590 +{ + u16 unk0; + u16 fill2; + u16 unk4; + u16 unk6; + u8 unk8; +}; + +extern struct unk8049590 *sub_8049590(s16, s16); + bool8 EntityExists(struct DungeonEntity *entity) { if (!entity) @@ -9,3 +22,43 @@ bool8 EntityExists(struct DungeonEntity *entity) } return entity->entityType != ENTITY_NONE; } + +u32 GetEntityType(struct DungeonEntity *entity) +{ + return entity->entityType; +} + +u8 GetEntityRoomIndex(struct DungeonEntity *entity) +{ + return entity->roomIndex; +} + +struct DungeonEntityData *sub_8045104(struct DungeonEntity *entity) +{ + return entity->entityData; +} + +struct ItemSlot *GetItemData(struct DungeonEntity *entity) +{ + return (struct ItemSlot *)entity->entityData; +} + +struct DungeonEntityData *sub_804510C(struct DungeonEntity *entity) +{ + return entity->entityData; +} + +struct DungeonEntityData *sub_8045110(struct DungeonEntity *entity) +{ + return entity->entityData; +} + +struct MapTile *sub_8045114(struct DungeonEntity *entity) +{ + return GetMapTileAtPosition(entity->posWorldX, entity->posWorldY); +} + +struct unk8049590 *sub_8045128(struct DungeonEntity *entity) +{ + return sub_8049590(entity->posWorldX, entity->posWorldY); +} -- cgit v1.2.3