mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
48 lines
1.3 KiB
NASM
48 lines
1.3 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
|
|
|
|
DEF NUM_MAP_GROUPS EQU const_value
|