summaryrefslogtreecommitdiff
path: root/src/dungeon_map_access.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2022-02-27 08:43:59 -0800
committerGitHub <noreply@github.com>2022-02-27 08:43:59 -0800
commitea1aa9c0c5c3a4167912d1078fffdd5e69cbbe98 (patch)
tree1d3f29615f1683fae77ade7d8713e7bfe5a11c26 /src/dungeon_map_access.c
parent0dd38993f6a4383d6d5743fd0ae0abc01210ae25 (diff)
parenta5296a2f994a0f8e4421c4afd6bac1cedcfb72be (diff)
Merge pull request #97 from AnonymousRandomPerson/master
More attack AI decomp
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];
}