mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Use constants for region map layout
This commit is contained in:
parent
a0c127f72c
commit
ed70b81ba0
@ -1,18 +1,18 @@
|
||||
static const u8 sRegionMap_MapSectionLayout[] =
|
||||
static const u8 sRegionMap_MapSectionLayout[MAP_HEIGHT][MAP_WIDTH] =
|
||||
{
|
||||
0xD5, 0x1D, 0x1D, 0x04, 0x1C, 0x1C, 0x1C, 0x1C, 0x1A, 0xD5, 0xD5, 0x22, 0x0B, 0x23, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
|
||||
0xD5, 0x1D, 0xD5, 0xD5, 0xD5, 0xD5, 0x38, 0x38, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
|
||||
0x1E, 0x1D, 0xD5, 0xD5, 0xD5, 0xD5, 0x38, 0x38, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0xD5, 0xD5, 0x39, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
|
||||
0x1E, 0xD5, 0xD5, 0xD5, 0xD5, 0x03, 0x1B, 0x1B, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0x24, 0x24, 0x24, 0x24, 0x0C, 0x0C, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0xD5, 0xD5,
|
||||
0x1E, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0xD5, 0xD5, 0xD5, 0x25, 0xD5, 0xD5, 0xD5, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0xD5, 0xD5,
|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EC_ROUTE_114, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_CHIMNEY, MAPSEC_MT_CHIMNEY, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_115, MAPSEC_ROUTE_114, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_CHIMNEY, MAPSEC_MT_CHIMNEY, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SAFARI_ZONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_115, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_LAVARIDGE_TOWN, MAPSEC_ROUTE_112, MAPSEC_ROUTE_112, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_ROUTE_120, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_ROUTE_121, MAPSEC_LILYCOVE_CITY, MAPSEC_LILYCOVE_CITY, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_125, MAPSEC_ROUTE_125, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_115, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_122, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_125, MAPSEC_ROUTE_125, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_RUSTBORO_CITY, MAPSEC_ROUTE_116, MAPSEC_ROUTE_116, MAPSEC_ROUTE_116, MAPSEC_ROUTE_116, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_111, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_119, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_122, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_ROUTE_124, MAPSEC_MOSSDEEP_CITY, MAPSEC_MOSSDEEP_CITY, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_RUSTBORO_CITY, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_VERDANTURF_TOWN, MAPSEC_ROUTE_117, MAPSEC_ROUTE_117, MAPSEC_ROUTE_117, MAPSEC_MAUVILLE_CITY, MAPSEC_MAUVILLE_CITY, MAPSEC_ROUTE_118, MAPSEC_ROUTE_118, MAPSEC_ROUTE_123, MAPSEC_ROUTE_123, MAPSEC_ROUTE_123, MAPSEC_ROUTE_123, MAPSEC_ROUTE_123, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_126, MAPSEC_ROUTE_126, MAPSEC_ROUTE_126, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_104, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_110, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_126, MAPSEC_SOOTOPOLIS_CITY, MAPSEC_ROUTE_126, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_104, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_103, MAPSEC_ROUTE_103, MAPSEC_ROUTE_103, MAPSEC_ROUTE_103, MAPSEC_ROUTE_110, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_126, MAPSEC_ROUTE_126, MAPSEC_ROUTE_126, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_ROUTE_127, MAPSEC_NONE, MAPSEC_EVER_GRANDE_CITY},
|
||||
{MAPSEC_ROUTE_104, MAPSEC_PETALBURG_CITY, MAPSEC_ROUTE_102, MAPSEC_ROUTE_102, MAPSEC_OLDALE_TOWN, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_110, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_128, MAPSEC_ROUTE_128, MAPSEC_ROUTE_128, MAPSEC_ROUTE_128, MAPSEC_EVER_GRANDE_CITY},
|
||||
{MAPSEC_ROUTE_105, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_101, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SLATEPORT_CITY, MAPSEC_ROUTE_134, MAPSEC_ROUTE_134, MAPSEC_ROUTE_134, MAPSEC_ROUTE_133, MAPSEC_ROUTE_133, MAPSEC_ROUTE_133, MAPSEC_ROUTE_132, MAPSEC_ROUTE_132, MAPSEC_PACIFIDLOG_TOWN, MAPSEC_ROUTE_131, MAPSEC_ROUTE_131, MAPSEC_ROUTE_131, MAPSEC_ROUTE_130, MAPSEC_ROUTE_130, MAPSEC_ROUTE_130, MAPSEC_ROUTE_129, MAPSEC_ROUTE_129, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_105, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_LITTLEROOT_TOWN, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SLATEPORT_CITY, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_105, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_109, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_BATTLE_FRONTIER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_ROUTE_106, MAPSEC_ROUTE_106, MAPSEC_ROUTE_106, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_109, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_DEWFORD_TOWN, MAPSEC_ROUTE_107, MAPSEC_ROUTE_107, MAPSEC_ROUTE_107, MAPSEC_ROUTE_108, MAPSEC_ROUTE_108, MAPSEC_ROUTE_109, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SOUTHERN_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
};
|
||||
|
@ -957,7 +957,7 @@ static u16 GetMapSecIdAt(u16 x, u16 y)
|
||||
}
|
||||
y -= MAPCURSOR_Y_MIN;
|
||||
x -= MAPCURSOR_X_MIN;
|
||||
return sRegionMap_MapSectionLayout[x + y * MAP_WIDTH];
|
||||
return sRegionMap_MapSectionLayout[y][x];
|
||||
}
|
||||
|
||||
static void InitMapBasedOnPlayerLocation(void)
|
||||
|
Loading…
Reference in New Issue
Block a user