Use constants to delineate map types, and factor out more data

This commit is contained in:
Rangi 2020-08-31 10:23:19 -04:00
parent 70eac3a1f7
commit bfd9f617c9
17 changed files with 126 additions and 135 deletions

View file

@ -13,6 +13,7 @@ ENDM
; - MapSpriteSets (see data/maps/sprite_sets.asm)
; - ExternalMapEntries (see data/maps/town_map_entries.asm)
; Each map also has associated data in maps.asm.
; Order: towns/cities, then routes, then indoor/dungeon maps
const_def
mapconst PALLET_TOWN, 9, 10 ; $00
mapconst VIRIDIAN_CITY, 18, 20 ; $01
@ -25,7 +26,9 @@ ENDM
mapconst CINNABAR_ISLAND, 9, 10 ; $08
mapconst INDIGO_PLATEAU, 9, 10 ; $09
mapconst SAFFRON_CITY, 18, 20 ; $0A
NUM_CITY_MAPS EQU const_value
mapconst UNUSED_MAP_0B, 0, 0 ; $0B
FIRST_ROUTE_MAP EQU const_value
mapconst ROUTE_1, 18, 10 ; $0C
mapconst ROUTE_2, 36, 10 ; $0D
mapconst ROUTE_3, 9, 35 ; $0E
@ -51,6 +54,7 @@ ENDM
mapconst ROUTE_23, 72, 10 ; $22
mapconst ROUTE_24, 18, 10 ; $23
mapconst ROUTE_25, 9, 30 ; $24
FIRST_INDOOR_MAP EQU const_value
mapconst REDS_HOUSE_1F, 4, 4 ; $25
mapconst REDS_HOUSE_2F, 4, 4 ; $26
mapconst BLUES_HOUSE, 4, 4 ; $27
@ -263,7 +267,6 @@ ENDM
mapconst BRUNOS_ROOM, 6, 5 ; $F6
mapconst AGATHAS_ROOM, 6, 5 ; $F7
; Indoor maps, such as houses, use this as the Map ID in their exit warps
; This map ID takes the player back to the last outdoor map they were on, stored in wLastMap
LAST_MAP EQU -1