ref: 710c3275fc6a4caeeff3ad89c029a05984cf8388
parent: e882708b85e19cf30e05fcf31ccedc5f03367702
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Fri Jul 3 11:25:43 EDT 2020
Simplify map connections To do: Polished Map support for detecting the tileset
--- a/data/mapHeaders/AgathasRoom.asm
+++ b/data/mapHeaders/AgathasRoom.asm
@@ -1,8 +1,3 @@
-AgathasRoom_h::
- db CEMETERY ; tileset
- db AGATHAS_ROOM_HEIGHT, AGATHAS_ROOM_WIDTH ; dimensions (y, x)
- dw AgathasRoom_Blocks ; blocks
- dw AgathasRoom_TextPointers ; texts
- dw AgathasRoom_Script ; scripts
- db 0 ; connections
- dw AgathasRoom_Object ; objects
+
+ map_header AgathasRoom, AGATHAS_ROOM, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/BikeShop.asm
+++ b/data/mapHeaders/BikeShop.asm
@@ -1,8 +1,3 @@
-BikeShop_h::
- db CLUB ; tileset
- db BIKE_SHOP_HEIGHT, BIKE_SHOP_WIDTH ; dimensions (y, x)
- dw BikeShop_Blocks ; blocks
- dw BikeShop_TextPointers ; texts
- dw BikeShop_Script ; scripts
- db 0 ; connections
- dw BikeShop_Object ; objects
+
+ map_header BikeShop, BIKE_SHOP, CLUB, 0
+ end_map_header
--- a/data/mapHeaders/BillsHouse.asm
+++ b/data/mapHeaders/BillsHouse.asm
@@ -1,8 +1,3 @@
-BillsHouse_h::
- db INTERIOR ; tileset
- db BILLS_HOUSE_HEIGHT, BILLS_HOUSE_WIDTH ; dimensions (y, x)
- dw BillsHouse_Blocks ; blocks
- dw BillsHouse_TextPointers ; texts
- dw BillsHouse_Script ; scripts
- db 0 ; connections
- dw BillsHouse_Object ; objects
+
+ map_header BillsHouse, BILLS_HOUSE, INTERIOR, 0
+ end_map_header
--- a/data/mapHeaders/BluesHouse.asm
+++ b/data/mapHeaders/BluesHouse.asm
@@ -1,8 +1,3 @@
-BluesHouse_h::
- db HOUSE ; tileset
- db BLUES_HOUSE_HEIGHT, BLUES_HOUSE_WIDTH ; dimensions (y, x)
- dw BluesHouse_Blocks ; blocks
- dw BluesHouse_TextPointers ; texts
- dw BluesHouse_Script ; scripts
- db 0 ; connections
- dw BluesHouse_Object ; objects
+
+ map_header BluesHouse, BLUES_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/BrunosRoom.asm
+++ b/data/mapHeaders/BrunosRoom.asm
@@ -1,8 +1,3 @@
-BrunosRoom_h::
- db GYM ; tileset
- db BRUNOS_ROOM_HEIGHT, BRUNOS_ROOM_WIDTH ; dimensions (y, x)
- dw BrunosRoom_Blocks ; blocks
- dw BrunosRoom_TextPointers ; texts
- dw BrunosRoom_Script ; scripts
- db 0 ; connections
- dw BrunosRoom_Object ; objects
+
+ map_header BrunosRoom, BRUNOS_ROOM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/CeladonChiefHouse.asm
+++ b/data/mapHeaders/CeladonChiefHouse.asm
@@ -1,8 +1,3 @@
-CeladonChiefHouse_h::
- db MANSION ; tileset
- db CELADON_CHIEF_HOUSE_HEIGHT, CELADON_CHIEF_HOUSE_WIDTH ; dimensions (y, x)
- dw CeladonChiefHouse_Blocks ; blocks
- dw CeladonChiefHouse_TextPointers ; texts
- dw CeladonChiefHouse_Script ; scripts
- db 0 ; connections
- dw CeladonChiefHouse_Object ; objects
+
+ map_header CeladonChiefHouse, CELADON_CHIEF_HOUSE, MANSION, 0
+ end_map_header
--- a/data/mapHeaders/CeladonCity.asm
+++ b/data/mapHeaders/CeladonCity.asm
@@ -1,10 +1,5 @@
-CeladonCity_h::
- db OVERWORLD ; tileset
- db CELADON_CITY_HEIGHT, CELADON_CITY_WIDTH ; dimensions (y, x)
- dw CeladonCity_Blocks ; blocks
- dw CeladonCity_TextPointers ; texts
- dw CeladonCity_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION CELADON_CITY, ROUTE_16, 4, 0, Route16_Blocks
- EAST_MAP_CONNECTION CELADON_CITY, ROUTE_7, 4, 0, Route7_Blocks, 1
- dw CeladonCity_Object ; objects
+
+ map_header CeladonCity, CELADON_CITY, OVERWORLD, WEST | EAST
+ connection west, Route16, ROUTE_16, 4
+ connection east, Route7, ROUTE_7, 4
+ end_map_header
--- a/data/mapHeaders/CeladonDiner.asm
+++ b/data/mapHeaders/CeladonDiner.asm
@@ -1,8 +1,3 @@
-CeladonDiner_h::
- db LOBBY ; tileset
- db CELADON_DINER_HEIGHT, CELADON_DINER_WIDTH ; dimensions (y, x)
- dw CeladonDiner_Blocks ; blocks
- dw CeladonDiner_TextPointers ; texts
- dw CeladonDiner_Script ; scripts
- db 0 ; connections
- dw CeladonDiner_Object ; objects
+
+ map_header CeladonDiner, CELADON_DINER, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonGym.asm
+++ b/data/mapHeaders/CeladonGym.asm
@@ -1,8 +1,3 @@
-CeladonGym_h::
- db GYM ; tileset
- db CELADON_GYM_HEIGHT, CELADON_GYM_WIDTH ; dimensions (y, x)
- dw CeladonGym_Blocks ; blocks
- dw CeladonGym_TextPointers ; texts
- dw CeladonGym_Script ; scripts
- db 0 ; connections
- dw CeladonGym_Object ; objects
+
+ map_header CeladonGym, CELADON_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/CeladonHotel.asm
+++ b/data/mapHeaders/CeladonHotel.asm
@@ -1,8 +1,3 @@
-CeladonHotel_h::
- db POKECENTER ; tileset
- db CELADON_HOTEL_HEIGHT, CELADON_HOTEL_WIDTH ; dimensions (y, x)
- dw CeladonHotel_Blocks ; blocks
- dw CeladonHotel_TextPointers ; texts
- dw CeladonHotel_Script ; scripts
- db 0 ; connections
- dw CeladonHotel_Object ; objects
+
+ map_header CeladonHotel, CELADON_HOTEL, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMansion1F.asm
+++ b/data/mapHeaders/CeladonMansion1F.asm
@@ -1,8 +1,3 @@
-CeladonMansion1F_h::
- db MANSION ; tileset
- db CELADON_MANSION_1F_HEIGHT, CELADON_MANSION_1F_WIDTH ; dimensions (y, x)
- dw CeladonMansion1F_Blocks ; blocks
- dw CeladonMansion1F_TextPointers ; texts
- dw CeladonMansion1F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion1F_Object ; objects
+
+ map_header CeladonMansion1F, CELADON_MANSION_1F, MANSION, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMansion2F.asm
+++ b/data/mapHeaders/CeladonMansion2F.asm
@@ -1,8 +1,3 @@
-CeladonMansion2F_h::
- db MANSION ; tileset
- db CELADON_MANSION_2F_HEIGHT, CELADON_MANSION_2F_WIDTH ; dimensions (y, x)
- dw CeladonMansion2F_Blocks ; blocks
- dw CeladonMansion2F_TextPointers ; texts
- dw CeladonMansion2F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion2F_Object ; objects
+
+ map_header CeladonMansion2F, CELADON_MANSION_2F, MANSION, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMansion3F.asm
+++ b/data/mapHeaders/CeladonMansion3F.asm
@@ -1,8 +1,3 @@
-CeladonMansion3F_h::
- db MANSION ; tileset
- db CELADON_MANSION_3F_HEIGHT, CELADON_MANSION_3F_WIDTH ; dimensions (y, x)
- dw CeladonMansion3F_Blocks ; blocks
- dw CeladonMansion3F_TextPointers ; texts
- dw CeladonMansion3F_Script ; scripts
- db 0 ; connections
- dw CeladonMansion3F_Object ; objects
+
+ map_header CeladonMansion3F, CELADON_MANSION_3F, MANSION, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMansionRoof.asm
+++ b/data/mapHeaders/CeladonMansionRoof.asm
@@ -1,8 +1,3 @@
-CeladonMansionRoof_h::
- db MANSION ; tileset
- db CELADON_MANSION_ROOF_HEIGHT, CELADON_MANSION_ROOF_WIDTH ; dimensions (y, x)
- dw CeladonMansionRoof_Blocks ; blocks
- dw CeladonMansionRoof_TextPointers ; texts
- dw CeladonMansionRoof_Script ; scripts
- db 0 ; connections
- dw CeladonMansionRoof_Object ; objects
+
+ map_header CeladonMansionRoof, CELADON_MANSION_ROOF, MANSION, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMansionRoofHouse.asm
+++ b/data/mapHeaders/CeladonMansionRoofHouse.asm
@@ -1,8 +1,3 @@
-CeladonMansionRoofHouse_h::
- db HOUSE ; tileset
- db CELADON_MANSION_ROOF_HOUSE_HEIGHT, CELADON_MANSION_ROOF_HOUSE_WIDTH ; dimensions (y, x)
- dw CeladonMansionRoofHouse_Blocks ; blocks
- dw CeladonMansionRoofHouse_TextPointers ; texts
- dw CeladonMansionRoofHouse_Script ; scripts
- db 0 ; connections
- dw CeladonMansionRoofHouse_Object ; objects
+
+ map_header CeladonMansionRoofHouse, CELADON_MANSION_ROOF_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMart1F.asm
+++ b/data/mapHeaders/CeladonMart1F.asm
@@ -1,8 +1,3 @@
-CeladonMart1F_h::
- db LOBBY ; tileset
- db CELADON_MART_1F_HEIGHT, CELADON_MART_1F_WIDTH ; dimensions (y, x)
- dw CeladonMart1F_Blocks ; blocks
- dw CeladonMart1F_TextPointers ; texts
- dw CeladonMart1F_Script ; scripts
- db 0 ; connections
- dw CeladonMart1F_Object ; objects
+
+ map_header CeladonMart1F, CELADON_MART_1F, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMart2F.asm
+++ b/data/mapHeaders/CeladonMart2F.asm
@@ -1,8 +1,3 @@
-CeladonMart2F_h::
- db LOBBY ; tileset
- db CELADON_MART_2F_HEIGHT, CELADON_MART_2F_WIDTH ; dimensions (y, x)
- dw CeladonMart2F_Blocks ; blocks
- dw CeladonMart2F_TextPointers ; texts
- dw CeladonMart2F_Script ; scripts
- db 0 ; connections
- dw CeladonMart2F_Object ; objects
+
+ map_header CeladonMart2F, CELADON_MART_2F, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMart3F.asm
+++ b/data/mapHeaders/CeladonMart3F.asm
@@ -1,8 +1,3 @@
-CeladonMart3F_h::
- db LOBBY ; tileset
- db CELADON_MART_3F_HEIGHT, CELADON_MART_3F_WIDTH ; dimensions (y, x)
- dw CeladonMart3F_Blocks ; blocks
- dw CeladonMart3F_TextPointers ; texts
- dw CeladonMart3F_Script ; scripts
- db 0 ; connections
- dw CeladonMart3F_Object ; objects
+
+ map_header CeladonMart3F, CELADON_MART_3F, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMart4F.asm
+++ b/data/mapHeaders/CeladonMart4F.asm
@@ -1,8 +1,3 @@
-CeladonMart4F_h::
- db LOBBY ; tileset
- db CELADON_MART_4F_HEIGHT, CELADON_MART_4F_WIDTH ; dimensions (y, x)
- dw CeladonMart4F_Blocks ; blocks
- dw CeladonMart4F_TextPointers ; texts
- dw CeladonMart4F_Script ; scripts
- db 0 ; connections
- dw CeladonMart4F_Object ; objects
+
+ map_header CeladonMart4F, CELADON_MART_4F, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMart5F.asm
+++ b/data/mapHeaders/CeladonMart5F.asm
@@ -1,8 +1,3 @@
-CeladonMart5F_h::
- db LOBBY ; tileset
- db CELADON_MART_5F_HEIGHT, CELADON_MART_5F_WIDTH ; dimensions (y, x)
- dw CeladonMart5F_Blocks ; blocks
- dw CeladonMart5F_TextPointers ; texts
- dw CeladonMart5F_Script ; scripts
- db 0 ; connections
- dw CeladonMart5F_Object ; objects
+
+ map_header CeladonMart5F, CELADON_MART_5F, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMartElevator.asm
+++ b/data/mapHeaders/CeladonMartElevator.asm
@@ -1,8 +1,3 @@
-CeladonMartElevator_h::
- db LOBBY ; tileset
- db CELADON_MART_ELEVATOR_HEIGHT, CELADON_MART_ELEVATOR_WIDTH ; dimensions (y, x)
- dw CeladonMartElevator_Blocks ; blocks
- dw CeladonMartElevator_TextPointers ; texts
- dw CeladonMartElevator_Script ; scripts
- db 0 ; connections
- dw CeladonMartElevator_Object ; objects
+
+ map_header CeladonMartElevator, CELADON_MART_ELEVATOR, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonMartRoof.asm
+++ b/data/mapHeaders/CeladonMartRoof.asm
@@ -1,8 +1,3 @@
-CeladonMartRoof_h::
- db LOBBY ; tileset
- db CELADON_MART_ROOF_HEIGHT, CELADON_MART_ROOF_WIDTH ; dimensions (y, x)
- dw CeladonMartRoof_Blocks ; blocks
- dw CeladonMartRoof_TextPointers ; texts
- dw CeladonMartRoof_Script ; scripts
- db 0 ; connections
- dw CeladonMartRoof_Object ; objects
+
+ map_header CeladonMartRoof, CELADON_MART_ROOF, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/CeladonPokecenter.asm
+++ b/data/mapHeaders/CeladonPokecenter.asm
@@ -1,8 +1,3 @@
-CeladonPokecenter_h::
- db POKECENTER ; tileset
- db CELADON_POKECENTER_HEIGHT, CELADON_POKECENTER_WIDTH ; dimensions (y, x)
- dw CeladonPokecenter_Blocks ; blocks
- dw CeladonPokecenter_TextPointers ; texts
- dw CeladonPokecenter_Script ; scripts
- db 0 ; connections
- dw CeladonPokecenter_Object ; objects
+
+ map_header CeladonPokecenter, CELADON_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanBadgeHouse.asm
+++ b/data/mapHeaders/CeruleanBadgeHouse.asm
@@ -1,8 +1,3 @@
-CeruleanBadgeHouse_h::
- db SHIP ; tileset
- db CERULEAN_BADGE_HOUSE_HEIGHT, CERULEAN_BADGE_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanBadgeHouse_Blocks ; blocks
- dw CeruleanBadgeHouse_TextPointers ; texts
- dw CeruleanBadgeHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanBadgeHouse_Object ; objects
+
+ map_header CeruleanBadgeHouse, CERULEAN_BADGE_HOUSE, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanCave1F.asm
+++ b/data/mapHeaders/CeruleanCave1F.asm
@@ -1,8 +1,3 @@
-CeruleanCave1F_h::
- db CAVERN ; tileset
- db CERULEAN_CAVE_1F_HEIGHT, CERULEAN_CAVE_1F_WIDTH ; dimensions (y, x)
- dw CeruleanCave1F_Blocks ; blocks
- dw CeruleanCave1F_TextPointers ; texts
- dw CeruleanCave1F_Script ; scripts
- db 0 ; connections
- dw CeruleanCave1F_Object ; objects
+
+ map_header CeruleanCave1F, CERULEAN_CAVE_1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanCave2F.asm
+++ b/data/mapHeaders/CeruleanCave2F.asm
@@ -1,8 +1,3 @@
-CeruleanCave2F_h::
- db CAVERN ; tileset
- db CERULEAN_CAVE_2F_HEIGHT, CERULEAN_CAVE_2F_WIDTH ; dimensions (y, x)
- dw CeruleanCave2F_Blocks ; blocks
- dw CeruleanCave2F_TextPointers ; texts
- dw CeruleanCave2F_Script ; scripts
- db 0 ; connections
- dw CeruleanCave2F_Object ; objects
+
+ map_header CeruleanCave2F, CERULEAN_CAVE_2F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanCaveB1F.asm
+++ b/data/mapHeaders/CeruleanCaveB1F.asm
@@ -1,8 +1,3 @@
-CeruleanCaveB1F_h::
- db CAVERN ; tileset
- db CERULEAN_CAVE_B1F_HEIGHT, CERULEAN_CAVE_B1F_WIDTH ; dimensions (y, x)
- dw CeruleanCaveB1F_Blocks ; blocks
- dw CeruleanCaveB1F_TextPointers ; texts
- dw CeruleanCaveB1F_Script ; scripts
- db 0 ; connections
- dw CeruleanCaveB1F_Object ; objects
+
+ map_header CeruleanCaveB1F, CERULEAN_CAVE_B1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanCity.asm
+++ b/data/mapHeaders/CeruleanCity.asm
@@ -1,12 +1,7 @@
-CeruleanCity_h::
- db OVERWORLD ; tileset
- db CERULEAN_CITY_HEIGHT, CERULEAN_CITY_WIDTH ; dimensions (y, x)
- dw CeruleanCity_Blocks ; blocks
- dw CeruleanCity_TextPointers ; texts
- dw CeruleanCity_Script ; scripts
- db NORTH | SOUTH | WEST | EAST ; connections
- NORTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_24, 5, 0, Route24_Blocks
- SOUTH_MAP_CONNECTION CERULEAN_CITY, ROUTE_5, 5, 0, Route5_Blocks, 1
- WEST_MAP_CONNECTION CERULEAN_CITY, ROUTE_4, 4, 0, Route4_Blocks
- EAST_MAP_CONNECTION CERULEAN_CITY, ROUTE_9, 4, 0, Route9_Blocks
- dw CeruleanCity_Object ; objects
+
+ map_header CeruleanCity, CERULEAN_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST
+ connection north, Route24, ROUTE_24, 5
+ connection south, Route5, ROUTE_5, 5
+ connection west, Route4, ROUTE_4, 4
+ connection east, Route9, ROUTE_9, 4
+ end_map_header
--- a/data/mapHeaders/CeruleanGym.asm
+++ b/data/mapHeaders/CeruleanGym.asm
@@ -1,8 +1,3 @@
-CeruleanGym_h::
- db GYM ; tileset
- db CERULEAN_GYM_HEIGHT, CERULEAN_GYM_WIDTH ; dimensions (y, x)
- dw CeruleanGym_Blocks ; blocks
- dw CeruleanGym_TextPointers ; texts
- dw CeruleanGym_Script ; scripts
- db 0 ; connections
- dw CeruleanGym_Object ; objects
+
+ map_header CeruleanGym, CERULEAN_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanMart.asm
+++ b/data/mapHeaders/CeruleanMart.asm
@@ -1,8 +1,3 @@
-CeruleanMart_h::
- db MART ; tileset
- db CERULEAN_MART_HEIGHT, CERULEAN_MART_WIDTH ; dimensions (y, x)
- dw CeruleanMart_Blocks ; blocks
- dw CeruleanMart_TextPointers ; texts
- dw CeruleanMart_Script ; scripts
- db 0 ; connections
- dw CeruleanMart_Object ; objects
+
+ map_header CeruleanMart, CERULEAN_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanPokecenter.asm
+++ b/data/mapHeaders/CeruleanPokecenter.asm
@@ -1,8 +1,3 @@
-CeruleanPokecenter_h::
- db POKECENTER ; tileset
- db CERULEAN_POKECENTER_HEIGHT, CERULEAN_POKECENTER_WIDTH ; dimensions (y, x)
- dw CeruleanPokecenter_Blocks ; blocks
- dw CeruleanPokecenter_TextPointers ; texts
- dw CeruleanPokecenter_Script ; scripts
- db 0 ; connections
- dw CeruleanPokecenter_Object ; objects
+
+ map_header CeruleanPokecenter, CERULEAN_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanTradeHouse.asm
+++ b/data/mapHeaders/CeruleanTradeHouse.asm
@@ -1,8 +1,3 @@
-CeruleanTradeHouse_h::
- db HOUSE ; tileset
- db CERULEAN_TRADE_HOUSE_HEIGHT, CERULEAN_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanTradeHouse_Blocks ; blocks
- dw CeruleanTradeHouse_TextPointers ; texts
- dw CeruleanTradeHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanTradeHouse_Object ; objects
+
+ map_header CeruleanTradeHouse, CERULEAN_TRADE_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/CeruleanTrashedHouse.asm
+++ b/data/mapHeaders/CeruleanTrashedHouse.asm
@@ -1,8 +1,3 @@
-CeruleanTrashedHouse_h::
- db HOUSE ; tileset
- db CERULEAN_TRASHED_HOUSE_HEIGHT, CERULEAN_TRASHED_HOUSE_WIDTH ; dimensions (y, x)
- dw CeruleanTrashedHouse_Blocks ; blocks
- dw CeruleanTrashedHouse_TextPointers ; texts
- dw CeruleanTrashedHouse_Script ; scripts
- db 0 ; connections
- dw CeruleanTrashedHouse_Object ; objects
+
+ map_header CeruleanTrashedHouse, CERULEAN_TRASHED_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/ChampionsRoom.asm
+++ b/data/mapHeaders/ChampionsRoom.asm
@@ -1,8 +1,3 @@
-ChampionsRoom_h::
- db GYM ; tileset
- db CHAMPIONS_ROOM_HEIGHT, CHAMPIONS_ROOM_WIDTH ; dimensions (y, x)
- dw ChampionsRoom_Blocks ; blocks
- dw ChampionsRoom_TextPointers ; texts
- dw ChampionsRoom_Script ; scripts
- db $0 ; connections
- dw ChampionsRoom_Object ; objects
+
+ map_header ChampionsRoom, CHAMPIONS_ROOM, GYM, $0
+ end_map_header
--- a/data/mapHeaders/CinnabarGym.asm
+++ b/data/mapHeaders/CinnabarGym.asm
@@ -1,8 +1,3 @@
-CinnabarGym_h::
- db FACILITY ; tileset
- db CINNABAR_GYM_HEIGHT, CINNABAR_GYM_WIDTH ; dimensions (y, x)
- dw CinnabarGym_Blocks ; blocks
- dw CinnabarGym_TextPointers ; texts
- dw CinnabarGym_Script ; scripts
- db 0 ; connections
- dw CinnabarGym_Object ; objects
+
+ map_header CinnabarGym, CINNABAR_GYM, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarIsland.asm
+++ b/data/mapHeaders/CinnabarIsland.asm
@@ -1,10 +1,5 @@
-CinnabarIsland_h::
- db OVERWORLD ; tileset
- db CINNABAR_ISLAND_HEIGHT, CINNABAR_ISLAND_WIDTH ; dimensions (y, x)
- dw CinnabarIsland_Blocks ; blocks
- dw CinnabarIsland_TextPointers ; texts
- dw CinnabarIsland_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_21, 0, 0, Route21_Blocks
- EAST_MAP_CONNECTION CINNABAR_ISLAND, ROUTE_20, 0, 0, Route20_Blocks
- dw CinnabarIsland_Object ; objects
+
+ map_header CinnabarIsland, CINNABAR_ISLAND, OVERWORLD, NORTH | EAST
+ connection north, Route21, ROUTE_21, 0
+ connection east, Route20, ROUTE_20, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarLab.asm
+++ b/data/mapHeaders/CinnabarLab.asm
@@ -1,8 +1,3 @@
-CinnabarLab_h::
- db LAB ; tileset
- db CINNABAR_LAB_HEIGHT, CINNABAR_LAB_WIDTH ; dimensions (y, x)
- dw CinnabarLab_Blocks ; blocks
- dw CinnabarLab_TextPointers ; texts
- dw CinnabarLab_Script ; scripts
- db 0 ; connections
- dw CinnabarLab_Object ; objects
+
+ map_header CinnabarLab, CINNABAR_LAB, LAB, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarLabFossilRoom.asm
+++ b/data/mapHeaders/CinnabarLabFossilRoom.asm
@@ -1,8 +1,3 @@
-CinnabarLabFossilRoom_h::
- db LAB ; tileset
- db CINNABAR_LAB_FOSSIL_ROOM_HEIGHT, CINNABAR_LAB_FOSSIL_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabFossilRoom_Blocks ; blocks
- dw CinnabarLabFossilRoom_TextPointers ; texts
- dw CinnabarLabFossilRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabFossilRoom_Object ; objects
+
+ map_header CinnabarLabFossilRoom, CINNABAR_LAB_FOSSIL_ROOM, LAB, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarLabMetronomeRoom.asm
+++ b/data/mapHeaders/CinnabarLabMetronomeRoom.asm
@@ -1,8 +1,3 @@
-CinnabarLabMetronomeRoom_h::
- db LAB ; tileset
- db CINNABAR_LAB_METRONOME_ROOM_HEIGHT, CINNABAR_LAB_METRONOME_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabMetronomeRoom_Blocks ; blocks
- dw CinnabarLabMetronomeRoom_TextPointers ; texts
- dw CinnabarLabMetronomeRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabMetronomeRoom_Object ; objects
+
+ map_header CinnabarLabMetronomeRoom, CINNABAR_LAB_METRONOME_ROOM, LAB, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarLabTradeRoom.asm
+++ b/data/mapHeaders/CinnabarLabTradeRoom.asm
@@ -1,8 +1,3 @@
-CinnabarLabTradeRoom_h::
- db LAB ; tileset
- db CINNABAR_LAB_TRADE_ROOM_HEIGHT, CINNABAR_LAB_TRADE_ROOM_WIDTH ; dimensions (y, x)
- dw CinnabarLabTradeRoom_Blocks ; blocks
- dw CinnabarLabTradeRoom_TextPointers ; texts
- dw CinnabarLabTradeRoom_Script ; scripts
- db 0 ; connections
- dw CinnabarLabTradeRoom_Object ; objects
+
+ map_header CinnabarLabTradeRoom, CINNABAR_LAB_TRADE_ROOM, LAB, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarMart.asm
+++ b/data/mapHeaders/CinnabarMart.asm
@@ -1,8 +1,3 @@
-CinnabarMart_h::
- db MART ; tileset
- db CINNABAR_MART_HEIGHT, CINNABAR_MART_WIDTH ; dimensions (y, x)
- dw CinnabarMart_Blocks ; blocks
- dw CinnabarMart_TextPointers ; texts
- dw CinnabarMart_Script ; scripts
- db 0 ; connections
- dw CinnabarMart_Object ; objects
+
+ map_header CinnabarMart, CINNABAR_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/CinnabarPokecenter.asm
+++ b/data/mapHeaders/CinnabarPokecenter.asm
@@ -1,8 +1,3 @@
-CinnabarPokecenter_h::
- db POKECENTER ; tileset
- db CINNABAR_POKECENTER_HEIGHT, CINNABAR_POKECENTER_WIDTH ; dimensions (y, x)
- dw CinnabarPokecenter_Blocks ; blocks
- dw CinnabarPokecenter_TextPointers ; texts
- dw CinnabarPokecenter_Script ; scripts
- db 0 ; connections
- dw CinnabarPokecenter_Object ; objects
+
+ map_header CinnabarPokecenter, CINNABAR_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/Colosseum.asm
+++ b/data/mapHeaders/Colosseum.asm
@@ -1,8 +1,3 @@
-Colosseum_h::
- db CLUB ; tileset
- db COLOSSEUM_HEIGHT, COLOSSEUM_WIDTH ; dimensions (y, x)
- dw Colosseum_Blocks ; blocks
- dw Colosseum_TextPointers ; texts
- dw Colosseum_Script ; scripts
- db 0 ; connections
- dw Colosseum_Object ; objects
+
+ map_header Colosseum, COLOSSEUM, CLUB, 0
+ end_map_header
--- a/data/mapHeaders/CopycatsHouse1F.asm
+++ b/data/mapHeaders/CopycatsHouse1F.asm
@@ -1,8 +1,3 @@
-CopycatsHouse1F_h::
- db REDS_HOUSE_1 ; tileset
- db COPYCATS_HOUSE_1F_HEIGHT, COPYCATS_HOUSE_1F_WIDTH ; dimensions (y, x)
- dw CopycatsHouse1F_Blocks ; blocks
- dw CopycatsHouse1F_TextPointers ; texts
- dw CopycatsHouse1F_Script ; scripts
- db 0 ; connections
- dw CopycatsHouse1F_Object ; objects
+
+ map_header CopycatsHouse1F, COPYCATS_HOUSE_1F, REDS_HOUSE_1, 0
+ end_map_header
--- a/data/mapHeaders/CopycatsHouse2F.asm
+++ b/data/mapHeaders/CopycatsHouse2F.asm
@@ -1,8 +1,3 @@
-CopycatsHouse2F_h::
- db REDS_HOUSE_2 ; tileset
- db COPYCATS_HOUSE_2F_HEIGHT, COPYCATS_HOUSE_2F_WIDTH ; dimensions (y, x)
- dw CopycatsHouse2F_Blocks ; blocks
- dw CopycatsHouse2F_TextPointers ; texts
- dw CopycatsHouse2F_Script ; scripts
- db 0 ; connections
- dw CopycatsHouse2F_Object ; objects
+
+ map_header CopycatsHouse2F, COPYCATS_HOUSE_2F, REDS_HOUSE_2, 0
+ end_map_header
--- a/data/mapHeaders/Daycare.asm
+++ b/data/mapHeaders/Daycare.asm
@@ -1,8 +1,3 @@
-Daycare_h::
- db HOUSE ; tileset
- db DAYCARE_HEIGHT, DAYCARE_WIDTH ; dimensions (y, x)
- dw Daycare_Blocks ; blocks
- dw Daycare_TextPointers ; texts
- dw Daycare_Script ; scripts
- db 0 ; connections
- dw Daycare_Object ; objects
+
+ map_header Daycare, DAYCARE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/DiglettsCave.asm
+++ b/data/mapHeaders/DiglettsCave.asm
@@ -1,8 +1,3 @@
-DiglettsCave_h::
- db CAVERN ; tileset
- db DIGLETTS_CAVE_HEIGHT, DIGLETTS_CAVE_WIDTH ; dimensions (y, x)
- dw DiglettsCave_Blocks ; blocks
- dw DiglettsCave_TextPointers ; texts
- dw DiglettsCave_Script ; scripts
- db 0 ; connections
- dw DiglettsCave_Object ; objects
+
+ map_header DiglettsCave, DIGLETTS_CAVE, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/DiglettsCaveRoute11.asm
+++ b/data/mapHeaders/DiglettsCaveRoute11.asm
@@ -1,8 +1,3 @@
-DiglettsCaveRoute11_h::
- db CAVERN ; tileset
- db DIGLETTS_CAVE_ROUTE_11_HEIGHT, DIGLETTS_CAVE_ROUTE_11_WIDTH ; dimensions (y, x)
- dw DiglettsCaveRoute11_Blocks ; blocks
- dw DiglettsCaveRoute11_TextPointers ; texts
- dw DiglettsCaveRoute11_Script ; scripts
- db 0 ; connections
- dw DiglettsCaveRoute11_Object ; objects
+
+ map_header DiglettsCaveRoute11, DIGLETTS_CAVE_ROUTE_11, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/DiglettsCaveRoute2.asm
+++ b/data/mapHeaders/DiglettsCaveRoute2.asm
@@ -1,8 +1,3 @@
-DiglettsCaveRoute2_h::
- db CAVERN ; tileset
- db DIGLETTS_CAVE_ROUTE_2_HEIGHT, DIGLETTS_CAVE_ROUTE_2_WIDTH ; dimensions (y, x)
- dw DiglettsCaveRoute2_Blocks ; blocks
- dw DiglettsCaveRoute2_TextPointers ; texts
- dw DiglettsCaveRoute2_Script ; scripts
- db 0 ; connections
- dw DiglettsCaveRoute2_Object ; objects
+
+ map_header DiglettsCaveRoute2, DIGLETTS_CAVE_ROUTE_2, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/FightingDojo.asm
+++ b/data/mapHeaders/FightingDojo.asm
@@ -1,8 +1,3 @@
-FightingDojo_h::
- db DOJO ; tileset
- db FIGHTING_DOJO_HEIGHT, FIGHTING_DOJO_WIDTH ; dimensions (y, x)
- dw FightingDojo_Blocks ; blocks
- dw FightingDojo_TextPointers ; texts
- dw FightingDojo_Script ; scripts
- db 0 ; connections
- dw FightingDojo_Object ; objects
+
+ map_header FightingDojo, FIGHTING_DOJO, DOJO, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaBillsGrandpasHouse.asm
+++ b/data/mapHeaders/FuchsiaBillsGrandpasHouse.asm
@@ -1,8 +1,3 @@
-FuchsiaBillsGrandpasHouse_h::
- db HOUSE ; tileset
- db FUCHSIA_BILLS_GRANDPAS_HOUSE_HEIGHT, FUCHSIA_BILLS_GRANDPAS_HOUSE_WIDTH ; dimensions (y, x)
- dw FuchsiaBillsGrandpasHouse_Blocks ; blocks
- dw FuchsiaBillsGrandpasHouse_TextPointers ; texts
- dw FuchsiaBillsGrandpasHouse_Script ; scripts
- db 0 ; connections
- dw FuchsiaBillsGrandpasHouse_Object ; objects
+
+ map_header FuchsiaBillsGrandpasHouse, FUCHSIA_BILLS_GRANDPAS_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaCity.asm
+++ b/data/mapHeaders/FuchsiaCity.asm
@@ -1,11 +1,6 @@
-FuchsiaCity_h::
- db OVERWORLD ; tileset
- db FUCHSIA_CITY_HEIGHT, FUCHSIA_CITY_WIDTH ; dimensions (y, x)
- dw FuchsiaCity_Blocks ; blocks
- dw FuchsiaCity_TextPointers ; texts
- dw FuchsiaCity_Script ; scripts
- db SOUTH | WEST | EAST ; connections
- SOUTH_MAP_CONNECTION FUCHSIA_CITY, ROUTE_19, 5, 0, Route19_Blocks
- WEST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_18, 4, 0, Route18_Blocks
- EAST_MAP_CONNECTION FUCHSIA_CITY, ROUTE_15, 4, 0, Route15_Blocks
- dw FuchsiaCity_Object ; objects
+
+ map_header FuchsiaCity, FUCHSIA_CITY, OVERWORLD, SOUTH | WEST | EAST
+ connection south, Route19, ROUTE_19, 5
+ connection west, Route18, ROUTE_18, 4
+ connection east, Route15, ROUTE_15, 4
+ end_map_header
--- a/data/mapHeaders/FuchsiaGoodRodHouse.asm
+++ b/data/mapHeaders/FuchsiaGoodRodHouse.asm
@@ -1,8 +1,3 @@
-FuchsiaGoodRodHouse_h::
- db SHIP ; tileset
- db FUCHSIA_GOOD_ROD_HOUSE_HEIGHT, FUCHSIA_GOOD_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw FuchsiaGoodRodHouse_Blocks ; blocks
- dw FuchsiaGoodRodHouse_TextPointers ; texts
- dw FuchsiaGoodRodHouse_Script ; scripts
- db 0 ; connections
- dw FuchsiaGoodRodHouse_Object ; objects
+
+ map_header FuchsiaGoodRodHouse, FUCHSIA_GOOD_ROD_HOUSE, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaGym.asm
+++ b/data/mapHeaders/FuchsiaGym.asm
@@ -1,8 +1,3 @@
-FuchsiaGym_h::
- db GYM ; tileset
- db FUCHSIA_GYM_HEIGHT, FUCHSIA_GYM_WIDTH ; dimensions (y, x)
- dw FuchsiaGym_Blocks ; blocks
- dw FuchsiaGym_TextPointers ; texts
- dw FuchsiaGym_Script ; scripts
- db 0 ; connections
- dw FuchsiaGym_Object ; objects
+
+ map_header FuchsiaGym, FUCHSIA_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaMart.asm
+++ b/data/mapHeaders/FuchsiaMart.asm
@@ -1,8 +1,3 @@
-FuchsiaMart_h::
- db MART ; tileset
- db FUCHSIA_MART_HEIGHT, FUCHSIA_MART_WIDTH ; dimensions (y, x)
- dw FuchsiaMart_Blocks ; blocks
- dw FuchsiaMart_TextPointers ; texts
- dw FuchsiaMart_Script ; scripts
- db 0 ; connections
- dw FuchsiaMart_Object ; objects
+
+ map_header FuchsiaMart, FUCHSIA_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaMeetingRoom.asm
+++ b/data/mapHeaders/FuchsiaMeetingRoom.asm
@@ -1,8 +1,3 @@
-FuchsiaMeetingRoom_h::
- db LAB ; tileset
- db FUCHSIA_MEETING_ROOM_HEIGHT, FUCHSIA_MEETING_ROOM_WIDTH ; dimensions (y, x)
- dw FuchsiaMeetingRoom_Blocks ; blocks
- dw FuchsiaMeetingRoom_TextPointers ; texts
- dw FuchsiaMeetingRoom_Script ; scripts
- db 0 ; connections
- dw FuchsiaMeetingRoom_Object ; objects
+
+ map_header FuchsiaMeetingRoom, FUCHSIA_MEETING_ROOM, LAB, 0
+ end_map_header
--- a/data/mapHeaders/FuchsiaPokecenter.asm
+++ b/data/mapHeaders/FuchsiaPokecenter.asm
@@ -1,8 +1,3 @@
-FuchsiaPokecenter_h::
- db POKECENTER ; tileset
- db FUCHSIA_POKECENTER_HEIGHT, FUCHSIA_POKECENTER_WIDTH ; dimensions (y, x)
- dw FuchsiaPokecenter_Blocks ; blocks
- dw FuchsiaPokecenter_TextPointers ; texts
- dw FuchsiaPokecenter_Script ; scripts
- db 0 ; connections
- dw FuchsiaPokecenter_Object ; objects
+
+ map_header FuchsiaPokecenter, FUCHSIA_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/GameCorner.asm
+++ b/data/mapHeaders/GameCorner.asm
@@ -1,8 +1,3 @@
-GameCorner_h::
- db LOBBY ; tileset
- db GAME_CORNER_HEIGHT, GAME_CORNER_WIDTH ; dimensions (y, x)
- dw GameCorner_Blocks ; blocks
- dw GameCorner_TextPointers ; texts
- dw GameCorner_Script ; scripts
- db 0 ; connections
- dw GameCorner_Object ; objects
+
+ map_header GameCorner, GAME_CORNER, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/GameCornerPrizeRoom.asm
+++ b/data/mapHeaders/GameCornerPrizeRoom.asm
@@ -1,8 +1,3 @@
-GameCornerPrizeRoom_h::
- db LOBBY ; tileset
- db GAME_CORNER_PRIZE_ROOM_HEIGHT, GAME_CORNER_PRIZE_ROOM_WIDTH ; dimensions (y, x)
- dw GameCornerPrizeRoom_Blocks ; blocks
- dw GameCornerPrizeRoom_TextPointers ; texts
- dw GameCornerPrizeRoom_Script ; scripts
- db 0 ; connections
- dw GameCornerPrizeRoom_Object ; objects
+
+ map_header GameCornerPrizeRoom, GAME_CORNER_PRIZE_ROOM, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/HallOfFame.asm
+++ b/data/mapHeaders/HallOfFame.asm
@@ -1,8 +1,3 @@
-HallOfFame_h::
- db GYM ; tileset
- db HALL_OF_FAME_HEIGHT, HALL_OF_FAME_WIDTH ; dimensions (y, x)
- dw HallOfFame_Blocks ; blocks
- dw HallOfFame_TextPointers ; texts
- dw HallOfFame_Script ; scripts
- db 0 ; connections
- dw HallOfFame_Object ; objects
+
+ map_header HallOfFame, HALL_OF_FAME, GYM, 0
+ end_map_header
--- a/data/mapHeaders/IndigoPlateau.asm
+++ b/data/mapHeaders/IndigoPlateau.asm
@@ -1,9 +1,4 @@
-IndigoPlateau_h::
- db PLATEAU ; tileset
- db INDIGO_PLATEAU_HEIGHT, INDIGO_PLATEAU_WIDTH ; dimensions (y, x)
- dw IndigoPlateau_Blocks ; blocks
- dw IndigoPlateau_TextPointers ; texts
- dw IndigoPlateau_Script ; scripts
- db SOUTH ; connections
- SOUTH_MAP_CONNECTION INDIGO_PLATEAU, ROUTE_23, 0, 0, Route23_Blocks
- dw IndigoPlateau_Object ; objects
+
+ map_header IndigoPlateau, INDIGO_PLATEAU, PLATEAU, SOUTH
+ connection south, Route23, ROUTE_23, 0
+ end_map_header
--- a/data/mapHeaders/IndigoPlateauLobby.asm
+++ b/data/mapHeaders/IndigoPlateauLobby.asm
@@ -1,8 +1,3 @@
-IndigoPlateauLobby_h::
- db MART ; tileset
- db INDIGO_PLATEAU_LOBBY_HEIGHT, INDIGO_PLATEAU_LOBBY_WIDTH ; dimensions (y, x)
- dw IndigoPlateauLobby_Blocks ; blocks
- dw IndigoPlateauLobby_TextPointers ; texts
- dw IndigoPlateauLobby_Script ; scripts
- db 0 ; connections
- dw IndigoPlateauLobby_Object ; objects
+
+ map_header IndigoPlateauLobby, INDIGO_PLATEAU_LOBBY, MART, 0
+ end_map_header
--- a/data/mapHeaders/LancesRoom.asm
+++ b/data/mapHeaders/LancesRoom.asm
@@ -1,8 +1,3 @@
-LancesRoom_h::
- db DOJO ; tileset
- db LANCES_ROOM_HEIGHT, LANCES_ROOM_WIDTH ; dimensions (y, x)
- dw LancesRoom_Blocks ; blocks
- dw LancesRoom_TextPointers ; texts
- dw LancesRoom_Script ; scripts
- db 0 ; connections
- dw LancesRoom_Object ; objects
+
+ map_header LancesRoom, LANCES_ROOM, DOJO, 0
+ end_map_header
--- a/data/mapHeaders/LavenderCuboneHouse.asm
+++ b/data/mapHeaders/LavenderCuboneHouse.asm
@@ -1,8 +1,3 @@
-LavenderCuboneHouse_h::
- db HOUSE ; tileset
- db LAVENDER_CUBONE_HOUSE_HEIGHT, LAVENDER_CUBONE_HOUSE_WIDTH ; dimensions (y, x)
- dw LavenderCuboneHouse_Blocks ; blocks
- dw LavenderCuboneHouse_TextPointers ; texts
- dw LavenderCuboneHouse_Script ; scripts
- db 0 ; connections
- dw LavenderCuboneHouse_Object ; objects
+
+ map_header LavenderCuboneHouse, LAVENDER_CUBONE_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/LavenderMart.asm
+++ b/data/mapHeaders/LavenderMart.asm
@@ -1,8 +1,3 @@
-LavenderMart_h::
- db MART ; tileset
- db LAVENDER_MART_HEIGHT, LAVENDER_MART_WIDTH ; dimensions (y, x)
- dw LavenderMart_Blocks ; blocks
- dw LavenderMart_TextPointers ; texts
- dw LavenderMart_Script ; scripts
- db 0 ; connections
- dw LavenderMart_Object ; objects
+
+ map_header LavenderMart, LAVENDER_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/LavenderPokecenter.asm
+++ b/data/mapHeaders/LavenderPokecenter.asm
@@ -1,8 +1,3 @@
-LavenderPokecenter_h::
- db POKECENTER ; tileset
- db LAVENDER_POKECENTER_HEIGHT, LAVENDER_POKECENTER_WIDTH ; dimensions (y, x)
- dw LavenderPokecenter_Blocks ; blocks
- dw LavenderPokecenter_TextPointers ; texts
- dw LavenderPokecenter_Script ; scripts
- db 0 ; connections
- dw LavenderPokecenter_Object ; objects
+
+ map_header LavenderPokecenter, LAVENDER_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/LavenderTown.asm
+++ b/data/mapHeaders/LavenderTown.asm
@@ -1,11 +1,6 @@
-LavenderTown_h::
- db OVERWORLD ; tileset
- db LAVENDER_TOWN_HEIGHT, LAVENDER_TOWN_WIDTH ; dimensions (y, x)
- dw LavenderTown_Blocks ; blocks
- dw LavenderTown_TextPointers ; texts
- dw LavenderTown_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_10, 0, 0, Route10_Blocks
- SOUTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_12, 0, 0, Route12_Blocks, 1
- WEST_MAP_CONNECTION LAVENDER_TOWN, ROUTE_8, 0, 0, Route8_Blocks
- dw LavenderTown_Object ; objects
+
+ map_header LavenderTown, LAVENDER_TOWN, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, Route10, ROUTE_10, 0
+ connection south, Route12, ROUTE_12, 0
+ connection west, Route8, ROUTE_8, 0
+ end_map_header
--- a/data/mapHeaders/LoreleisRoom.asm
+++ b/data/mapHeaders/LoreleisRoom.asm
@@ -1,8 +1,3 @@
-LoreleisRoom_h::
- db GYM ; tileset
- db LORELEIS_ROOM_HEIGHT, LORELEIS_ROOM_WIDTH ; dimensions (y, x)
- dw LoreleisRoom_Blocks ; blocks
- dw LoreleisRoom_TextPointers ; texts
- dw LoreleisRoom_Script ; scripts
- db 0 ; connections
- dw LoreleisRoom_Object ; objects
+
+ map_header LoreleisRoom, LORELEIS_ROOM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/MrFujisHouse.asm
+++ b/data/mapHeaders/MrFujisHouse.asm
@@ -1,8 +1,3 @@
-MrFujisHouse_h::
- db HOUSE ; tileset
- db MR_FUJIS_HOUSE_HEIGHT, MR_FUJIS_HOUSE_WIDTH ; dimensions (y, x)
- dw MrFujisHouse_Blocks ; blocks
- dw MrFujisHouse_TextPointers ; texts
- dw MrFujisHouse_Script ; scripts
- db 0 ; connections
- dw MrFujisHouse_Object ; objects
+
+ map_header MrFujisHouse, MR_FUJIS_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/MrPsychicsHouse.asm
+++ b/data/mapHeaders/MrPsychicsHouse.asm
@@ -1,8 +1,3 @@
-MrPsychicsHouse_h::
- db HOUSE ; tileset
- db MR_PSYCHICS_HOUSE_HEIGHT, MR_PSYCHICS_HOUSE_WIDTH ; dimensions (y, x)
- dw MrPsychicsHouse_Blocks ; blocks
- dw MrPsychicsHouse_TextPointers ; texts
- dw MrPsychicsHouse_Script ; scripts
- db 0 ; connections
- dw MrPsychicsHouse_Object ; objects
+
+ map_header MrPsychicsHouse, MR_PSYCHICS_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/MtMoon1F.asm
+++ b/data/mapHeaders/MtMoon1F.asm
@@ -1,8 +1,3 @@
-MtMoon1F_h::
- db CAVERN ; tileset
- db MT_MOON_1F_HEIGHT, MT_MOON_1F_WIDTH ; dimensions (y, x)
- dw MtMoon1F_Blocks ; blocks
- dw MtMoon1F_TextPointers ; texts
- dw MtMoon1F_Script ; scripts
- db 0 ; connections
- dw MtMoon1F_Object ; objects
+
+ map_header MtMoon1F, MT_MOON_1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/MtMoonB1F.asm
+++ b/data/mapHeaders/MtMoonB1F.asm
@@ -1,8 +1,3 @@
-MtMoonB1F_h::
- db CAVERN ; tileset
- db MT_MOON_B1F_HEIGHT, MT_MOON_B1F_WIDTH ; dimensions (y, x)
- dw MtMoonB1F_Blocks ; blocks
- dw MtMoonB1F_TextPointers ; texts
- dw MtMoonB1F_Script ; scripts
- db 0 ; connections
- dw MtMoonB1F_Object ; objects
+
+ map_header MtMoonB1F, MT_MOON_B1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/MtMoonB2F.asm
+++ b/data/mapHeaders/MtMoonB2F.asm
@@ -1,8 +1,3 @@
-MtMoonB2F_h::
- db CAVERN ; tileset
- db MT_MOON_B2F_HEIGHT, MT_MOON_B2F_WIDTH ; dimensions (y, x)
- dw MtMoonB2F_Blocks ; blocks
- dw MtMoonB2F_TextPointers ; texts
- dw MtMoonB2F_Script ; scripts
- db 0 ; connections
- dw MtMoonB2F_Object ; objects
+
+ map_header MtMoonB2F, MT_MOON_B2F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/MtMoonPokecenter.asm
+++ b/data/mapHeaders/MtMoonPokecenter.asm
@@ -1,8 +1,3 @@
-MtMoonPokecenter_h::
- db POKECENTER ; tileset
- db MT_MOON_POKECENTER_HEIGHT, MT_MOON_POKECENTER_WIDTH ; dimensions (y, x)
- dw MtMoonPokecenter_Blocks ; blocks
- dw MtMoonPokecenter_TextPointers ; texts
- dw MtMoonPokecenter_Script ; scripts
- db 0 ; connections
- dw MtMoonPokecenter_Object ; objects
+
+ map_header MtMoonPokecenter, MT_MOON_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/Museum1F.asm
+++ b/data/mapHeaders/Museum1F.asm
@@ -1,8 +1,3 @@
-Museum1F_h::
- db MUSEUM ; tileset
- db MUSEUM_1F_HEIGHT, MUSEUM_1F_WIDTH ; dimensions (y, x)
- dw Museum1F_Blocks ; blocks
- dw Museum1F_TextPointers ; texts
- dw Museum1F_Script ; scripts
- db 0 ; connections
- dw Museum1F_Object ; objects
+
+ map_header Museum1F, MUSEUM_1F, MUSEUM, 0
+ end_map_header
--- a/data/mapHeaders/Museum2F.asm
+++ b/data/mapHeaders/Museum2F.asm
@@ -1,8 +1,3 @@
-Museum2F_h::
- db MUSEUM ; tileset
- db MUSEUM_2F_HEIGHT, MUSEUM_2F_WIDTH ; dimensions (y, x)
- dw Museum2F_Blocks ; blocks
- dw Museum2F_TextPointers ; texts
- dw Museum2F_Script ; scripts
- db 0 ; connections
- dw Museum2F_Object ; objects
+
+ map_header Museum2F, MUSEUM_2F, MUSEUM, 0
+ end_map_header
--- a/data/mapHeaders/NameRatersHouse.asm
+++ b/data/mapHeaders/NameRatersHouse.asm
@@ -1,8 +1,3 @@
-NameRatersHouse_h::
- db HOUSE ; tileset
- db NAME_RATERS_HOUSE_HEIGHT, NAME_RATERS_HOUSE_WIDTH ; dimensions (y, x)
- dw NameRatersHouse_Blocks ; blocks
- dw NameRatersHouse_TextPointers ; texts
- dw NameRatersHouse_Script ; scripts
- db 0 ; connections
- dw NameRatersHouse_Object ; objects
+
+ map_header NameRatersHouse, NAME_RATERS_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/OaksLab.asm
+++ b/data/mapHeaders/OaksLab.asm
@@ -1,8 +1,3 @@
-OaksLab_h::
- db DOJO ; tileset
- db OAKS_LAB_HEIGHT, OAKS_LAB_WIDTH ; dimensions (y, x)
- dw OaksLab_Blocks ; blocks
- dw OaksLab_TextPointers ; texts
- dw OaksLab_Script ; scripts
- db 0 ; connections
- dw OaksLab_Object ; objects
+
+ map_header OaksLab, OAKS_LAB, DOJO, 0
+ end_map_header
--- a/data/mapHeaders/PalletTown.asm
+++ b/data/mapHeaders/PalletTown.asm
@@ -1,10 +1,5 @@
-PalletTown_h::
- db OVERWORLD ; tileset
- db PALLET_TOWN_HEIGHT, PALLET_TOWN_WIDTH ; dimensions (y, x)
- dw PalletTown_Blocks ; blocks
- dw PalletTown_TextPointers ; texts
- dw PalletTown_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION PALLET_TOWN, ROUTE_1, 0, 0, Route1_Blocks
- SOUTH_MAP_CONNECTION PALLET_TOWN, ROUTE_21, 0, 0, Route21_Blocks, 1
- dw PalletTown_Object ; objects
+
+ map_header PalletTown, PALLET_TOWN, OVERWORLD, NORTH | SOUTH
+ connection north, Route1, ROUTE_1, 0
+ connection south, Route21, ROUTE_21, 0
+ end_map_header
--- a/data/mapHeaders/PewterCity.asm
+++ b/data/mapHeaders/PewterCity.asm
@@ -1,10 +1,5 @@
-PewterCity_h::
- db OVERWORLD ; tileset
- db PEWTER_CITY_HEIGHT, PEWTER_CITY_WIDTH ; dimensions (y, x)
- dw PewterCity_Blocks ; blocks
- dw PewterCity_TextPointers ; texts
- dw PewterCity_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION PEWTER_CITY, ROUTE_2, 5, 0, Route2_Blocks
- EAST_MAP_CONNECTION PEWTER_CITY, ROUTE_3, 4, 0, Route3_Blocks
- dw PewterCity_Object ; objects
+
+ map_header PewterCity, PEWTER_CITY, OVERWORLD, SOUTH | EAST
+ connection south, Route2, ROUTE_2, 5
+ connection east, Route3, ROUTE_3, 4
+ end_map_header
--- a/data/mapHeaders/PewterGym.asm
+++ b/data/mapHeaders/PewterGym.asm
@@ -1,8 +1,3 @@
-PewterGym_h::
- db GYM ; tileset
- db PEWTER_GYM_HEIGHT, PEWTER_GYM_WIDTH ; dimensions (y, x)
- dw PewterGym_Blocks ; blocks
- dw PewterGym_TextPointers ; texts
- dw PewterGym_Script ; scripts
- db 0 ; connections
- dw PewterGym_Object ; objects
+
+ map_header PewterGym, PEWTER_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/PewterMart.asm
+++ b/data/mapHeaders/PewterMart.asm
@@ -1,8 +1,3 @@
-PewterMart_h::
- db MART ; tileset
- db PEWTER_MART_HEIGHT, PEWTER_MART_WIDTH ; dimensions (y, x)
- dw PewterMart_Blocks ; blocks
- dw PewterMart_TextPointers ; texts
- dw PewterMart_Script ; scripts
- db 0 ; connections
- dw PewterMart_Object ; objects
+
+ map_header PewterMart, PEWTER_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/PewterNidoranHouse.asm
+++ b/data/mapHeaders/PewterNidoranHouse.asm
@@ -1,8 +1,3 @@
-PewterNidoranHouse_h::
- db HOUSE ; tileset
- db PEWTER_NIDORAN_HOUSE_HEIGHT, PEWTER_NIDORAN_HOUSE_WIDTH ; dimensions (y, x)
- dw PewterNidoranHouse_Blocks ; blocks
- dw PewterNidoranHouse_TextPointers ; texts
- dw PewterNidoranHouse_Script ; scripts
- db 0 ; connections
- dw PewterNidoranHouse_Object ; objects
+
+ map_header PewterNidoranHouse, PEWTER_NIDORAN_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/PewterPokecenter.asm
+++ b/data/mapHeaders/PewterPokecenter.asm
@@ -1,8 +1,3 @@
-PewterPokecenter_h::
- db POKECENTER ; tileset
- db PEWTER_POKECENTER_HEIGHT, PEWTER_POKECENTER_WIDTH ; dimensions (y, x)
- dw PewterPokecenter_Blocks ; blocks
- dw PewterPokecenter_TextPointers ; texts
- dw PewterPokecenter_Script ; scripts
- db 0 ; connections
- dw PewterPokecenter_Object ; objects
+
+ map_header PewterPokecenter, PEWTER_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/PewterSpeechHouse.asm
+++ b/data/mapHeaders/PewterSpeechHouse.asm
@@ -1,8 +1,3 @@
-PewterSpeechHouse_h::
- db HOUSE ; tileset
- db PEWTER_SPEECH_HOUSE_HEIGHT, PEWTER_SPEECH_HOUSE_WIDTH ; dimensions (y, x)
- dw PewterSpeechHouse_Blocks ; blocks
- dw PewterSpeechHouse_TextPointers ; texts
- dw PewterSpeechHouse_Script ; scripts
- db 0 ; connections
- dw PewterSpeechHouse_Object ; objects
+
+ map_header PewterSpeechHouse, PEWTER_SPEECH_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/PokemonFanClub.asm
+++ b/data/mapHeaders/PokemonFanClub.asm
@@ -1,8 +1,3 @@
-PokemonFanClub_h::
- db INTERIOR ; tileset
- db POKEMON_FAN_CLUB_HEIGHT, POKEMON_FAN_CLUB_WIDTH ; dimensions (y, x)
- dw PokemonFanClub_Blocks ; blocks
- dw PokemonFanClub_TextPointers ; texts
- dw PokemonFanClub_Script ; scripts
- db 0 ; connections
- dw PokemonFanClub_Object ; objects
+
+ map_header PokemonFanClub, POKEMON_FAN_CLUB, INTERIOR, 0
+ end_map_header
--- a/data/mapHeaders/PokemonMansion1F.asm
+++ b/data/mapHeaders/PokemonMansion1F.asm
@@ -1,8 +1,3 @@
-PokemonMansion1F_h::
- db FACILITY ; tileset
- db POKEMON_MANSION_1F_HEIGHT, POKEMON_MANSION_1F_WIDTH ; dimensions (y, x)
- dw PokemonMansion1F_Blocks ; blocks
- dw PokemonMansion1F_TextPointers ; texts
- dw PokemonMansion1F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion1F_Object ; objects
+
+ map_header PokemonMansion1F, POKEMON_MANSION_1F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonMansion2F.asm
+++ b/data/mapHeaders/PokemonMansion2F.asm
@@ -1,8 +1,3 @@
-PokemonMansion2F_h::
- db FACILITY ; tileset
- db POKEMON_MANSION_2F_HEIGHT, POKEMON_MANSION_2F_WIDTH ; dimensions (y, x)
- dw PokemonMansion2F_Blocks ; blocks
- dw PokemonMansion2F_TextPointers ; texts
- dw PokemonMansion2F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion2F_Object ; objects
+
+ map_header PokemonMansion2F, POKEMON_MANSION_2F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonMansion3F.asm
+++ b/data/mapHeaders/PokemonMansion3F.asm
@@ -1,8 +1,3 @@
-PokemonMansion3F_h::
- db FACILITY ; tileset
- db POKEMON_MANSION_3F_HEIGHT, POKEMON_MANSION_3F_WIDTH ; dimensions (y, x)
- dw PokemonMansion3F_Blocks ; blocks
- dw PokemonMansion3F_TextPointers ; texts
- dw PokemonMansion3F_Script ; scripts
- db 0 ; connections
- dw PokemonMansion3F_Object ; objects
+
+ map_header PokemonMansion3F, POKEMON_MANSION_3F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonMansionB1F.asm
+++ b/data/mapHeaders/PokemonMansionB1F.asm
@@ -1,8 +1,3 @@
-PokemonMansionB1F_h::
- db FACILITY ; tileset
- db POKEMON_MANSION_B1F_HEIGHT, POKEMON_MANSION_B1F_WIDTH ; dimensions (y, x)
- dw PokemonMansionB1F_Blocks ; blocks
- dw PokemonMansionB1F_TextPointers ; texts
- dw PokemonMansionB1F_Script ; scripts
- db 0 ; connections
- dw PokemonMansionB1F_Object ; objects
+
+ map_header PokemonMansionB1F, POKEMON_MANSION_B1F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower1F.asm
+++ b/data/mapHeaders/PokemonTower1F.asm
@@ -1,8 +1,3 @@
-PokemonTower1F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_1F_HEIGHT, POKEMON_TOWER_1F_WIDTH ; dimensions (y, x)
- dw PokemonTower1F_Blocks ; blocks
- dw PokemonTower1F_TextPointers ; texts
- dw PokemonTower1F_Script ; scripts
- db 0 ; connections
- dw PokemonTower1F_Object ; objects
+
+ map_header PokemonTower1F, POKEMON_TOWER_1F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower2F.asm
+++ b/data/mapHeaders/PokemonTower2F.asm
@@ -1,8 +1,3 @@
-PokemonTower2F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_2F_HEIGHT, POKEMON_TOWER_2F_WIDTH ; dimensions (y, x)
- dw PokemonTower2F_Blocks ; blocks
- dw PokemonTower2F_TextPointers ; texts
- dw PokemonTower2F_Script ; scripts
- db 0 ; connections
- dw PokemonTower2F_Object ; objects
+
+ map_header PokemonTower2F, POKEMON_TOWER_2F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower3F.asm
+++ b/data/mapHeaders/PokemonTower3F.asm
@@ -1,8 +1,3 @@
-PokemonTower3F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_3F_HEIGHT, POKEMON_TOWER_3F_WIDTH ; dimensions (y, x)
- dw PokemonTower3F_Blocks ; blocks
- dw PokemonTower3F_TextPointers ; texts
- dw PokemonTower3F_Script ; scripts
- db 0 ; connections
- dw PokemonTower3F_Object ; objects
+
+ map_header PokemonTower3F, POKEMON_TOWER_3F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower4F.asm
+++ b/data/mapHeaders/PokemonTower4F.asm
@@ -1,8 +1,3 @@
-PokemonTower4F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_4F_HEIGHT, POKEMON_TOWER_4F_WIDTH ; dimensions (y, x)
- dw PokemonTower4F_Blocks ; blocks
- dw PokemonTower4F_TextPointers ; texts
- dw PokemonTower4F_Script ; scripts
- db 0 ; connections
- dw PokemonTower4F_Object ; objects
+
+ map_header PokemonTower4F, POKEMON_TOWER_4F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower5F.asm
+++ b/data/mapHeaders/PokemonTower5F.asm
@@ -1,8 +1,3 @@
-PokemonTower5F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_5F_HEIGHT, POKEMON_TOWER_5F_WIDTH ; dimensions (y, x)
- dw PokemonTower5F_Blocks ; blocks
- dw PokemonTower5F_TextPointers ; texts
- dw PokemonTower5F_Script ; scripts
- db 0 ; connections
- dw PokemonTower5F_Object ; objects
+
+ map_header PokemonTower5F, POKEMON_TOWER_5F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower6F.asm
+++ b/data/mapHeaders/PokemonTower6F.asm
@@ -1,8 +1,3 @@
-PokemonTower6F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_6F_HEIGHT, POKEMON_TOWER_6F_WIDTH ; dimensions (y, x)
- dw PokemonTower6F_Blocks ; blocks
- dw PokemonTower6F_TextPointers ; texts
- dw PokemonTower6F_Script ; scripts
- db 0 ; connections
- dw PokemonTower6F_Object ; objects
+
+ map_header PokemonTower6F, POKEMON_TOWER_6F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PokemonTower7F.asm
+++ b/data/mapHeaders/PokemonTower7F.asm
@@ -1,8 +1,3 @@
-PokemonTower7F_h::
- db CEMETERY ; tileset
- db POKEMON_TOWER_7F_HEIGHT, POKEMON_TOWER_7F_WIDTH ; dimensions (y, x)
- dw PokemonTower7F_Blocks ; blocks
- dw PokemonTower7F_TextPointers ; texts
- dw PokemonTower7F_Script ; scripts
- db 0 ; connections
- dw PokemonTower7F_Object ; objects
+
+ map_header PokemonTower7F, POKEMON_TOWER_7F, CEMETERY, 0
+ end_map_header
--- a/data/mapHeaders/PowerPlant.asm
+++ b/data/mapHeaders/PowerPlant.asm
@@ -1,8 +1,3 @@
-PowerPlant_h::
- db FACILITY ; tileset
- db POWER_PLANT_HEIGHT, POWER_PLANT_WIDTH ; dimensions (y, x)
- dw PowerPlant_Blocks ; blocks
- dw PowerPlant_TextPointers ; texts
- dw PowerPlant_Script ; scripts
- db 0 ; connections
- dw PowerPlant_Object ; objects
+
+ map_header PowerPlant, POWER_PLANT, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/RedsHouse1F.asm
+++ b/data/mapHeaders/RedsHouse1F.asm
@@ -1,8 +1,3 @@
-RedsHouse1F_h::
- db REDS_HOUSE_1 ; tileset
- db REDS_HOUSE_1F_HEIGHT, REDS_HOUSE_1F_WIDTH ; dimensions (y, x)
- dw RedsHouse1F_Blocks ; blocks
- dw RedsHouse1F_TextPointers ; texts
- dw RedsHouse1F_Script ; scripts
- db 0 ; connections
- dw RedsHouse1F_Object ; objects
+
+ map_header RedsHouse1F, REDS_HOUSE_1F, REDS_HOUSE_1, 0
+ end_map_header
--- a/data/mapHeaders/RedsHouse2F.asm
+++ b/data/mapHeaders/RedsHouse2F.asm
@@ -1,8 +1,3 @@
-RedsHouse2F_h::
- db REDS_HOUSE_2 ; tileset
- db REDS_HOUSE_2F_HEIGHT, REDS_HOUSE_2F_WIDTH ; dimensions (y, x)
- dw RedsHouse2F_Blocks ; blocks
- dw RedsHouse2F_TextPointers ; texts
- dw RedsHouse2F_Script ; scripts
- db $00 ; connections
- dw RedsHouse2F_Object ; objects
+
+ map_header RedsHouse2F, REDS_HOUSE_2F, REDS_HOUSE_2, $00
+ end_map_header
--- a/data/mapHeaders/RockTunnel1F.asm
+++ b/data/mapHeaders/RockTunnel1F.asm
@@ -1,8 +1,3 @@
-RockTunnel1F_h::
- db CAVERN ; tileset
- db ROCK_TUNNEL_1F_HEIGHT, ROCK_TUNNEL_1F_WIDTH ; dimensions (y, x)
- dw RockTunnel1F_Blocks ; blocks
- dw RockTunnel1F_TextPointers ; texts
- dw RockTunnel1F_Script ; scripts
- db 0 ; connections
- dw RockTunnel1F_Object ; objects
+
+ map_header RockTunnel1F, ROCK_TUNNEL_1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/RockTunnelB1F.asm
+++ b/data/mapHeaders/RockTunnelB1F.asm
@@ -1,8 +1,3 @@
-RockTunnelB1F_h::
- db CAVERN ; tileset
- db ROCK_TUNNEL_B1F_HEIGHT, ROCK_TUNNEL_B1F_WIDTH ; dimensions (y, x)
- dw RockTunnelB1F_Blocks ; blocks
- dw RockTunnelB1F_TextPointers ; texts
- dw RockTunnelB1F_Script ; scripts
- db 0 ; connections
- dw RockTunnelB1F_Object ; objects
+
+ map_header RockTunnelB1F, ROCK_TUNNEL_B1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/RockTunnelPokecenter.asm
+++ b/data/mapHeaders/RockTunnelPokecenter.asm
@@ -1,8 +1,3 @@
-RockTunnelPokecenter_h::
- db POKECENTER ; tileset
- db ROCK_TUNNEL_POKECENTER_HEIGHT, ROCK_TUNNEL_POKECENTER_WIDTH ; dimensions (y, x)
- dw RockTunnelPokecenter_Blocks ; blocks
- dw RockTunnelPokecenter_TextPointers ; texts
- dw RockTunnelPokecenter_Script ; scripts
- db 0 ; connections
- dw RockTunnelPokecenter_Object ; objects
+
+ map_header RockTunnelPokecenter, ROCK_TUNNEL_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/RocketHideoutB1F.asm
+++ b/data/mapHeaders/RocketHideoutB1F.asm
@@ -1,8 +1,3 @@
-RocketHideoutB1F_h::
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B1F_HEIGHT, ROCKET_HIDEOUT_B1F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB1F_Blocks ; blocks
- dw RocketHideoutB1F_TextPointers ; texts
- dw RocketHideoutB1F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB1F_Object ; objects
+
+ map_header RocketHideoutB1F, ROCKET_HIDEOUT_B1F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/RocketHideoutB2F.asm
+++ b/data/mapHeaders/RocketHideoutB2F.asm
@@ -1,8 +1,3 @@
-RocketHideoutB2F_h::
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B2F_HEIGHT, ROCKET_HIDEOUT_B2F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB2F_Blocks ; blocks
- dw RocketHideoutB2F_TextPointers ; texts
- dw RocketHideoutB2F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB2F_Object ; objects
+
+ map_header RocketHideoutB2F, ROCKET_HIDEOUT_B2F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/RocketHideoutB3F.asm
+++ b/data/mapHeaders/RocketHideoutB3F.asm
@@ -1,8 +1,3 @@
-RocketHideoutB3F_h::
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B3F_HEIGHT, ROCKET_HIDEOUT_B3F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB3F_Blocks ; blocks
- dw RocketHideoutB3F_TextPointers ; texts
- dw RocketHideoutB3F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB3F_Object ; objects
+
+ map_header RocketHideoutB3F, ROCKET_HIDEOUT_B3F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/RocketHideoutB4F.asm
+++ b/data/mapHeaders/RocketHideoutB4F.asm
@@ -1,8 +1,3 @@
-RocketHideoutB4F_h::
- db FACILITY ; tileset
- db ROCKET_HIDEOUT_B4F_HEIGHT, ROCKET_HIDEOUT_B4F_WIDTH ; dimensions (y, x)
- dw RocketHideoutB4F_Blocks ; blocks
- dw RocketHideoutB4F_TextPointers ; texts
- dw RocketHideoutB4F_Script ; scripts
- db 0 ; connections
- dw RocketHideoutB4F_Object ; objects
+
+ map_header RocketHideoutB4F, ROCKET_HIDEOUT_B4F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/RocketHideoutElevator.asm
+++ b/data/mapHeaders/RocketHideoutElevator.asm
@@ -1,8 +1,3 @@
-RocketHideoutElevator_h::
- db LOBBY ; tileset
- db ROCKET_HIDEOUT_ELEVATOR_HEIGHT, ROCKET_HIDEOUT_ELEVATOR_WIDTH ; dimensions (y, x)
- dw RocketHideoutElevator_Blocks ; blocks
- dw RocketHideoutElevator_TextPointers ; texts
- dw RocketHideoutElevator_Script ; scripts
- db 0 ; connections
- dw RocketHideoutElevator_Object ; objects
+
+ map_header RocketHideoutElevator, ROCKET_HIDEOUT_ELEVATOR, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/Route1.asm
+++ b/data/mapHeaders/Route1.asm
@@ -1,10 +1,5 @@
-Route1_h::
- db OVERWORLD ; tileset
- db ROUTE_1_HEIGHT, ROUTE_1_WIDTH ; dimensions (y, x)
- dw Route1_Blocks ; blocks
- dw Route1_TextPointers ; texts
- dw Route1_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_1, VIRIDIAN_CITY, -3, 2, ViridianCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_1, PALLET_TOWN, 0, 0, PalletTown_Blocks, 1
- dw Route1_Object ; objects
+
+ map_header Route1, ROUTE_1, OVERWORLD, NORTH | SOUTH
+ connection north, ViridianCity, VIRIDIAN_CITY, -5
+ connection south, PalletTown, PALLET_TOWN, 0
+ end_map_header
--- a/data/mapHeaders/Route10.asm
+++ b/data/mapHeaders/Route10.asm
@@ -1,10 +1,5 @@
-Route10_h::
- db OVERWORLD ; tileset
- db ROUTE_10_HEIGHT, ROUTE_10_WIDTH ; dimensions (y, x)
- dw Route10_Blocks ; blocks
- dw Route10_TextPointers ; texts
- dw Route10_Script ; scripts
- db SOUTH | WEST ; connections
- SOUTH_MAP_CONNECTION ROUTE_10, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- WEST_MAP_CONNECTION ROUTE_10, ROUTE_9, 0, 0, Route9_Blocks
- dw Route10_Object ; objects
+
+ map_header Route10, ROUTE_10, OVERWORLD, SOUTH | WEST
+ connection south, LavenderTown, LAVENDER_TOWN, 0
+ connection west, Route9, ROUTE_9, 0
+ end_map_header
--- a/data/mapHeaders/Route11.asm
+++ b/data/mapHeaders/Route11.asm
@@ -1,10 +1,5 @@
-Route11_h::
- db OVERWORLD ; tileset
- db ROUTE_11_HEIGHT, ROUTE_11_WIDTH ; dimensions (y, x)
- dw Route11_Blocks ; blocks
- dw Route11_TextPointers ; texts
- dw Route11_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_11, VERMILION_CITY, -3, 1, VermilionCity_Blocks
- EAST_MAP_CONNECTION ROUTE_11, ROUTE_12, -3, 24, Route12_Blocks, 1
- dw Route11_Object ; objects
+
+ map_header Route11, ROUTE_11, OVERWORLD, WEST | EAST
+ connection west, VermilionCity, VERMILION_CITY, -4
+ connection east, Route12, ROUTE_12, -27
+ end_map_header
--- a/data/mapHeaders/Route11Gate1F.asm
+++ b/data/mapHeaders/Route11Gate1F.asm
@@ -1,8 +1,3 @@
-Route11Gate1F_h::
- db GATE ; tileset
- db ROUTE_11_GATE_1F_HEIGHT, ROUTE_11_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route11Gate1F_Blocks ; blocks
- dw Route11Gate1F_TextPointers ; texts
- dw Route11Gate1F_Script ; scripts
- db 0 ; connections
- dw Route11Gate1F_Object ; objects
+
+ map_header Route11Gate1F, ROUTE_11_GATE_1F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route11Gate2F.asm
+++ b/data/mapHeaders/Route11Gate2F.asm
@@ -1,8 +1,3 @@
-Route11Gate2F_h::
- db GATE ; tileset
- db ROUTE_11_GATE_2F_HEIGHT, ROUTE_11_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route11Gate2F_Blocks ; blocks
- dw Route11Gate2F_TextPointers ; texts
- dw Route11Gate2F_Script ; scripts
- db 0 ; connections
- dw Route11Gate2F_Object ; objects
+
+ map_header Route11Gate2F, ROUTE_11_GATE_2F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route12.asm
+++ b/data/mapHeaders/Route12.asm
@@ -1,11 +1,6 @@
-Route12_h::
- db OVERWORLD ; tileset
- db ROUTE_12_HEIGHT, ROUTE_12_WIDTH ; dimensions (y, x)
- dw Route12_Blocks ; blocks
- dw Route12_TextPointers ; texts
- dw Route12_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_12, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- SOUTH_MAP_CONNECTION ROUTE_12, ROUTE_13, -3, 17, Route13_Blocks
- WEST_MAP_CONNECTION ROUTE_12, ROUTE_11, 27, 0, Route11_Blocks
- dw Route12_Object ; objects
+
+ map_header Route12, ROUTE_12, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, LavenderTown, LAVENDER_TOWN, 0
+ connection south, Route13, ROUTE_13, -20
+ connection west, Route11, ROUTE_11, 27
+ end_map_header
--- a/data/mapHeaders/Route12Gate1F.asm
+++ b/data/mapHeaders/Route12Gate1F.asm
@@ -1,8 +1,3 @@
-Route12Gate1F_h::
- db GATE ; tileset
- db ROUTE_12_GATE_1F_HEIGHT, ROUTE_12_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route12Gate1F_Blocks ; blocks
- dw Route12Gate1F_TextPointers ; texts
- dw Route12Gate1F_Script ; scripts
- db 0 ; connections
- dw Route12Gate1F_Object ; objects
+
+ map_header Route12Gate1F, ROUTE_12_GATE_1F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route12Gate2F.asm
+++ b/data/mapHeaders/Route12Gate2F.asm
@@ -1,8 +1,3 @@
-Route12Gate2F_h::
- db GATE ; tileset
- db ROUTE_12_GATE_2F_HEIGHT, ROUTE_12_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route12Gate2F_Blocks ; blocks
- dw Route12Gate2F_TextPointers ; texts
- dw Route12Gate2F_Script ; scripts
- db 0 ; connections
- dw Route12Gate2F_Object ; objects
+
+ map_header Route12Gate2F, ROUTE_12_GATE_2F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route12SuperRodHouse.asm
+++ b/data/mapHeaders/Route12SuperRodHouse.asm
@@ -1,8 +1,3 @@
-Route12SuperRodHouse_h::
- db HOUSE ; tileset
- db ROUTE_12_SUPER_ROD_HOUSE_HEIGHT, ROUTE_12_SUPER_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw Route12SuperRodHouse_Blocks ; blocks
- dw Route12SuperRodHouse_TextPointers ; texts
- dw Route12SuperRodHouse_Script ; scripts
- db 0 ; connections
- dw Route12SuperRodHouse_Object ; objects
+
+ map_header Route12SuperRodHouse, ROUTE_12_SUPER_ROD_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/Route13.asm
+++ b/data/mapHeaders/Route13.asm
@@ -1,10 +1,5 @@
-Route13_h::
- db OVERWORLD ; tileset
- db ROUTE_13_HEIGHT, ROUTE_13_WIDTH ; dimensions (y, x)
- dw Route13_Blocks ; blocks
- dw Route13_TextPointers ; texts
- dw Route13_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_13, ROUTE_12, 20, 0, Route12_Blocks
- WEST_MAP_CONNECTION ROUTE_13, ROUTE_14, 0, 0, Route14_Blocks
- dw Route13_Object ; objects
+
+ map_header Route13, ROUTE_13, OVERWORLD, NORTH | WEST
+ connection north, Route12, ROUTE_12, 20
+ connection west, Route14, ROUTE_14, 0
+ end_map_header
--- a/data/mapHeaders/Route14.asm
+++ b/data/mapHeaders/Route14.asm
@@ -1,10 +1,5 @@
-Route14_h::
- db OVERWORLD ; tileset
- db ROUTE_14_HEIGHT, ROUTE_14_WIDTH ; dimensions (y, x)
- dw Route14_Blocks ; blocks
- dw Route14_TextPointers ; texts
- dw Route14_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_14, ROUTE_15, 18, 0, Route15_Blocks
- EAST_MAP_CONNECTION ROUTE_14, ROUTE_13, 0, 0, Route13_Blocks
- dw Route14_Object ; objects
+
+ map_header Route14, ROUTE_14, OVERWORLD, WEST | EAST
+ connection west, Route15, ROUTE_15, 18
+ connection east, Route13, ROUTE_13, 0
+ end_map_header
--- a/data/mapHeaders/Route15.asm
+++ b/data/mapHeaders/Route15.asm
@@ -1,10 +1,5 @@
-Route15_h::
- db OVERWORLD ; tileset
- db ROUTE_15_HEIGHT, ROUTE_15_WIDTH ; dimensions (y, x)
- dw Route15_Blocks ; blocks
- dw Route15_TextPointers ; texts
- dw Route15_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_15, FUCHSIA_CITY, -3, 1, FuchsiaCity_Blocks
- EAST_MAP_CONNECTION ROUTE_15, ROUTE_14, -3, 15, Route14_Blocks
- dw Route15_Object ; objects
+
+ map_header Route15, ROUTE_15, OVERWORLD, WEST | EAST
+ connection west, FuchsiaCity, FUCHSIA_CITY, -4
+ connection east, Route14, ROUTE_14, -18
+ end_map_header
--- a/data/mapHeaders/Route15Gate1F.asm
+++ b/data/mapHeaders/Route15Gate1F.asm
@@ -1,8 +1,3 @@
-Route15Gate1F_h::
- db GATE ; tileset
- db ROUTE_15_GATE_1F_HEIGHT, ROUTE_15_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route15Gate1F_Blocks ; blocks
- dw Route15Gate1F_TextPointers ; texts
- dw Route15Gate1F_Script ; scripts
- db 0 ; connections
- dw Route15Gate1F_Object ; objects
+
+ map_header Route15Gate1F, ROUTE_15_GATE_1F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route15Gate2F.asm
+++ b/data/mapHeaders/Route15Gate2F.asm
@@ -1,8 +1,3 @@
-Route15Gate2F_h::
- db GATE ; tileset
- db ROUTE_15_GATE_2F_HEIGHT, ROUTE_15_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route15Gate2F_Blocks ; blocks
- dw Route15Gate2F_TextPointers ; texts
- dw Route15Gate2F_Script ; scripts
- db 0 ; connections
- dw Route15Gate2F_Object ; objects
+
+ map_header Route15Gate2F, ROUTE_15_GATE_2F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route16.asm
+++ b/data/mapHeaders/Route16.asm
@@ -1,10 +1,5 @@
-Route16_h::
- db OVERWORLD ; tileset
- db ROUTE_16_HEIGHT, ROUTE_16_WIDTH ; dimensions (y, x)
- dw Route16_Blocks ; blocks
- dw Route16_TextPointers ; texts
- dw Route16_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_16, ROUTE_17, 0, 0, Route17_Blocks
- EAST_MAP_CONNECTION ROUTE_16, CELADON_CITY, -3, 1, CeladonCity_Blocks, 1
- dw Route16_Object ; objects
+
+ map_header Route16, ROUTE_16, OVERWORLD, SOUTH | EAST
+ connection south, Route17, ROUTE_17, 0
+ connection east, CeladonCity, CELADON_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route16FlyHouse.asm
+++ b/data/mapHeaders/Route16FlyHouse.asm
@@ -1,8 +1,3 @@
-Route16FlyHouse_h::
- db HOUSE ; tileset
- db ROUTE_16_FLY_HOUSE_HEIGHT, ROUTE_16_FLY_HOUSE_WIDTH ; dimensions (y, x)
- dw Route16FlyHouse_Blocks ; blocks
- dw Route16FlyHouse_TextPointers ; texts
- dw Route16FlyHouse_Script ; scripts
- db 0 ; connections
- dw Route16FlyHouse_Object ; objects
+
+ map_header Route16FlyHouse, ROUTE_16_FLY_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/Route16Gate1F.asm
+++ b/data/mapHeaders/Route16Gate1F.asm
@@ -1,8 +1,3 @@
-Route16Gate1F_h::
- db GATE ; tileset
- db ROUTE_16_GATE_1F_HEIGHT, ROUTE_16_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route16Gate1F_Blocks ; blocks
- dw Route16Gate1F_TextPointers ; texts
- dw Route16Gate1F_Script ; scripts
- db 0 ; connections
- dw Route16Gate1F_Object ; objects
+
+ map_header Route16Gate1F, ROUTE_16_GATE_1F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route16Gate2F.asm
+++ b/data/mapHeaders/Route16Gate2F.asm
@@ -1,8 +1,3 @@
-Route16Gate2F_h::
- db GATE ; tileset
- db ROUTE_16_GATE_2F_HEIGHT, ROUTE_16_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route16Gate2F_Blocks ; blocks
- dw Route16Gate2F_TextPointers ; texts
- dw Route16Gate2F_Script ; scripts
- db 0 ; connections
- dw Route16Gate2F_Object ; objects
+
+ map_header Route16Gate2F, ROUTE_16_GATE_2F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route17.asm
+++ b/data/mapHeaders/Route17.asm
@@ -1,10 +1,5 @@
-Route17_h::
- db OVERWORLD ; tileset
- db ROUTE_17_HEIGHT, ROUTE_17_WIDTH ; dimensions (y, x)
- dw Route17_Blocks ; blocks
- dw Route17_TextPointers ; texts
- dw Route17_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_17, ROUTE_16, 0, 0, Route16_Blocks
- SOUTH_MAP_CONNECTION ROUTE_17, ROUTE_18, 0, 0, Route18_Blocks, 1
- dw Route17_Object ; objects
+
+ map_header Route17, ROUTE_17, OVERWORLD, NORTH | SOUTH
+ connection north, Route16, ROUTE_16, 0
+ connection south, Route18, ROUTE_18, 0
+ end_map_header
--- a/data/mapHeaders/Route18.asm
+++ b/data/mapHeaders/Route18.asm
@@ -1,10 +1,5 @@
-Route18_h::
- db OVERWORLD ; tileset
- db ROUTE_18_HEIGHT, ROUTE_18_WIDTH ; dimensions (y, x)
- dw Route18_Blocks ; blocks
- dw Route18_TextPointers ; texts
- dw Route18_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION ROUTE_18, ROUTE_17, 0, 0, Route17_Blocks
- EAST_MAP_CONNECTION ROUTE_18, FUCHSIA_CITY, -3, 1, FuchsiaCity_Blocks, 1
- dw Route18_Object ; objects
+
+ map_header Route18, ROUTE_18, OVERWORLD, NORTH | EAST
+ connection north, Route17, ROUTE_17, 0
+ connection east, FuchsiaCity, FUCHSIA_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route18Gate1F.asm
+++ b/data/mapHeaders/Route18Gate1F.asm
@@ -1,8 +1,3 @@
-Route18Gate1F_h::
- db GATE ; tileset
- db ROUTE_18_GATE_1F_HEIGHT, ROUTE_18_GATE_1F_WIDTH ; dimensions (y, x)
- dw Route18Gate1F_Blocks ; blocks
- dw Route18Gate1F_TextPointers ; texts
- dw Route18Gate1F_Script ; scripts
- db 0 ; connections
- dw Route18Gate1F_Object ; objects
+
+ map_header Route18Gate1F, ROUTE_18_GATE_1F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route18Gate2F.asm
+++ b/data/mapHeaders/Route18Gate2F.asm
@@ -1,8 +1,3 @@
-Route18Gate2F_h::
- db GATE ; tileset
- db ROUTE_18_GATE_2F_HEIGHT, ROUTE_18_GATE_2F_WIDTH ; dimensions (y, x)
- dw Route18Gate2F_Blocks ; blocks
- dw Route18Gate2F_TextPointers ; texts
- dw Route18Gate2F_Script ; scripts
- db 0 ; connections
- dw Route18Gate2F_Object ; objects
+
+ map_header Route18Gate2F, ROUTE_18_GATE_2F, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route19.asm
+++ b/data/mapHeaders/Route19.asm
@@ -1,10 +1,5 @@
-Route19_h::
- db OVERWORLD ; tileset
- db ROUTE_19_HEIGHT, ROUTE_19_WIDTH ; dimensions (y, x)
- dw Route19_Blocks ; blocks
- dw Route19_TextPointers ; texts
- dw Route19_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_19, FUCHSIA_CITY, -3, 2, FuchsiaCity_Blocks
- WEST_MAP_CONNECTION ROUTE_19, ROUTE_20, 18, 0, Route20_Blocks
- dw Route19_Object ; objects
+
+ map_header Route19, ROUTE_19, OVERWORLD, NORTH | WEST
+ connection north, FuchsiaCity, FUCHSIA_CITY, -5
+ connection west, Route20, ROUTE_20, 18
+ end_map_header
--- a/data/mapHeaders/Route2.asm
+++ b/data/mapHeaders/Route2.asm
@@ -1,10 +1,5 @@
-Route2_h::
- db OVERWORLD ; tileset
- db ROUTE_2_HEIGHT, ROUTE_2_WIDTH ; dimensions (y, x)
- dw Route2_Blocks ; blocks
- dw Route2_TextPointers ; texts
- dw Route2_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_2, PEWTER_CITY, -3, 2, PewterCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_2, VIRIDIAN_CITY, -3, 2, ViridianCity_Blocks, 1
- dw Route2_Object ; objects
+
+ map_header Route2, ROUTE_2, OVERWORLD, NORTH | SOUTH
+ connection north, PewterCity, PEWTER_CITY, -5
+ connection south, ViridianCity, VIRIDIAN_CITY, -5
+ end_map_header
--- a/data/mapHeaders/Route20.asm
+++ b/data/mapHeaders/Route20.asm
@@ -1,10 +1,5 @@
-Route20_h::
- db OVERWORLD ; tileset
- db ROUTE_20_HEIGHT, ROUTE_20_WIDTH ; dimensions (y, x)
- dw Route20_Blocks ; blocks
- dw Route20_TextPointers ; texts
- dw Route20_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_20, CINNABAR_ISLAND, 0, 0, CinnabarIsland_Blocks
- EAST_MAP_CONNECTION ROUTE_20, ROUTE_19, -3, 15, Route19_Blocks
- dw Route20_Object ; objects
+
+ map_header Route20, ROUTE_20, OVERWORLD, WEST | EAST
+ connection west, CinnabarIsland, CINNABAR_ISLAND, 0
+ connection east, Route19, ROUTE_19, -18
+ end_map_header
--- a/data/mapHeaders/Route21.asm
+++ b/data/mapHeaders/Route21.asm
@@ -1,10 +1,5 @@
-Route21_h::
- db OVERWORLD ; tileset
- db ROUTE_21_HEIGHT, ROUTE_21_WIDTH ; dimensions (y, x)
- dw Route21_Blocks ; blocks
- dw Route21_TextPointers ; texts
- dw Route21_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_21, PALLET_TOWN, 0, 0, PalletTown_Blocks
- SOUTH_MAP_CONNECTION ROUTE_21, CINNABAR_ISLAND, 0, 0, CinnabarIsland_Blocks, 1
- dw Route21_Object ; objects
+
+ map_header Route21, ROUTE_21, OVERWORLD, NORTH | SOUTH
+ connection north, PalletTown, PALLET_TOWN, 0
+ connection south, CinnabarIsland, CINNABAR_ISLAND, 0
+ end_map_header
--- a/data/mapHeaders/Route22.asm
+++ b/data/mapHeaders/Route22.asm
@@ -1,10 +1,5 @@
-Route22_h::
- db OVERWORLD ; tileset
- db ROUTE_22_HEIGHT, ROUTE_22_WIDTH ; dimensions (y, x)
- dw Route22_Blocks ; blocks
- dw Route22_TextPointers ; texts
- dw Route22_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION ROUTE_22, ROUTE_23, 0, 0, Route23_Blocks
- EAST_MAP_CONNECTION ROUTE_22, VIRIDIAN_CITY, -3, 1, ViridianCity_Blocks, 1
- dw Route22_Object ; objects
+
+ map_header Route22, ROUTE_22, OVERWORLD, NORTH | EAST
+ connection north, Route23, ROUTE_23, 0
+ connection east, ViridianCity, VIRIDIAN_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route22Gate.asm
+++ b/data/mapHeaders/Route22Gate.asm
@@ -1,8 +1,3 @@
-Route22Gate_h::
- db GATE ; tileset
- db ROUTE_22_GATE_HEIGHT, ROUTE_22_GATE_WIDTH ; dimensions (y, x)
- dw Route22Gate_Blocks ; blocks
- dw Route22Gate_TextPointers ; texts
- dw Route22Gate_Script ; scripts
- db 0 ; connections
- dw Route22Gate_Object ; objects
+
+ map_header Route22Gate, ROUTE_22_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route23.asm
+++ b/data/mapHeaders/Route23.asm
@@ -1,10 +1,5 @@
-Route23_h::
- db PLATEAU ; tileset
- db ROUTE_23_HEIGHT, ROUTE_23_WIDTH ; dimensions (y, x)
- dw Route23_Blocks ; blocks
- dw Route23_TextPointers ; texts
- dw Route23_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_23, INDIGO_PLATEAU, 0, 0, IndigoPlateau_Blocks
- SOUTH_MAP_CONNECTION ROUTE_23, ROUTE_22, 0, 0, Route22_Blocks, 1
- dw Route23_Object ; objects
+
+ map_header Route23, ROUTE_23, PLATEAU, NORTH | SOUTH
+ connection north, IndigoPlateau, INDIGO_PLATEAU, 0
+ connection south, Route22, ROUTE_22, 0
+ end_map_header
--- a/data/mapHeaders/Route24.asm
+++ b/data/mapHeaders/Route24.asm
@@ -1,10 +1,5 @@
-Route24_h::
- db OVERWORLD ; tileset
- db ROUTE_24_HEIGHT, ROUTE_24_WIDTH ; dimensions (y, x)
- dw Route24_Blocks ; blocks
- dw Route24_TextPointers ; texts
- dw Route24_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_24, CERULEAN_CITY, -3, 2, CeruleanCity_Blocks, 1
- EAST_MAP_CONNECTION ROUTE_24, ROUTE_25, 0, 0, Route25_Blocks
- dw Route24_Object ; objects
+
+ map_header Route24, ROUTE_24, OVERWORLD, SOUTH | EAST
+ connection south, CeruleanCity, CERULEAN_CITY, -5
+ connection east, Route25, ROUTE_25, 0
+ end_map_header
--- a/data/mapHeaders/Route25.asm
+++ b/data/mapHeaders/Route25.asm
@@ -1,9 +1,4 @@
-Route25_h::
- db OVERWORLD ; tileset
- db ROUTE_25_HEIGHT, ROUTE_25_WIDTH ; dimensions (y, x)
- dw Route25_Blocks ; blocks
- dw Route25_TextPointers ; texts
- dw Route25_Script ; scripts
- db WEST ; connections
- WEST_MAP_CONNECTION ROUTE_25, ROUTE_24, 0, 0, Route24_Blocks
- dw Route25_Object ; objects
+
+ map_header Route25, ROUTE_25, OVERWORLD, WEST
+ connection west, Route24, ROUTE_24, 0
+ end_map_header
--- a/data/mapHeaders/Route2Gate.asm
+++ b/data/mapHeaders/Route2Gate.asm
@@ -1,8 +1,3 @@
-Route2Gate_h::
- db GATE ; tileset
- db ROUTE_2_GATE_HEIGHT, ROUTE_2_GATE_WIDTH ; dimensions (y, x)
- dw Route2Gate_Blocks ; blocks
- dw Route2Gate_TextPointers ; texts
- dw Route2Gate_Script ; scripts
- db 0 ; connections
- dw Route2Gate_Object ; objects
+
+ map_header Route2Gate, ROUTE_2_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route2TradeHouse.asm
+++ b/data/mapHeaders/Route2TradeHouse.asm
@@ -1,8 +1,3 @@
-Route2TradeHouse_h::
- db HOUSE ; tileset
- db ROUTE_2_TRADE_HOUSE_HEIGHT, ROUTE_2_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw Route2TradeHouse_Blocks ; blocks
- dw Route2TradeHouse_TextPointers ; texts
- dw Route2TradeHouse_Script ; scripts
- db 0 ; connections
- dw Route2TradeHouse_Object ; objects
+
+ map_header Route2TradeHouse, ROUTE_2_TRADE_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/Route3.asm
+++ b/data/mapHeaders/Route3.asm
@@ -1,10 +1,5 @@
-Route3_h::
- db OVERWORLD ; tileset
- db ROUTE_3_HEIGHT, ROUTE_3_WIDTH ; dimensions (y, x)
- dw Route3_Blocks ; blocks
- dw Route3_TextPointers ; texts
- dw Route3_Script ; scripts
- db NORTH | WEST ; connections
- NORTH_MAP_CONNECTION ROUTE_3, ROUTE_4, 25, 0, Route4_Blocks
- WEST_MAP_CONNECTION ROUTE_3, PEWTER_CITY, -3, 1, PewterCity_Blocks
- dw Route3_Object ; objects
+
+ map_header Route3, ROUTE_3, OVERWORLD, NORTH | WEST
+ connection north, Route4, ROUTE_4, 25
+ connection west, PewterCity, PEWTER_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route4.asm
+++ b/data/mapHeaders/Route4.asm
@@ -1,10 +1,5 @@
-Route4_h::
- db OVERWORLD ; tileset
- db ROUTE_4_HEIGHT, ROUTE_4_WIDTH ; dimensions (y, x)
- dw Route4_Blocks ; blocks
- dw Route4_TextPointers ; texts
- dw Route4_Script ; scripts
- db SOUTH | EAST ; connections
- SOUTH_MAP_CONNECTION ROUTE_4, ROUTE_3, -3, 22, Route3_Blocks
- EAST_MAP_CONNECTION ROUTE_4, CERULEAN_CITY, -3, 1, CeruleanCity_Blocks, 1
- dw Route4_Object ; objects
+
+ map_header Route4, ROUTE_4, OVERWORLD, SOUTH | EAST
+ connection south, Route3, ROUTE_3, -25
+ connection east, CeruleanCity, CERULEAN_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route5.asm
+++ b/data/mapHeaders/Route5.asm
@@ -1,10 +1,5 @@
-Route5_h::
- db OVERWORLD ; tileset
- db ROUTE_5_HEIGHT, ROUTE_5_WIDTH ; dimensions (y, x)
- dw Route5_Blocks ; blocks
- dw Route5_TextPointers ; texts
- dw Route5_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_5, CERULEAN_CITY, -3, 2, CeruleanCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_5, SAFFRON_CITY, -3, 2, SaffronCity_Blocks, 1
- dw Route5_Object ; objects
+
+ map_header Route5, ROUTE_5, OVERWORLD, NORTH | SOUTH
+ connection north, CeruleanCity, CERULEAN_CITY, -5
+ connection south, SaffronCity, SAFFRON_CITY, -5
+ end_map_header
--- a/data/mapHeaders/Route5Gate.asm
+++ b/data/mapHeaders/Route5Gate.asm
@@ -1,8 +1,3 @@
-Route5Gate_h::
- db GATE ; tileset
- db ROUTE_5_GATE_HEIGHT, ROUTE_5_GATE_WIDTH ; dimensions (y, x)
- dw Route5Gate_Blocks ; blocks
- dw Route5Gate_TextPointers ; texts
- dw Route5Gate_Script ; scripts
- db 0 ; connections
- dw Route5Gate_Object ; objects
+
+ map_header Route5Gate, ROUTE_5_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route6.asm
+++ b/data/mapHeaders/Route6.asm
@@ -1,10 +1,5 @@
-Route6_h::
- db OVERWORLD ; tileset
- db ROUTE_6_HEIGHT, ROUTE_6_WIDTH ; dimensions (y, x)
- dw Route6_Blocks ; blocks
- dw Route6_TextPointers ; texts
- dw Route6_Script ; scripts
- db NORTH | SOUTH ; connections
- NORTH_MAP_CONNECTION ROUTE_6, SAFFRON_CITY, -3, 2, SaffronCity_Blocks
- SOUTH_MAP_CONNECTION ROUTE_6, VERMILION_CITY, -3, 2, VermilionCity_Blocks, 1
- dw Route6_Object ; objects
+
+ map_header Route6, ROUTE_6, OVERWORLD, NORTH | SOUTH
+ connection north, SaffronCity, SAFFRON_CITY, -5
+ connection south, VermilionCity, VERMILION_CITY, -5
+ end_map_header
--- a/data/mapHeaders/Route6Gate.asm
+++ b/data/mapHeaders/Route6Gate.asm
@@ -1,8 +1,3 @@
-Route6Gate_h::
- db GATE ; tileset
- db ROUTE_6_GATE_HEIGHT, ROUTE_6_GATE_WIDTH ; dimensions (y, x)
- dw Route6Gate_Blocks ; blocks
- dw Route6Gate_TextPointers ; texts
- dw Route6Gate_Script ; scripts
- db 0 ; connections
- dw Route6Gate_Object ; objects
+
+ map_header Route6Gate, ROUTE_6_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route7.asm
+++ b/data/mapHeaders/Route7.asm
@@ -1,10 +1,5 @@
-Route7_h::
- db OVERWORLD ; tileset
- db ROUTE_7_HEIGHT, ROUTE_7_WIDTH ; dimensions (y, x)
- dw Route7_Blocks ; blocks
- dw Route7_TextPointers ; texts
- dw Route7_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_7, CELADON_CITY, -3, 1, CeladonCity_Blocks
- EAST_MAP_CONNECTION ROUTE_7, SAFFRON_CITY, -3, 1, SaffronCity_Blocks, 1
- dw Route7_Object ; objects
+
+ map_header Route7, ROUTE_7, OVERWORLD, WEST | EAST
+ connection west, CeladonCity, CELADON_CITY, -4
+ connection east, SaffronCity, SAFFRON_CITY, -4
+ end_map_header
--- a/data/mapHeaders/Route7Gate.asm
+++ b/data/mapHeaders/Route7Gate.asm
@@ -1,8 +1,3 @@
-Route7Gate_h::
- db GATE ; tileset
- db ROUTE_7_GATE_HEIGHT, ROUTE_7_GATE_WIDTH ; dimensions (y, x)
- dw Route7Gate_Blocks ; blocks
- dw Route7Gate_TextPointers ; texts
- dw Route7Gate_Script ; scripts
- db 0 ; connections
- dw Route7Gate_Object ; objects
+
+ map_header Route7Gate, ROUTE_7_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route8.asm
+++ b/data/mapHeaders/Route8.asm
@@ -1,10 +1,5 @@
-Route8_h::
- db OVERWORLD ; tileset
- db ROUTE_8_HEIGHT, ROUTE_8_WIDTH ; dimensions (y, x)
- dw Route8_Blocks ; blocks
- dw Route8_TextPointers ; texts
- dw Route8_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_8, SAFFRON_CITY, -3, 1, SaffronCity_Blocks
- EAST_MAP_CONNECTION ROUTE_8, LAVENDER_TOWN, 0, 0, LavenderTown_Blocks
- dw Route8_Object ; objects
+
+ map_header Route8, ROUTE_8, OVERWORLD, WEST | EAST
+ connection west, SaffronCity, SAFFRON_CITY, -4
+ connection east, LavenderTown, LAVENDER_TOWN, 0
+ end_map_header
--- a/data/mapHeaders/Route8Gate.asm
+++ b/data/mapHeaders/Route8Gate.asm
@@ -1,8 +1,3 @@
-Route8Gate_h::
- db GATE ; tileset
- db ROUTE_8_GATE_HEIGHT, ROUTE_8_GATE_WIDTH ; dimensions (y, x)
- dw Route8Gate_Blocks ; blocks
- dw Route8Gate_TextPointers ; texts
- dw Route8Gate_Script ; scripts
- db 0 ; connections
- dw Route8Gate_Object ; objects
+
+ map_header Route8Gate, ROUTE_8_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/Route9.asm
+++ b/data/mapHeaders/Route9.asm
@@ -1,10 +1,5 @@
-Route9_h::
- db OVERWORLD ; tileset
- db ROUTE_9_HEIGHT, ROUTE_9_WIDTH ; dimensions (y, x)
- dw Route9_Blocks ; blocks
- dw Route9_TextPointers ; texts
- dw Route9_Script ; scripts
- db WEST | EAST ; connections
- WEST_MAP_CONNECTION ROUTE_9, CERULEAN_CITY, -3, 1, CeruleanCity_Blocks
- EAST_MAP_CONNECTION ROUTE_9, ROUTE_10, 0, 0, Route10_Blocks, 1
- dw Route9_Object ; objects
+
+ map_header Route9, ROUTE_9, OVERWORLD, WEST | EAST
+ connection west, CeruleanCity, CERULEAN_CITY, -4
+ connection east, Route10, ROUTE_10, 0
+ end_map_header
--- a/data/mapHeaders/SSAnne1F.asm
+++ b/data/mapHeaders/SSAnne1F.asm
@@ -1,8 +1,3 @@
-SSAnne1F_h::
- db SHIP ; tileset
- db SS_ANNE_1F_HEIGHT, SS_ANNE_1F_WIDTH ; dimensions (y, x)
- dw SSAnne1F_Blocks ; blocks
- dw SSAnne1F_TextPointers ; texts
- dw SSAnne1F_Script ; scripts
- db 0 ; connections
- dw SSAnne1F_Object ; objects
+
+ map_header SSAnne1F, SS_ANNE_1F, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnne1FRooms.asm
+++ b/data/mapHeaders/SSAnne1FRooms.asm
@@ -1,8 +1,3 @@
-SSAnne1FRooms_h::
- db SHIP ; tileset
- db SS_ANNE_1F_ROOMS_HEIGHT, SS_ANNE_1F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnne1FRooms_Blocks ; blocks
- dw SSAnne1FRooms_TextPointers ; texts
- dw SSAnne1FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnne1FRooms_Object ; objects
+
+ map_header SSAnne1FRooms, SS_ANNE_1F_ROOMS, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnne2F.asm
+++ b/data/mapHeaders/SSAnne2F.asm
@@ -1,8 +1,3 @@
-SSAnne2F_h::
- db SHIP ; tileset
- db SS_ANNE_2F_HEIGHT, SS_ANNE_2F_WIDTH ; dimensions (y, x)
- dw SSAnne2F_Blocks ; blocks
- dw SSAnne2F_TextPointers ; texts
- dw SSAnne2F_Script ; scripts
- db 0 ; connections
- dw SSAnne2F_Object ; objects
+
+ map_header SSAnne2F, SS_ANNE_2F, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnne2FRooms.asm
+++ b/data/mapHeaders/SSAnne2FRooms.asm
@@ -1,8 +1,3 @@
-SSAnne2FRooms_h::
- db SHIP ; tileset
- db SS_ANNE_2F_ROOMS_HEIGHT, SS_ANNE_2F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnne2FRooms_Blocks ; blocks
- dw SSAnne2FRooms_TextPointers ; texts
- dw SSAnne2FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnne2FRooms_Object ; objects
+
+ map_header SSAnne2FRooms, SS_ANNE_2F_ROOMS, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnne3F.asm
+++ b/data/mapHeaders/SSAnne3F.asm
@@ -1,8 +1,3 @@
-SSAnne3F_h::
- db SHIP ; tileset
- db SS_ANNE_3F_HEIGHT, SS_ANNE_3F_WIDTH ; dimensions (y, x)
- dw SSAnne3F_Blocks ; blocks
- dw SSAnne3F_TextPointers ; texts
- dw SSAnne3F_Script ; scripts
- db 0 ; connections
- dw SSAnne3F_Object ; objects
+
+ map_header SSAnne3F, SS_ANNE_3F, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnneB1F.asm
+++ b/data/mapHeaders/SSAnneB1F.asm
@@ -1,8 +1,3 @@
-SSAnneB1F_h::
- db SHIP ; tileset
- db SS_ANNE_B1F_HEIGHT, SS_ANNE_B1F_WIDTH ; dimensions (y, x)
- dw SSAnneB1F_Blocks ; blocks
- dw SSAnneB1F_TextPointers ; texts
- dw SSAnneB1F_Script ; scripts
- db 0 ; connections
- dw SSAnneB1F_Object ; objects
+
+ map_header SSAnneB1F, SS_ANNE_B1F, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnneB1FRooms.asm
+++ b/data/mapHeaders/SSAnneB1FRooms.asm
@@ -1,8 +1,3 @@
-SSAnneB1FRooms_h::
- db SHIP ; tileset
- db SS_ANNE_B1F_ROOMS_HEIGHT, SS_ANNE_B1F_ROOMS_WIDTH ; dimensions (y, x)
- dw SSAnneB1FRooms_Blocks ; blocks
- dw SSAnneB1FRooms_TextPointers ; texts
- dw SSAnneB1FRooms_Script ; scripts
- db 0 ; connections
- dw SSAnneB1FRooms_Object ; objects
+
+ map_header SSAnneB1FRooms, SS_ANNE_B1F_ROOMS, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnneBow.asm
+++ b/data/mapHeaders/SSAnneBow.asm
@@ -1,8 +1,3 @@
-SSAnneBow_h::
- db SHIP ; tileset
- db SS_ANNE_BOW_HEIGHT, SS_ANNE_BOW_WIDTH ; dimensions (y, x)
- dw SSAnneBow_Blocks ; blocks
- dw SSAnneBow_TextPointers ; texts
- dw SSAnneBow_Script ; scripts
- db 0 ; connections
- dw SSAnneBow_Object ; objects
+
+ map_header SSAnneBow, SS_ANNE_BOW, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnneCaptainsRoom.asm
+++ b/data/mapHeaders/SSAnneCaptainsRoom.asm
@@ -1,8 +1,3 @@
-SSAnneCaptainsRoom_h::
- db SHIP ; tileset
- db SS_ANNE_CAPTAINS_ROOM_HEIGHT, SS_ANNE_CAPTAINS_ROOM_WIDTH ; dimensions (y, x)
- dw SSAnneCaptainsRoom_Blocks ; blocks
- dw SSAnneCaptainsRoom_TextPointers ; texts
- dw SSAnneCaptainsRoom_Script ; scripts
- db 0 ; connections
- dw SSAnneCaptainsRoom_Object ; objects
+
+ map_header SSAnneCaptainsRoom, SS_ANNE_CAPTAINS_ROOM, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SSAnneKitchen.asm
+++ b/data/mapHeaders/SSAnneKitchen.asm
@@ -1,8 +1,3 @@
-SSAnneKitchen_h::
- db SHIP ; tileset
- db SS_ANNE_KITCHEN_HEIGHT, SS_ANNE_KITCHEN_WIDTH ; dimensions (y, x)
- dw SSAnneKitchen_Blocks ; blocks
- dw SSAnneKitchen_TextPointers ; texts
- dw SSAnneKitchen_Script ; scripts
- db 0 ; connections
- dw SSAnneKitchen_Object ; objects
+
+ map_header SSAnneKitchen, SS_ANNE_KITCHEN, SHIP, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneCenter.asm
+++ b/data/mapHeaders/SafariZoneCenter.asm
@@ -1,8 +1,3 @@
-SafariZoneCenter_h::
- db FOREST ; tileset
- db SAFARI_ZONE_CENTER_HEIGHT, SAFARI_ZONE_CENTER_WIDTH ; dimensions (y, x)
- dw SafariZoneCenter_Blocks ; blocks
- dw SafariZoneCenter_TextPointers ; texts
- dw SafariZoneCenter_Script ; scripts
- db 0 ; connections
- dw SafariZoneCenter_Object ; objects
+
+ map_header SafariZoneCenter, SAFARI_ZONE_CENTER, FOREST, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneCenterRestHouse.asm
+++ b/data/mapHeaders/SafariZoneCenterRestHouse.asm
@@ -1,8 +1,3 @@
-SafariZoneCenterRestHouse_h::
- db GATE ; tileset
- db SAFARI_ZONE_CENTER_REST_HOUSE_HEIGHT, SAFARI_ZONE_CENTER_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneCenterRestHouse_Blocks ; blocks
- dw SafariZoneCenterRestHouse_TextPointers ; texts
- dw SafariZoneCenterRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneCenterRestHouse_Object ; objects
+
+ map_header SafariZoneCenterRestHouse, SAFARI_ZONE_CENTER_REST_HOUSE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneEast.asm
+++ b/data/mapHeaders/SafariZoneEast.asm
@@ -1,8 +1,3 @@
-SafariZoneEast_h::
- db FOREST ; tileset
- db SAFARI_ZONE_EAST_HEIGHT, SAFARI_ZONE_EAST_WIDTH ; dimensions (y, x)
- dw SafariZoneEast_Blocks ; blocks
- dw SafariZoneEast_TextPointers ; texts
- dw SafariZoneEast_Script ; scripts
- db 0 ; connections
- dw SafariZoneEast_Object ; objects
+
+ map_header SafariZoneEast, SAFARI_ZONE_EAST, FOREST, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneEastRestHouse.asm
+++ b/data/mapHeaders/SafariZoneEastRestHouse.asm
@@ -1,8 +1,3 @@
-SafariZoneEastRestHouse_h::
- db GATE ; tileset
- db SAFARI_ZONE_EAST_REST_HOUSE_HEIGHT, SAFARI_ZONE_EAST_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneEastRestHouse_Blocks ; blocks
- dw SafariZoneEastRestHouse_TextPointers ; texts
- dw SafariZoneEastRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneEastRestHouse_Object ; objects
+
+ map_header SafariZoneEastRestHouse, SAFARI_ZONE_EAST_REST_HOUSE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneGate.asm
+++ b/data/mapHeaders/SafariZoneGate.asm
@@ -1,8 +1,3 @@
-SafariZoneGate_h::
- db GATE ; tileset
- db SAFARI_ZONE_GATE_HEIGHT, SAFARI_ZONE_GATE_WIDTH ; dimensions (y, x)
- dw SafariZoneGate_Blocks ; blocks
- dw SafariZoneGate_TextPointers ; texts
- dw SafariZoneGate_Script ; scripts
- db 0 ; connections
- dw SafariZoneGate_Object ; objects
+
+ map_header SafariZoneGate, SAFARI_ZONE_GATE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneNorth.asm
+++ b/data/mapHeaders/SafariZoneNorth.asm
@@ -1,8 +1,3 @@
-SafariZoneNorth_h::
- db FOREST ; tileset
- db SAFARI_ZONE_NORTH_HEIGHT, SAFARI_ZONE_NORTH_WIDTH ; dimensions (y, x)
- dw SafariZoneNorth_Blocks ; blocks
- dw SafariZoneNorth_TextPointers ; texts
- dw SafariZoneNorth_Script ; scripts
- db 0 ; connections
- dw SafariZoneNorth_Object ; objects
+
+ map_header SafariZoneNorth, SAFARI_ZONE_NORTH, FOREST, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneNorthRestHouse.asm
+++ b/data/mapHeaders/SafariZoneNorthRestHouse.asm
@@ -1,8 +1,3 @@
-SafariZoneNorthRestHouse_h::
- db GATE ; tileset
- db SAFARI_ZONE_NORTH_REST_HOUSE_HEIGHT, SAFARI_ZONE_NORTH_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneNorthRestHouse_Blocks ; blocks
- dw SafariZoneNorthRestHouse_TextPointers ; texts
- dw SafariZoneNorthRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneNorthRestHouse_Object ; objects
+
+ map_header SafariZoneNorthRestHouse, SAFARI_ZONE_NORTH_REST_HOUSE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneSecretHouse.asm
+++ b/data/mapHeaders/SafariZoneSecretHouse.asm
@@ -1,8 +1,3 @@
-SafariZoneSecretHouse_h::
- db LAB ; tileset
- db SAFARI_ZONE_SECRET_HOUSE_HEIGHT, SAFARI_ZONE_SECRET_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneSecretHouse_Blocks ; blocks
- dw SafariZoneSecretHouse_TextPointers ; texts
- dw SafariZoneSecretHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneSecretHouse_Object ; objects
+
+ map_header SafariZoneSecretHouse, SAFARI_ZONE_SECRET_HOUSE, LAB, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneWest.asm
+++ b/data/mapHeaders/SafariZoneWest.asm
@@ -1,8 +1,3 @@
-SafariZoneWest_h::
- db FOREST ; tileset
- db SAFARI_ZONE_WEST_HEIGHT, SAFARI_ZONE_WEST_WIDTH ; dimensions (y, x)
- dw SafariZoneWest_Blocks ; blocks
- dw SafariZoneWest_TextPointers ; texts
- dw SafariZoneWest_Script ; scripts
- db 0 ; connections
- dw SafariZoneWest_Object ; objects
+
+ map_header SafariZoneWest, SAFARI_ZONE_WEST, FOREST, 0
+ end_map_header
--- a/data/mapHeaders/SafariZoneWestRestHouse.asm
+++ b/data/mapHeaders/SafariZoneWestRestHouse.asm
@@ -1,8 +1,3 @@
-SafariZoneWestRestHouse_h::
- db GATE ; tileset
- db SAFARI_ZONE_WEST_REST_HOUSE_HEIGHT, SAFARI_ZONE_WEST_REST_HOUSE_WIDTH ; dimensions (y, x)
- dw SafariZoneWestRestHouse_Blocks ; blocks
- dw SafariZoneWestRestHouse_TextPointers ; texts
- dw SafariZoneWestRestHouse_Script ; scripts
- db 0 ; connections
- dw SafariZoneWestRestHouse_Object ; objects
+
+ map_header SafariZoneWestRestHouse, SAFARI_ZONE_WEST_REST_HOUSE, GATE, 0
+ end_map_header
--- a/data/mapHeaders/SaffronCity.asm
+++ b/data/mapHeaders/SaffronCity.asm
@@ -1,12 +1,7 @@
-SaffronCity_h::
- db OVERWORLD ; tileset
- db SAFFRON_CITY_HEIGHT, SAFFRON_CITY_WIDTH ; dimensions (y, x)
- dw SaffronCity_Blocks ; blocks
- dw SaffronCity_TextPointers ; texts
- dw SaffronCity_Script ; scripts
- db NORTH | SOUTH | WEST | EAST ; connections
- NORTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_5, 5, 0, Route5_Blocks
- SOUTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_6, 5, 0, Route6_Blocks, 1
- WEST_MAP_CONNECTION SAFFRON_CITY, ROUTE_7, 4, 0, Route7_Blocks
- EAST_MAP_CONNECTION SAFFRON_CITY, ROUTE_8, 4, 0, Route8_Blocks
- dw SaffronCity_Object ; objects
+
+ map_header SaffronCity, SAFFRON_CITY, OVERWORLD, NORTH | SOUTH | WEST | EAST
+ connection north, Route5, ROUTE_5, 5
+ connection south, Route6, ROUTE_6, 5
+ connection west, Route7, ROUTE_7, 4
+ connection east, Route8, ROUTE_8, 4
+ end_map_header
--- a/data/mapHeaders/SaffronGym.asm
+++ b/data/mapHeaders/SaffronGym.asm
@@ -1,8 +1,3 @@
-SaffronGym_h::
- db FACILITY ; tileset
- db SAFFRON_GYM_HEIGHT, SAFFRON_GYM_WIDTH ; dimensions (y, x)
- dw SaffronGym_Blocks ; blocks
- dw SaffronGym_TextPointers ; texts
- dw SaffronGym_Script ; scripts
- db 0 ; connections
- dw SaffronGym_Object ; objects
+
+ map_header SaffronGym, SAFFRON_GYM, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SaffronMart.asm
+++ b/data/mapHeaders/SaffronMart.asm
@@ -1,8 +1,3 @@
-SaffronMart_h::
- db MART ; tileset
- db SAFFRON_MART_HEIGHT, SAFFRON_MART_WIDTH ; dimensions (y, x)
- dw SaffronMart_Blocks ; blocks
- dw SaffronMart_TextPointers ; texts
- dw SaffronMart_Script ; scripts
- db 0 ; connections
- dw SaffronMart_Object ; objects
+
+ map_header SaffronMart, SAFFRON_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/SaffronPidgeyHouse.asm
+++ b/data/mapHeaders/SaffronPidgeyHouse.asm
@@ -1,8 +1,3 @@
-SaffronPidgeyHouse_h::
- db HOUSE ; tileset
- db SAFFRON_PIDGEY_HOUSE_HEIGHT, SAFFRON_PIDGEY_HOUSE_WIDTH ; dimensions (y, x)
- dw SaffronPidgeyHouse_Blocks ; blocks
- dw SaffronPidgeyHouse_TextPointers ; texts
- dw SaffronPidgeyHouse_Script ; scripts
- db 0 ; connections
- dw SaffronPidgeyHouse_Object ; objects
+
+ map_header SaffronPidgeyHouse, SAFFRON_PIDGEY_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/SaffronPokecenter.asm
+++ b/data/mapHeaders/SaffronPokecenter.asm
@@ -1,8 +1,3 @@
-SaffronPokecenter_h::
- db POKECENTER ; tileset
- db SAFFRON_POKECENTER_HEIGHT, SAFFRON_POKECENTER_WIDTH ; dimensions (y, x)
- dw SaffronPokecenter_Blocks ; blocks
- dw SaffronPokecenter_TextPointers ; texts
- dw SaffronPokecenter_Script ; scripts
- db 0 ; connections
- dw SaffronPokecenter_Object ; objects
+
+ map_header SaffronPokecenter, SAFFRON_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/SeafoamIslands1F.asm
+++ b/data/mapHeaders/SeafoamIslands1F.asm
@@ -1,8 +1,3 @@
-SeafoamIslands1F_h::
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_1F_HEIGHT, SEAFOAM_ISLANDS_1F_WIDTH ; dimensions (y, x)
- dw SeafoamIslands1F_Blocks ; blocks
- dw SeafoamIslands1F_TextPointers ; texts
- dw SeafoamIslands1F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslands1F_Object ; objects
+
+ map_header SeafoamIslands1F, SEAFOAM_ISLANDS_1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/SeafoamIslandsB1F.asm
+++ b/data/mapHeaders/SeafoamIslandsB1F.asm
@@ -1,8 +1,3 @@
-SeafoamIslandsB1F_h::
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B1F_HEIGHT, SEAFOAM_ISLANDS_B1F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB1F_Blocks ; blocks
- dw SeafoamIslandsB1F_TextPointers ; texts
- dw SeafoamIslandsB1F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB1F_Object ; objects
+
+ map_header SeafoamIslandsB1F, SEAFOAM_ISLANDS_B1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/SeafoamIslandsB2F.asm
+++ b/data/mapHeaders/SeafoamIslandsB2F.asm
@@ -1,8 +1,3 @@
-SeafoamIslandsB2F_h::
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B2F_HEIGHT, SEAFOAM_ISLANDS_B2F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB2F_Blocks ; blocks
- dw SeafoamIslandsB2F_TextPointers ; texts
- dw SeafoamIslandsB2F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB2F_Object ; objects
+
+ map_header SeafoamIslandsB2F, SEAFOAM_ISLANDS_B2F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/SeafoamIslandsB3F.asm
+++ b/data/mapHeaders/SeafoamIslandsB3F.asm
@@ -1,8 +1,3 @@
-SeafoamIslandsB3F_h::
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B3F_HEIGHT, SEAFOAM_ISLANDS_B3F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB3F_Blocks ; blocks
- dw SeafoamIslandsB3F_TextPointers ; texts
- dw SeafoamIslandsB3F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB3F_Object ; objects
+
+ map_header SeafoamIslandsB3F, SEAFOAM_ISLANDS_B3F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/SeafoamIslandsB4F.asm
+++ b/data/mapHeaders/SeafoamIslandsB4F.asm
@@ -1,8 +1,3 @@
-SeafoamIslandsB4F_h::
- db CAVERN ; tileset
- db SEAFOAM_ISLANDS_B4F_HEIGHT, SEAFOAM_ISLANDS_B4F_WIDTH ; dimensions (y, x)
- dw SeafoamIslandsB4F_Blocks ; blocks
- dw SeafoamIslandsB4F_TextPointers ; texts
- dw SeafoamIslandsB4F_Script ; scripts
- db 0 ; connections
- dw SeafoamIslandsB4F_Object ; objects
+
+ map_header SeafoamIslandsB4F, SEAFOAM_ISLANDS_B4F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo10F.asm
+++ b/data/mapHeaders/SilphCo10F.asm
@@ -1,8 +1,3 @@
-SilphCo10F_h::
- db FACILITY ; tileset
- db SILPH_CO_10F_HEIGHT, SILPH_CO_10F_WIDTH ; dimensions (y, x)
- dw SilphCo10F_Blocks ; blocks
- dw SilphCo10F_TextPointers ; texts
- dw SilphCo10F_Script ; scripts
- db 0 ; connections
- dw SilphCo10F_Object ; objects
+
+ map_header SilphCo10F, SILPH_CO_10F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo11F.asm
+++ b/data/mapHeaders/SilphCo11F.asm
@@ -1,8 +1,3 @@
-SilphCo11F_h::
- db INTERIOR ; tileset
- db SILPH_CO_11F_HEIGHT, SILPH_CO_11F_WIDTH ; dimensions (y, x)
- dw SilphCo11F_Blocks ; blocks
- dw SilphCo11F_TextPointers ; texts
- dw SilphCo11F_Script ; scripts
- db 0 ; connections
- dw SilphCo11F_Object ; objects
+
+ map_header SilphCo11F, SILPH_CO_11F, INTERIOR, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo1F.asm
+++ b/data/mapHeaders/SilphCo1F.asm
@@ -1,8 +1,3 @@
-SilphCo1F_h::
- db FACILITY ; tileset
- db SILPH_CO_1F_HEIGHT, SILPH_CO_1F_WIDTH ; dimensions (y, x)
- dw SilphCo1F_Blocks ; blocks
- dw SilphCo1F_TextPointers ; texts
- dw SilphCo1F_Script ; scripts
- db 0 ; connections
- dw SilphCo1F_Object ; objects
+
+ map_header SilphCo1F, SILPH_CO_1F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo2F.asm
+++ b/data/mapHeaders/SilphCo2F.asm
@@ -1,8 +1,3 @@
-SilphCo2F_h::
- db FACILITY ; tileset
- db SILPH_CO_2F_HEIGHT, SILPH_CO_2F_WIDTH ; dimensions (y, x)
- dw SilphCo2F_Blocks ; blocks
- dw SilphCo2F_TextPointers ; texts
- dw SilphCo2F_Script ; scripts
- db 0 ; connections
- dw SilphCo2F_Object ; objects
+
+ map_header SilphCo2F, SILPH_CO_2F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo3F.asm
+++ b/data/mapHeaders/SilphCo3F.asm
@@ -1,8 +1,3 @@
-SilphCo3F_h::
- db FACILITY ; tileset
- db SILPH_CO_3F_HEIGHT, SILPH_CO_3F_WIDTH ; dimensions (y, x)
- dw SilphCo3F_Blocks ; blocks
- dw SilphCo3F_TextPointers ; texts
- dw SilphCo3F_Script ; scripts
- db 0 ; connections
- dw SilphCo3F_Object ; objects
+
+ map_header SilphCo3F, SILPH_CO_3F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo4F.asm
+++ b/data/mapHeaders/SilphCo4F.asm
@@ -1,8 +1,3 @@
-SilphCo4F_h::
- db FACILITY ; tileset
- db SILPH_CO_4F_HEIGHT, SILPH_CO_4F_WIDTH ; dimensions (y, x)
- dw SilphCo4F_Blocks ; blocks
- dw SilphCo4F_TextPointers ; texts
- dw SilphCo4F_Script ; scripts
- db 0 ; connections
- dw SilphCo4F_Object ; objects
+
+ map_header SilphCo4F, SILPH_CO_4F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo5F.asm
+++ b/data/mapHeaders/SilphCo5F.asm
@@ -1,8 +1,3 @@
-SilphCo5F_h::
- db FACILITY ; tileset
- db SILPH_CO_5F_HEIGHT, SILPH_CO_5F_WIDTH ; dimensions (y, x)
- dw SilphCo5F_Blocks ; blocks
- dw SilphCo5F_TextPointers ; texts
- dw SilphCo5F_Script ; scripts
- db 0 ; connections
- dw SilphCo5F_Object ; objects
+
+ map_header SilphCo5F, SILPH_CO_5F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo6F.asm
+++ b/data/mapHeaders/SilphCo6F.asm
@@ -1,8 +1,3 @@
-SilphCo6F_h::
- db FACILITY ; tileset
- db SILPH_CO_6F_HEIGHT, SILPH_CO_6F_WIDTH ; dimensions (y, x)
- dw SilphCo6F_Blocks ; blocks
- dw SilphCo6F_TextPointers ; texts
- dw SilphCo6F_Script ; scripts
- db 0 ; connections
- dw SilphCo6F_Object ; objects
+
+ map_header SilphCo6F, SILPH_CO_6F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo7F.asm
+++ b/data/mapHeaders/SilphCo7F.asm
@@ -1,8 +1,3 @@
-SilphCo7F_h::
- db FACILITY ; tileset
- db SILPH_CO_7F_HEIGHT, SILPH_CO_7F_WIDTH ; dimensions (y, x)
- dw SilphCo7F_Blocks ; blocks
- dw SilphCo7F_TextPointers ; texts
- dw SilphCo7F_Script ; scripts
- db 0 ; connections
- dw SilphCo7F_Object ; objects
+
+ map_header SilphCo7F, SILPH_CO_7F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo8F.asm
+++ b/data/mapHeaders/SilphCo8F.asm
@@ -1,8 +1,3 @@
-SilphCo8F_h::
- db FACILITY ; tileset
- db SILPH_CO_8F_HEIGHT, SILPH_CO_8F_WIDTH ; dimensions (y, x)
- dw SilphCo8F_Blocks ; blocks
- dw SilphCo8F_TextPointers ; texts
- dw SilphCo8F_Script ; scripts
- db 0 ; connections
- dw SilphCo8F_Object ; objects
+
+ map_header SilphCo8F, SILPH_CO_8F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCo9F.asm
+++ b/data/mapHeaders/SilphCo9F.asm
@@ -1,8 +1,3 @@
-SilphCo9F_h::
- db FACILITY ; tileset
- db SILPH_CO_9F_HEIGHT, SILPH_CO_9F_WIDTH ; dimensions (y, x)
- dw SilphCo9F_Blocks ; blocks
- dw SilphCo9F_TextPointers ; texts
- dw SilphCo9F_Script ; scripts
- db 0 ; connections
- dw SilphCo9F_Object ; objects
+
+ map_header SilphCo9F, SILPH_CO_9F, FACILITY, 0
+ end_map_header
--- a/data/mapHeaders/SilphCoElevator.asm
+++ b/data/mapHeaders/SilphCoElevator.asm
@@ -1,8 +1,3 @@
-SilphCoElevator_h::
- db LOBBY ; tileset
- db SILPH_CO_ELEVATOR_HEIGHT, SILPH_CO_ELEVATOR_WIDTH ; dimensions (y, x)
- dw SilphCoElevator_Blocks ; blocks
- dw SilphCoElevator_TextPointers ; texts
- dw SilphCoElevator_Script ; scripts
- db 0 ; connections
- dw SilphCoElevator_Object ; objects
+
+ map_header SilphCoElevator, SILPH_CO_ELEVATOR, LOBBY, 0
+ end_map_header
--- a/data/mapHeaders/TradeCenter.asm
+++ b/data/mapHeaders/TradeCenter.asm
@@ -1,8 +1,3 @@
-TradeCenter_h::
- db CLUB ; tileset
- db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x)
- dw TradeCenter_Blocks ; blocks
- dw TradeCenter_TextPointers ; texts
- dw TradeCenter_Script ; scripts
- db 0 ; connections
- dw TradeCenter_Object ; objects
+
+ map_header TradeCenter, TRADE_CENTER, CLUB, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathNorthSouth.asm
+++ b/data/mapHeaders/UndergroundPathNorthSouth.asm
@@ -1,8 +1,3 @@
-UndergroundPathNorthSouth_h::
- db UNDERGROUND ; tileset
- db UNDERGROUND_PATH_NORTH_SOUTH_HEIGHT, UNDERGROUND_PATH_NORTH_SOUTH_WIDTH ; dimensions (y, x)
- dw UndergroundPathNorthSouth_Blocks ; blocks
- dw UndergroundPathNorthSouth_TextPointers ; texts
- dw UndergroundPathNorthSouth_Script ; scripts
- db 0 ; connections
- dw UndergroundPathNorthSouth_Object ; objects
+
+ map_header UndergroundPathNorthSouth, UNDERGROUND_PATH_NORTH_SOUTH, UNDERGROUND, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathRoute5.asm
+++ b/data/mapHeaders/UndergroundPathRoute5.asm
@@ -1,8 +1,3 @@
-UndergroundPathRoute5_h::
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_5_HEIGHT, UNDERGROUND_PATH_ROUTE_5_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute5_Blocks ; blocks
- dw UndergroundPathRoute5_TextPointers ; texts
- dw UndergroundPathRoute5_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute5_Object ; objects
+
+ map_header UndergroundPathRoute5, UNDERGROUND_PATH_ROUTE_5, GATE, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathRoute6.asm
+++ b/data/mapHeaders/UndergroundPathRoute6.asm
@@ -1,8 +1,3 @@
-UndergroundPathRoute6_h::
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_6_HEIGHT, UNDERGROUND_PATH_ROUTE_6_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute6_Blocks ; blocks
- dw UndergroundPathRoute6_TextPointers ; texts
- dw UndergroundPathRoute6_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute6_Object ; objects
+
+ map_header UndergroundPathRoute6, UNDERGROUND_PATH_ROUTE_6, GATE, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathRoute7.asm
+++ b/data/mapHeaders/UndergroundPathRoute7.asm
@@ -1,8 +1,3 @@
-UndergroundPathRoute7_h::
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_7_HEIGHT, UNDERGROUND_PATH_ROUTE_7_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute7_Blocks ; blocks
- dw UndergroundPathRoute7_TextPointers ; texts
- dw UndergroundPathRoute7_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute7_Object ; objects
+
+ map_header UndergroundPathRoute7, UNDERGROUND_PATH_ROUTE_7, GATE, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathRoute7Copy.asm
+++ b/data/mapHeaders/UndergroundPathRoute7Copy.asm
@@ -1,8 +1,3 @@
-UndergroundPathRoute7Copy_h::
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_7_HEIGHT, UNDERGROUND_PATH_ROUTE_7_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute7Copy_Blocks ; blocks
- dw UndergroundPathRoute7Copy_TextPointers ; texts
- dw UndergroundPathRoute7Copy_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute7Copy_Object ; objects
+
+ map_header UndergroundPathRoute7Copy, UNDERGROUND_PATH_ROUTE_7, GATE, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathRoute8.asm
+++ b/data/mapHeaders/UndergroundPathRoute8.asm
@@ -1,8 +1,3 @@
-UndergroundPathRoute8_h::
- db GATE ; tileset
- db UNDERGROUND_PATH_ROUTE_8_HEIGHT, UNDERGROUND_PATH_ROUTE_8_WIDTH ; dimensions (y, x)
- dw UndergroundPathRoute8_Blocks ; blocks
- dw UndergroundPathRoute8_TextPointers ; texts
- dw UndergroundPathRoute8_Script ; scripts
- db 0 ; connections
- dw UndergroundPathRoute8_Object ; objects
+
+ map_header UndergroundPathRoute8, UNDERGROUND_PATH_ROUTE_8, GATE, 0
+ end_map_header
--- a/data/mapHeaders/UndergroundPathWestEast.asm
+++ b/data/mapHeaders/UndergroundPathWestEast.asm
@@ -1,8 +1,3 @@
-UndergroundPathWestEast_h::
- db UNDERGROUND ; tileset
- db UNDERGROUND_PATH_WEST_EAST_HEIGHT, UNDERGROUND_PATH_WEST_EAST_WIDTH ; dimensions (y, x)
- dw UndergroundPathWestEast_Blocks ; blocks
- dw UndergroundPathWestEast_TextPointers ; texts
- dw UndergroundPathWestEast_Script ; scripts
- db 0 ; connections
- dw UndergroundPathWestEast_Object ; objects
+
+ map_header UndergroundPathWestEast, UNDERGROUND_PATH_WEST_EAST, UNDERGROUND, 0
+ end_map_header
--- a/data/mapHeaders/VermilionCity.asm
+++ b/data/mapHeaders/VermilionCity.asm
@@ -1,10 +1,5 @@
-VermilionCity_h::
- db OVERWORLD ; tileset
- db VERMILION_CITY_HEIGHT, VERMILION_CITY_WIDTH ; dimensions (y, x)
- dw VermilionCity_Blocks ; blocks
- dw VermilionCity_TextPointers ; texts
- dw VermilionCity_Script ; scripts
- db NORTH | EAST ; connections
- NORTH_MAP_CONNECTION VERMILION_CITY, ROUTE_6, 5, 0, Route6_Blocks
- EAST_MAP_CONNECTION VERMILION_CITY, ROUTE_11, 4, 0, Route11_Blocks
- dw VermilionCity_Object ; objects
+
+ map_header VermilionCity, VERMILION_CITY, OVERWORLD, NORTH | EAST
+ connection north, Route6, ROUTE_6, 5
+ connection east, Route11, ROUTE_11, 4
+ end_map_header
--- a/data/mapHeaders/VermilionDock.asm
+++ b/data/mapHeaders/VermilionDock.asm
@@ -1,8 +1,3 @@
-VermilionDock_h::
- db SHIP_PORT ; tileset
- db VERMILION_DOCK_HEIGHT, VERMILION_DOCK_WIDTH ; dimensions (y, x)
- dw VermilionDock_Blocks ; blocks
- dw VermilionDock_TextPointers ; texts
- dw VermilionDock_Script ; scripts
- db 0 ; connections
- dw VermilionDock_Object ; objects
+
+ map_header VermilionDock, VERMILION_DOCK, SHIP_PORT, 0
+ end_map_header
--- a/data/mapHeaders/VermilionGym.asm
+++ b/data/mapHeaders/VermilionGym.asm
@@ -1,8 +1,3 @@
-VermilionGym_h::
- db GYM ; tileset
- db VERMILION_GYM_HEIGHT, VERMILION_GYM_WIDTH ; dimensions (y, x)
- dw VermilionGym_Blocks ; blocks
- dw VermilionGym_TextPointers ; texts
- dw VermilionGym_Script ; scripts
- db 0 ; connections
- dw VermilionGym_Object ; objects
+
+ map_header VermilionGym, VERMILION_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/VermilionMart.asm
+++ b/data/mapHeaders/VermilionMart.asm
@@ -1,8 +1,3 @@
-VermilionMart_h::
- db MART ; tileset
- db VERMILION_MART_HEIGHT, VERMILION_MART_WIDTH ; dimensions (y, x)
- dw VermilionMart_Blocks ; blocks
- dw VermilionMart_TextPointers ; texts
- dw VermilionMart_Script ; scripts
- db 0 ; connections
- dw VermilionMart_Object ; objects
+
+ map_header VermilionMart, VERMILION_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/VermilionOldRodHouse.asm
+++ b/data/mapHeaders/VermilionOldRodHouse.asm
@@ -1,8 +1,3 @@
-VermilionOldRodHouse_h::
- db HOUSE ; tileset
- db VERMILION_OLD_ROD_HOUSE_HEIGHT, VERMILION_OLD_ROD_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionOldRodHouse_Blocks ; blocks
- dw VermilionOldRodHouse_TextPointers ; texts
- dw VermilionOldRodHouse_Script ; scripts
- db 0 ; connections
- dw VermilionOldRodHouse_Object ; objects
+
+ map_header VermilionOldRodHouse, VERMILION_OLD_ROD_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/VermilionPidgeyHouse.asm
+++ b/data/mapHeaders/VermilionPidgeyHouse.asm
@@ -1,8 +1,3 @@
-VermilionPidgeyHouse_h::
- db HOUSE ; tileset
- db VERMILION_PIDGEY_HOUSE_HEIGHT, VERMILION_PIDGEY_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionPidgeyHouse_Blocks ; blocks
- dw VermilionPidgeyHouse_TextPointers ; texts
- dw VermilionPidgeyHouse_Script ; scripts
- db 0 ; connections
- dw VermilionPidgeyHouse_Object ; objects
+
+ map_header VermilionPidgeyHouse, VERMILION_PIDGEY_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/VermilionPokecenter.asm
+++ b/data/mapHeaders/VermilionPokecenter.asm
@@ -1,8 +1,3 @@
-VermilionPokecenter_h::
- db POKECENTER ; tileset
- db VERMILION_POKECENTER_HEIGHT, VERMILION_POKECENTER_WIDTH ; dimensions (y, x)
- dw VermilionPokecenter_Blocks ; blocks
- dw VermilionPokecenter_TextPointers ; texts
- dw VermilionPokecenter_Script ; scripts
- db 0 ; connections
- dw VermilionPokecenter_Object ; objects
+
+ map_header VermilionPokecenter, VERMILION_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/VermilionTradeHouse.asm
+++ b/data/mapHeaders/VermilionTradeHouse.asm
@@ -1,8 +1,3 @@
-VermilionTradeHouse_h::
- db HOUSE ; tileset
- db VERMILION_TRADE_HOUSE_HEIGHT, VERMILION_TRADE_HOUSE_WIDTH ; dimensions (y, x)
- dw VermilionTradeHouse_Blocks ; blocks
- dw VermilionTradeHouse_TextPointers ; texts
- dw VermilionTradeHouse_Script ; scripts
- db 0 ; connections
- dw VermilionTradeHouse_Object ; objects
+
+ map_header VermilionTradeHouse, VERMILION_TRADE_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/VictoryRoad1F.asm
+++ b/data/mapHeaders/VictoryRoad1F.asm
@@ -1,8 +1,3 @@
-VictoryRoad1F_h::
- db CAVERN ; tileset
- db VICTORY_ROAD_1F_HEIGHT, VICTORY_ROAD_1F_WIDTH ; dimensions (y, x)
- dw VictoryRoad1F_Blocks ; blocks
- dw VictoryRoad1F_TextPointers ; texts
- dw VictoryRoad1F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad1F_Object ; objects
+
+ map_header VictoryRoad1F, VICTORY_ROAD_1F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/VictoryRoad2F.asm
+++ b/data/mapHeaders/VictoryRoad2F.asm
@@ -1,8 +1,3 @@
-VictoryRoad2F_h::
- db CAVERN ; tileset
- db VICTORY_ROAD_2F_HEIGHT, VICTORY_ROAD_2F_WIDTH ; dimensions (y, x)
- dw VictoryRoad2F_Blocks ; blocks
- dw VictoryRoad2F_TextPointers ; texts
- dw VictoryRoad2F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad2F_Object ; objects
+
+ map_header VictoryRoad2F, VICTORY_ROAD_2F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/VictoryRoad3F.asm
+++ b/data/mapHeaders/VictoryRoad3F.asm
@@ -1,8 +1,3 @@
-VictoryRoad3F_h::
- db CAVERN ; tileset
- db VICTORY_ROAD_3F_HEIGHT, VICTORY_ROAD_3F_WIDTH ; dimensions (y, x)
- dw VictoryRoad3F_Blocks ; blocks
- dw VictoryRoad3F_TextPointers ; texts
- dw VictoryRoad3F_Script ; scripts
- db 0 ; connections
- dw VictoryRoad3F_Object ; objects
+
+ map_header VictoryRoad3F, VICTORY_ROAD_3F, CAVERN, 0
+ end_map_header
--- a/data/mapHeaders/ViridianCity.asm
+++ b/data/mapHeaders/ViridianCity.asm
@@ -1,11 +1,6 @@
-ViridianCity_h::
- db OVERWORLD ; tileset
- db VIRIDIAN_CITY_HEIGHT, VIRIDIAN_CITY_WIDTH ; dimensions (y, x)
- dw ViridianCity_Blocks ; blocks
- dw ViridianCity_TextPointers ; texts
- dw ViridianCity_Script ; scripts
- db NORTH | SOUTH | WEST ; connections
- NORTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_2, 5, 0, Route2_Blocks
- SOUTH_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_1, 5, 0, Route1_Blocks, 1
- WEST_MAP_CONNECTION VIRIDIAN_CITY, ROUTE_22, 4, 0, Route22_Blocks
- dw ViridianCity_Object ; objects
+
+ map_header ViridianCity, VIRIDIAN_CITY, OVERWORLD, NORTH | SOUTH | WEST
+ connection north, Route2, ROUTE_2, 5
+ connection south, Route1, ROUTE_1, 5
+ connection west, Route22, ROUTE_22, 4
+ end_map_header
--- a/data/mapHeaders/ViridianForest.asm
+++ b/data/mapHeaders/ViridianForest.asm
@@ -1,8 +1,3 @@
-ViridianForest_h::
- db FOREST ; tileset
- db VIRIDIAN_FOREST_HEIGHT, VIRIDIAN_FOREST_WIDTH ; dimensions (y, x)
- dw ViridianForest_Blocks ; blocks
- dw ViridianForest_TextPointers ; texts
- dw ViridianForest_Script ; scripts
- db 0 ; connections
- dw ViridianForest_Object ; objects
+
+ map_header ViridianForest, VIRIDIAN_FOREST, FOREST, 0
+ end_map_header
--- a/data/mapHeaders/ViridianForestNorthGate.asm
+++ b/data/mapHeaders/ViridianForestNorthGate.asm
@@ -1,8 +1,3 @@
-ViridianForestNorthGate_h::
- db FOREST_GATE ; tileset
- db VIRIDIAN_FOREST_NORTH_GATE_HEIGHT, VIRIDIAN_FOREST_NORTH_GATE_WIDTH ; dimensions (y, x)
- dw ViridianForestNorthGate_Blocks ; blocks
- dw ViridianForestNorthGate_TextPointers ; texts
- dw ViridianForestNorthGate_Script ; scripts
- db 0 ; connections
- dw ViridianForestNorthGate_Object ; objects
+
+ map_header ViridianForestNorthGate, VIRIDIAN_FOREST_NORTH_GATE, FOREST_GATE, 0
+ end_map_header
--- a/data/mapHeaders/ViridianForestSouthGate.asm
+++ b/data/mapHeaders/ViridianForestSouthGate.asm
@@ -1,8 +1,3 @@
-ViridianForestSouthGate_h::
- db FOREST_GATE ; tileset
- db VIRIDIAN_FOREST_SOUTH_GATE_HEIGHT, VIRIDIAN_FOREST_SOUTH_GATE_WIDTH ; dimensions (y, x)
- dw ViridianForestSouthGate_Blocks ; blocks
- dw ViridianForestSouthGate_TextPointers ; texts
- dw ViridianForestSouthGate_Script ; scripts
- db 0 ; connections
- dw ViridianForestSouthGate_Object ; objects
+
+ map_header ViridianForestSouthGate, VIRIDIAN_FOREST_SOUTH_GATE, FOREST_GATE, 0
+ end_map_header
--- a/data/mapHeaders/ViridianGym.asm
+++ b/data/mapHeaders/ViridianGym.asm
@@ -1,8 +1,3 @@
-ViridianGym_h::
- db GYM ; tileset
- db VIRIDIAN_GYM_HEIGHT, VIRIDIAN_GYM_WIDTH ; dimensions (y, x)
- dw ViridianGym_Blocks ; blocks
- dw ViridianGym_TextPointers ; texts
- dw ViridianGym_Script ; scripts
- db 0 ; connections
- dw ViridianGym_Object ; objects
+
+ map_header ViridianGym, VIRIDIAN_GYM, GYM, 0
+ end_map_header
--- a/data/mapHeaders/ViridianMart.asm
+++ b/data/mapHeaders/ViridianMart.asm
@@ -1,8 +1,3 @@
-ViridianMart_h::
- db MART ; tileset
- db VIRIDIAN_MART_HEIGHT, VIRIDIAN_MART_WIDTH ; dimensions (y, x)
- dw ViridianMart_Blocks ; blocks
- dw ViridianMart_TextPointers ; texts
- dw ViridianMart_Script ; scripts
- db 0 ; connections
- dw ViridianMart_Object ; objects
+
+ map_header ViridianMart, VIRIDIAN_MART, MART, 0
+ end_map_header
--- a/data/mapHeaders/ViridianNicknameHouse.asm
+++ b/data/mapHeaders/ViridianNicknameHouse.asm
@@ -1,8 +1,3 @@
-ViridianNicknameHouse_h::
- db HOUSE ; tileset
- db VIRIDIAN_NICKNAME_HOUSE_HEIGHT, VIRIDIAN_NICKNAME_HOUSE_WIDTH ; dimensions (y, x)
- dw ViridianNicknameHouse_Blocks ; blocks
- dw ViridianNicknameHouse_TextPointers ; texts
- dw ViridianNicknameHouse_Script ; scripts
- db 0 ; connections
- dw ViridianNicknameHouse_Object ; objects
+
+ map_header ViridianNicknameHouse, VIRIDIAN_NICKNAME_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/ViridianPokecenter.asm
+++ b/data/mapHeaders/ViridianPokecenter.asm
@@ -1,8 +1,3 @@
-ViridianPokecenter_h::
- db POKECENTER ; tileset
- db VIRIDIAN_POKECENTER_HEIGHT, VIRIDIAN_POKECENTER_WIDTH ; dimensions (y, x)
- dw ViridianPokecenter_Blocks ; blocks
- dw ViridianPokecenter_TextPointers ; texts
- dw ViridianPokecenter_Script ; scripts
- db 0 ; connections
- dw ViridianPokecenter_Object ; objects
+
+ map_header ViridianPokecenter, VIRIDIAN_POKECENTER, POKECENTER, 0
+ end_map_header
--- a/data/mapHeaders/ViridianSchoolHouse.asm
+++ b/data/mapHeaders/ViridianSchoolHouse.asm
@@ -1,8 +1,3 @@
-ViridianSchoolHouse_h::
- db HOUSE ; tileset
- db VIRIDIAN_SCHOOL_HOUSE_HEIGHT, VIRIDIAN_SCHOOL_HOUSE_WIDTH ; dimensions (y, x)
- dw ViridianSchoolHouse_Blocks ; blocks
- dw ViridianSchoolHouse_TextPointers ; texts
- dw ViridianSchoolHouse_Script ; scripts
- db 0 ; connections
- dw ViridianSchoolHouse_Object ; objects
+
+ map_header ViridianSchoolHouse, VIRIDIAN_SCHOOL_HOUSE, HOUSE, 0
+ end_map_header
--- a/data/mapHeaders/WardensHouse.asm
+++ b/data/mapHeaders/WardensHouse.asm
@@ -1,8 +1,3 @@
-WardensHouse_h::
- db LAB ; tileset
- db WARDENS_HOUSE_HEIGHT, WARDENS_HOUSE_WIDTH ; dimensions (y, x)
- dw WardensHouse_Blocks ; blocks
- dw WardensHouse_TextPointers ; texts
- dw WardensHouse_Script ; scripts
- db 0 ; connections
- dw WardensHouse_Object ; objects
+
+ map_header WardensHouse, WARDENS_HOUSE, LAB, 0
+ end_map_header
--- a/macros/data_macros.asm
+++ b/macros/data_macros.asm
@@ -144,94 +144,101 @@
EVENT_DISP \3, \2, \1
ENDM
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = x movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-NORTH_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * (\2_HEIGHT - 3)) + \4; "Connection Strip" location
- dw wOverworldMap + 3 + \3 ; current map position
- IF (\1_WIDTH < \2_WIDTH)
- db \1_WIDTH - \3 + 3 ; width of connection strip
- ELSE
- db \2_WIDTH - \4 ; width of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\2_HEIGHT * 2) - 1 ; y alignment (y coordinate of player when entering map)
- db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map)
- dw wOverworldMap + 1 + (\2_HEIGHT * (\2_WIDTH + 6)) ; window (position of the upper left block after entering the map)
+map_header: MACRO
+;\1: map name
+;\2: map id
+;\3: tileset
+;\4: connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none
+CURRENT_MAP_WIDTH = \2_WIDTH
+CURRENT_MAP_HEIGHT = \2_HEIGHT
+CURRENT_MAP_OBJECT EQUS "\1_Object"
+\1_h::
+ db \3
+ db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH
+ dw \1_Blocks
+ dw \1_TextPointers
+ dw \1_Script
+ db \4
ENDM
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = x movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-;\6 (flag) = add 3 to width of connection strip (why?)
-SOUTH_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + \4 ; "Connection Strip" location
- dw wOverworldMap + 3 + (\1_HEIGHT + 3) * (\1_WIDTH + 6) + \3 ; current map position
- IF (\1_WIDTH < \2_WIDTH)
- IF (_NARG > 5)
- db \1_WIDTH - \3 + 3 ; width of connection strip
- ELSE
- db \1_WIDTH - \3 ; width of connection strip
- ENDC
- ELSE
- db \2_WIDTH - \4 ; width of connection strip
- ENDC
- db \2_WIDTH ; map width
- db 0 ; y alignment (y coordinate of player when entering map)
- db (\3 - \4) * -2 ; x alignment (x coordinate of player when entering map)
- dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map)
+end_map_header: MACRO
+ dw CURRENT_MAP_OBJECT
+PURGE CURRENT_MAP_WIDTH
+PURGE CURRENT_MAP_HEIGHT
+PURGE CURRENT_MAP_OBJECT
ENDM
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = y movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-WEST_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * \4) + \2_WIDTH - 3 ; "Connection Strip" location
- dw wOverworldMap + (\1_WIDTH + 6) * (\3 + 3) ; current map position
- IF (\1_HEIGHT < \2_HEIGHT)
- db \1_HEIGHT - \3 + 3 ; height of connection strip
- ELSE
- db \2_HEIGHT - \4 ; height of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\3 - \4) * -2 ; y alignment
- db (\2_WIDTH * 2) - 1 ; x alignment
- dw wOverworldMap + 6 + (2 * \2_WIDTH) ; window (position of the upper left block after entering the map)
-ENDM
+; Connections go in order: north, south, west, east
+connection: MACRO
+;\1: direction
+;\2: map name
+;\3: map id
+;\4: offset of the target map relative to the current map
+; (x offset for east/west, y offset for north/south)
-;\1 (byte) = current map id
-;\2 (byte) = connected map id
-;\3 (byte) = y movement of connection strip
-;\4 (byte) = connection strip offset
-;\5 (word) = connected map blocks pointer
-;\6 (flag) = add 3 to height of connection strip (why?)
-EAST_MAP_CONNECTION: MACRO
- db \2 ; map id
- dw \5 + (\2_WIDTH * \4) ; "Connection Strip" location
- dw wOverworldMap - 3 + (\1_WIDTH + 6) * (\3 + 4) ; current map position
- IF (\1_HEIGHT < \2_HEIGHT)
- IF (_NARG > 5)
- db \1_HEIGHT - \3 + 3 ; height of connection strip
- ELSE
- db \1_HEIGHT - \3 ; height of connection strip
- ENDC
- ELSE
- db \2_HEIGHT - \4 ; height of connection strip
- ENDC
- db \2_WIDTH ; map width
- db (\3 - \4) * -2 ; y alignment
- db 0 ; x alignment
- dw wOverworldMap + 7 + \2_WIDTH ; window (position of the upper left block after entering the map)
+; Calculate tile offsets for source (current) and target maps
+_src = 0
+_tgt = (\4) + 3
+if _tgt < 2
+_src = -_tgt
+_tgt = 0
+endc
+
+if "\1" == "north"
+_blk = \3_WIDTH * (\3_HEIGHT - 3) + _src
+_map = _tgt
+_win = (\3_WIDTH + 6) * \3_HEIGHT + 1
+_y = \3_HEIGHT * 2 - 1
+_x = (\4) * -2
+_len = CURRENT_MAP_WIDTH + 3 - (\4)
+if _len > \3_WIDTH
+_len = \3_WIDTH
+endc
+
+elif "\1" == "south"
+_blk = _src
+_map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt
+_win = \3_WIDTH + 7
+_y = 0
+_x = (\4) * -2
+_len = CURRENT_MAP_WIDTH + 3 - (\4)
+if _len > \3_WIDTH
+_len = \3_WIDTH
+endc
+
+elif "\1" == "west"
+_blk = (\3_WIDTH * _src) + \3_WIDTH - 3
+_map = (CURRENT_MAP_WIDTH + 6) * _tgt
+_win = (\3_WIDTH + 6) * 2 - 6
+_y = (\4) * -2
+_x = \3_WIDTH * 2 - 1
+_len = CURRENT_MAP_HEIGHT + 3 - (\4)
+if _len > \3_HEIGHT
+_len = \3_HEIGHT
+endc
+
+elif "\1" == "east"
+_blk = (\3_WIDTH * _src)
+_map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3
+_win = \3_WIDTH + 7
+_y = (\4) * -2
+_x = 0
+_len = CURRENT_MAP_HEIGHT + 3 - (\4)
+if _len > \3_HEIGHT
+_len = \3_HEIGHT
+endc
+
+else
+fail "Invalid direction for 'connection'."
+endc
+
+ db \3
+ dw \2_Blocks + _blk
+ dw wOverworldMap + _map
+ db _len - _src
+ db \3_WIDTH
+ db _y, _x
+ dw wOverworldMap + _win
ENDM
tmlearn: MACRO