summaryrefslogtreecommitdiff
path: root/include/global.fieldmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.fieldmap.h')
-rw-r--r--include/global.fieldmap.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 1858d3344..cd553a55a 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -185,22 +185,30 @@ struct MapConnections
struct MapHeader
{
- /* 0x00 */ struct MapLayout *mapLayout;
- /* 0x04 */ struct MapEvents *events;
- /* 0x08 */ u8 *mapScripts;
- /* 0x0C */ struct MapConnections *connections;
+ /* 0x00 */ const struct MapLayout *mapLayout;
+ /* 0x04 */ const struct MapEvents *events;
+ /* 0x08 */ const u8 *mapScripts;
+ /* 0x0C */ const struct MapConnections *connections;
/* 0x10 */ u16 music;
/* 0x12 */ u16 mapLayoutId;
/* 0x14 */ u8 regionMapSectionId;
/* 0x15 */ u8 cave;
/* 0x16 */ u8 weather;
/* 0x17 */ u8 mapType;
- /* 0x18 */ u8 filler_18;
- /* 0x19 */ u8 escapeRope;
- /* 0x1A */ s8 flags;
+ /* 0x18 */ bool8 bikingAllowed;
+ /* 0x19 */ u8 flags;
+ /* 0x1A */ s8 floorNum;
/* 0x1B */ u8 battleType;
};
+// Flags for gMapHeader.flags, as defined in the map_header_flags macro
+#define MAP_ALLOW_ESCAPE_ROPE (1 << 0)
+#define MAP_ALLOW_RUN (1 << 1)
+#define MAP_SHOW_MAP_NAME (1 << 2)
+#define UNUSED_MAP_FLAGS (1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7)
+
+#define SHOW_MAP_NAME_ENABLED ((gMapHeader.flags & (MAP_SHOW_MAP_NAME | UNUSED_MAP_FLAGS)) == MAP_SHOW_MAP_NAME)
+
struct ObjectEvent
{
/*0x00*/ /* 0*/ u32 active:1;