summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-10-09 12:12:18 -0400
committerGriffinR <griffin.g.richards@gmail.com>2021-10-09 13:19:27 -0400
commit862febe03a354218d3c8bd14d9c7d1a49e8981b8 (patch)
tree583c9759092167966229324c1cf72868cdd5f0e7 /include
parent28de627913f04e059f995169299e41ce4c2544f0 (diff)
Add MAP_OFFSET
Diffstat (limited to 'include')
-rw-r--r--include/constants/battle_pyramid.h3
-rw-r--r--include/constants/metatile_labels.h4
-rw-r--r--include/fieldmap.h8
3 files changed, 12 insertions, 3 deletions
diff --git a/include/constants/battle_pyramid.h b/include/constants/battle_pyramid.h
index 1be3c1115..ebb753882 100644
--- a/include/constants/battle_pyramid.h
+++ b/include/constants/battle_pyramid.h
@@ -4,9 +4,6 @@
#define TOTAL_ROUNDS 20
#define PICKUP_ITEMS_PER_ROUND 10
-#define FLOOR_WALKABLE_METATILE 0x28D
-#define FLOOR_EXIT_METATILE 0x28E
-
#define HINT_EXIT_DIRECTION 0
#define HINT_REMAINING_ITEMS 1
#define HINT_REMAINING_TRAINERS 2
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index 6159bf6cb..b4ee3eacf 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -788,4 +788,8 @@
#define METATILE_SecretBase_SpikesMat_BottomMid 0x32A
#define METATILE_SecretBase_SpikesMat_BottomRight 0x32B
+// gTileset_BattlePyramid
+#define METATILE_BattlePyramid_Floor 0x28D
+#define METATILE_BattlePyramid_Exit 0x28E
+
#endif // GUARD_METATILE_LABELS_H
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 5bcbe20ea..28da8da2a 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -9,6 +9,14 @@
#define NUM_PALS_TOTAL 13
#define MAX_MAP_DATA_SIZE 0x2800
+// Map coordinates are offset by 7 when using the map
+// buffer because it needs to load sufficient border
+// metatiles to fill the player's view (the player has
+// 7 metatiles of view horizontally in either direction).
+#define MAP_OFFSET 7
+#define MAP_OFFSET_W (MAP_OFFSET * 2 + 1)
+#define MAP_OFFSET_H (MAP_OFFSET * 2)
+
#include "main.h"
extern struct BackupMapLayout gBackupMapLayout;