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_map_access.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/dungeon_map_access.c (limited to 'src/dungeon_map_access.c') diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c new file mode 100644 index 0000000..43e0e4d --- /dev/null +++ b/src/dungeon_map_access.c @@ -0,0 +1,15 @@ +#include "global.h" +#include "dungeon_map_access.h" + +#include "dungeon_global_data.h" + +extern struct MapTile *gUnknown_203B430; + +struct MapTile* GetMapTileAtPosition(s32 x, s32 y) +{ + if (x >= 0 && y >= 0 && x < DUNGEON_MAX_SIZE_X && y < DUNGEON_MAX_SIZE_Y) + { + return gDungeonGlobalData->mapEntityPointers[y][x]; + } + return gUnknown_203B430; +} -- cgit v1.2.3