summaryrefslogtreecommitdiff
path: root/src/dungeon_map_access.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dungeon_map_access.c')
-rw-r--r--src/dungeon_map_access.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/dungeon_map_access.c b/src/dungeon_map_access.c
index 43e0e4d..9ffa633 100644
--- a/src/dungeon_map_access.c
+++ b/src/dungeon_map_access.c
@@ -3,13 +3,25 @@
#include "dungeon_global_data.h"
-extern struct MapTile *gUnknown_203B430;
+extern struct unkStruct_202F190 gUnknown_202F190;
+extern struct unkStruct_202F190 *gUnknown_203B430;
-struct MapTile* GetMapTileAtPosition(s32 x, s32 y)
+struct MapTile* GetMapTile_1(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 gDungeonGlobalData->mapTilePointers[y][x];
}
- return gUnknown_203B430;
+ return (struct MapTile*) gUnknown_203B430->unk0;
+}
+
+struct MapTile* GetMapTile_2(s32 x, s32 y)
+{
+ if (x < 0 || y < 0 || x >= DUNGEON_MAX_SIZE_X || y >= DUNGEON_MAX_SIZE_Y)
+ {
+ struct MapTile* tile = (struct MapTile*) gUnknown_202F190.unk0;
+ gUnknown_202F190 = *gUnknown_203B430;
+ return tile;
+ }
+ return gDungeonGlobalData->mapTilePointers[y][x];
}