pokecrystal-board/constants/map_constants.asm

71 lines
1.9 KiB
NASM
Raw Normal View History

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
2017-12-28 13:31:16 -08:00
ENDM
2014-05-02 22:02:08 -07:00
MACRO map_const
;\1: map id
2018-05-18 16:36:22 -07:00
;\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
2017-12-28 13:31:16 -08:00
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:
2018-04-09 15:58:10 -07:00
; - MapGroupPointers (see data/maps/maps.asm)
; - MapGroupRoofs (see data/maps/roofs.asm)
; - OutdoorSprites (see data/maps/outdoor_sprites.asm)
2018-01-12 00:07:48 -08:00
; - RoofPals (see gfx/tilesets/roofs.pal)
2018-04-09 15:58:10 -07:00
; `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
2013-07-07 22:35:41 -07:00
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
2023-10-02 07:11:52 -07:00
newgroup DEBUGLEVEL_2
2023-12-14 08:13:07 -08:00
map_const DEBUGLEVEL_2_MAP_1, 15, 10 ; 1
map_const DEBUGLEVEL_2_MAP_2, 5, 5 ; 2
2023-10-02 07:11:52 -07:00
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
2023-10-02 07:11:52 -07:00
endgroup
endc
DEF NUM_MAP_GROUPS EQU const_value