mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
70 lines
1.9 KiB
NASM
70 lines
1.9 KiB
NASM
MACRO newgroup
|
|
;\1: group id
|
|
const_skip
|
|
DEF MAPGROUP_\1 EQU const_value
|
|
DEF CURRENT_NUM_MAPGROUP_MAPS EQUS "NUM_\1_MAPS"
|
|
DEF __map_value__ = 1
|
|
ENDM
|
|
|
|
MACRO map_const
|
|
;\1: map id
|
|
;\2: width: in blocks
|
|
;\3: height: in blocks
|
|
DEF GROUP_\1 EQU const_value
|
|
DEF MAP_\1 EQU __map_value__
|
|
DEF __map_value__ += 1
|
|
DEF \1_WIDTH EQU \2
|
|
DEF \1_HEIGHT EQU \3
|
|
ENDM
|
|
|
|
MACRO endgroup
|
|
DEF {CURRENT_NUM_MAPGROUP_MAPS} EQU __map_value__ - 1
|
|
PURGE CURRENT_NUM_MAPGROUP_MAPS
|
|
ENDM
|
|
|
|
; map group ids
|
|
; `newgroup` indexes are for:
|
|
; - MapGroupPointers (see data/maps/maps.asm)
|
|
; - MapGroupRoofs (see data/maps/roofs.asm)
|
|
; - OutdoorSprites (see data/maps/outdoor_sprites.asm)
|
|
; - RoofPals (see gfx/tilesets/roofs.pal)
|
|
; `map_const` indexes are for the sub-tables of MapGroupPointers (see data/maps/maps.asm)
|
|
; Each map also has associated data:
|
|
; - attributes (see data/maps/attributes.asm)
|
|
; - blocks (see data/maps/blocks.asm)
|
|
; - scripts and events (see data/maps/scripts.asm)
|
|
const_def
|
|
|
|
newgroup LEVEL_1 ; 1
|
|
map_const LEVEL_1_MAP_1, 5, 4 ; 1
|
|
; map_const LEVEL_1_MAP_2, 5, 8 ; 2
|
|
endgroup
|
|
|
|
; newgroup LEVEL_2 ; 2
|
|
; map_const LEVEL_2_MAP_1, 4, 4 ; 1
|
|
; endgroup
|
|
|
|
if DEF(_DEBUG)
|
|
newgroup DEBUGLEVEL_1
|
|
map_const DEBUGLEVEL_1_MAP_1, 5, 4 ; 1
|
|
endgroup
|
|
|
|
newgroup DEBUGLEVEL_2
|
|
map_const DEBUGLEVEL_2_MAP_1, 15, 10 ; 1
|
|
endgroup
|
|
|
|
newgroup DEBUGLEVEL_3
|
|
map_const DEBUGLEVEL_3_MAP_1, 5, 4 ; 1
|
|
endgroup
|
|
|
|
newgroup DEBUGLEVEL_4
|
|
map_const DEBUGLEVEL_4_MAP_1, 5, 4 ; 1
|
|
endgroup
|
|
|
|
newgroup DEBUGLEVEL_5
|
|
map_const DEBUGLEVEL_5_MAP_1, 15, 10 ; 1
|
|
endgroup
|
|
endc
|
|
|
|
DEF NUM_MAP_GROUPS EQU const_value
|