summaryrefslogtreecommitdiff
path: root/src/dungeon_util.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-11-15 11:02:26 -0800
committerGitHub <noreply@github.com>2021-11-15 11:02:26 -0800
commitbfaa55f2fe3d557570260f6b4956e39c3b0f1218 (patch)
tree77611afc222d74c9a68a5577df3ce9916d9b3b97 /src/dungeon_util.c
parent0ea22237c933523f66d7468a953c5a5057b3a899 (diff)
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
Diffstat (limited to 'src/dungeon_util.c')
-rw-r--r--src/dungeon_util.c53
1 files changed, 53 insertions, 0 deletions
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);
+}