summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2017-07-16 11:30:26 -0500
committercamthesaxman <cameronghall@cox.net>2017-07-16 11:30:26 -0500
commit9000ea3277d7c030e5830f5ca5206665b1c5be25 (patch)
tree6073568a803e4185cdb57ff8826a0e53e2e236f8
parentb03a51e034df8513456043dabf23596c8daba2c1 (diff)
visual region map layout
-rw-r--r--src/data/region_map_layout.h42
-rw-r--r--src/region_map.c21
2 files changed, 44 insertions, 19 deletions
diff --git a/src/data/region_map_layout.h b/src/data/region_map_layout.h
new file mode 100644
index 000000000..7b7c1df2a
--- /dev/null
+++ b/src/data/region_map_layout.h
@@ -0,0 +1,42 @@
+// Abbreviated definitions to make the map layout more visual
+#define R(routeNum) MAPSEC_ROUTE_##routeNum
+#define LITT_T MAPSEC_LITTLEROOT_TOWN
+#define OLDA_T MAPSEC_OLDALE_TOWN
+#define DEWF_T MAPSEC_DEWFORD_TOWN
+#define LAVA_T MAPSEC_LAVARIDGE_TOWN
+#define FALL_T MAPSEC_FALLARBOR_TOWN
+#define VERD_T MAPSEC_VERDANTURF_TOWN
+#define PACI_T MAPSEC_PACIFIDLOG_TOWN
+#define PETA_C MAPSEC_PETALBURG_CITY
+#define SLAT_C MAPSEC_SLATEPORT_CITY
+#define MAUV_C MAPSEC_MAUVILLE_CITY
+#define RUST_T MAPSEC_RUSTBORO_CITY
+#define FORT_C MAPSEC_FORTREE_CITY
+#define LILY_C MAPSEC_LILYCOVE_CITY
+#define MOSS_C MAPSEC_MOSSDEEP_CITY
+#define SOOT_C MAPSEC_SOOTOPOLIS_CITY
+#define EVER_C MAPSEC_EVER_GRANDE_CITY
+#define MTCHIM MAPSEC_MT_CHIMNEY
+#define SAFARI MAPSEC_SAFARI_ZONE
+#define BTLTWR MAPSEC_BATTLE_TOWER
+#define S_ISLD MAPSEC_SOUTHERN_ISLAND
+#define ______ MAPSEC_NONE
+
+const u8 gRegionMapLayout[] =
+{
+ ______, R(114), R(114), FALL_T, R(113), R(113), R(113), R(113), R(111), ______, ______, R(119), FORT_C, R(120), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ ______, R(114), ______, ______, ______, ______, MTCHIM, MTCHIM, R(111), ______, ______, R(119), ______, R(120), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ R(115), R(114), ______, ______, ______, ______, MTCHIM, MTCHIM, R(111), ______, ______, R(119), ______, R(120), ______, ______, SAFARI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ R(115), ______, ______, ______, ______, LAVA_T, R(112), R(112), R(111), ______, ______, R(119), ______, R(120), R(121), R(121), R(121), R(121), LILY_C, LILY_C, R(124), R(124), R(124), R(124), R(125), R(125), ______, ______,
+ R(115), ______, ______, ______, ______, ______, ______, ______, R(111), ______, ______, R(119), ______, ______, ______, ______, R(122), ______, ______, ______, R(124), R(124), R(124), R(124), R(125), R(125), ______, ______,
+ RUST_T, R(116), R(116), R(116), R(116), ______, ______, ______, R(111), ______, ______, R(119), ______, ______, ______, ______, R(122), ______, ______, ______, R(124), R(124), R(124), R(124), MOSS_C, MOSS_C, ______, ______,
+ RUST_T, ______, ______, ______, VERD_T, R(117), R(117), R(117), MAUV_C, MAUV_C, R(118), R(118), R(123), R(123), R(123), R(123), R(123), ______, ______, ______, R(126), R(126), R(126), R(127), R(127), R(127), ______, ______,
+ R(104), ______, ______, ______, ______, ______, ______, ______, R(110), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, R(126), SOOT_C, R(126), R(127), R(127), R(127), ______, ______,
+ R(104), ______, ______, ______, R(103), R(103), R(103), R(103), R(110), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, R(126), R(126), R(126), R(127), R(127), R(127), ______, EVER_C,
+ R(104), PETA_C, R(102), R(102), OLDA_T, ______, ______, ______, R(110), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, R(128), R(128), R(128), R(128), EVER_C,
+ R(105), ______, ______, ______, R(101), ______, ______, ______, SLAT_C, R(134), R(134), R(134), R(133), R(133), R(133), R(132), R(132), PACI_T, R(131), R(131), R(131), R(130), R(130), R(130), R(129), R(129), ______, ______,
+ R(105), ______, ______, ______, LITT_T, ______, ______, ______, SLAT_C, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ R(105), ______, ______, ______, ______, ______, ______, ______, R(109), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, BTLTWR, ______, ______, ______, ______, ______,
+ R(106), R(106), R(106), ______, ______, ______, ______, ______, R(109), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ ______, ______, DEWF_T, R(107), R(107), R(107), R(108), R(108), R(109), ______, ______, ______, S_ISLD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+};
diff --git a/src/region_map.c b/src/region_map.c
index a0739ecef..418be8663 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -140,24 +140,7 @@ const u16 gUnknown_083E5D60[] = INCBIN_U16("graphics/pokenav/region_map.gbapal")
const u8 gUnknown_083E5DA0[] = INCBIN_U8("graphics/pokenav/region_map.8bpp.lz");
const u8 gUnknown_083E6B04[] = INCBIN_U8("graphics/pokenav/region_map_map.bin.lz");
-const u8 gRegionMapSections[] =
-{
- 0x58, 0x1D, 0x1D, 0x04, 0x1C, 0x1C, 0x1C, 0x1C, 0x1A, 0x58, 0x58, 0x22, 0x0B, 0x23, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x58, 0x1D, 0x58, 0x58, 0x58, 0x58, 0x38, 0x38, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x1E, 0x1D, 0x58, 0x58, 0x58, 0x58, 0x38, 0x38, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x58, 0x58, 0x39, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x1E, 0x58, 0x58, 0x58, 0x58, 0x03, 0x1B, 0x1B, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x23, 0x24, 0x24, 0x24, 0x24, 0x0C, 0x0C, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0x58, 0x58,
- 0x1E, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x58, 0x58, 0x58, 0x25, 0x58, 0x58, 0x58, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0x58, 0x58,
- 0x0A, 0x1F, 0x1F, 0x1F, 0x1F, 0x58, 0x58, 0x58, 0x1A, 0x58, 0x58, 0x22, 0x58, 0x58, 0x58, 0x58, 0x25, 0x58, 0x58, 0x58, 0x27, 0x27, 0x27, 0x27, 0x0D, 0x0D, 0x58, 0x58,
- 0x0A, 0x58, 0x58, 0x58, 0x05, 0x20, 0x20, 0x20, 0x09, 0x09, 0x21, 0x21, 0x26, 0x26, 0x26, 0x26, 0x26, 0x58, 0x58, 0x58, 0x29, 0x29, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x58,
- 0x13, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x29, 0x0E, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x58,
- 0x13, 0x58, 0x58, 0x58, 0x12, 0x12, 0x12, 0x12, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x29, 0x29, 0x29, 0x2A, 0x2A, 0x2A, 0x58, 0x0F,
- 0x13, 0x07, 0x11, 0x11, 0x01, 0x58, 0x58, 0x58, 0x19, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x2B, 0x2B, 0x2B, 0x2B, 0x0F,
- 0x14, 0x58, 0x58, 0x58, 0x10, 0x58, 0x58, 0x58, 0x08, 0x31, 0x31, 0x31, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x06, 0x2E, 0x2E, 0x2E, 0x2D, 0x2D, 0x2D, 0x2C, 0x2C, 0x58, 0x58,
- 0x14, 0x58, 0x58, 0x58, 0x00, 0x58, 0x58, 0x58, 0x08, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x14, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x18, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x3A, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x15, 0x15, 0x15, 0x58, 0x58, 0x58, 0x58, 0x58, 0x18, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
- 0x58, 0x58, 0x02, 0x16, 0x16, 0x16, 0x17, 0x17, 0x18, 0x58, 0x58, 0x58, 0x49, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
-};
+#include "data/region_map_layout.h"
#if ENGLISH
#include "data/region_map_names_en.h"
@@ -711,7 +694,7 @@ u16 GetRegionMapSectionAt(u16 x, u16 y)
return MAPSEC_NONE;
y -= MAPCURSOR_Y_MIN;
x -= MAPCURSOR_X_MIN;
- return gRegionMapSections[x + y * 28];
+ return gRegionMapLayout[x + y * 28];
}
void InitializeCursorPosition(void)