2022-06-06 14:25:42 -07:00
|
|
|
MACRO newgroup
|
2021-03-10 18:06:06 -08:00
|
|
|
;\1: group id
|
2020-10-26 12:45:57 -07:00
|
|
|
const_skip
|
2022-06-06 14:25:42 -07:00
|
|
|
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
|
|
|
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO map_const
|
2017-12-25 20:45:54 -08:00
|
|
|
;\1: map id
|
2018-05-18 16:36:22 -07:00
|
|
|
;\2: width: in blocks
|
|
|
|
;\3: height: in blocks
|
2022-06-06 14:25:42 -07:00
|
|
|
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
|
2017-12-08 21:50:59 -08:00
|
|
|
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO endgroup
|
|
|
|
DEF {CURRENT_NUM_MAPGROUP_MAPS} EQU __map_value__ - 1
|
|
|
|
PURGE CURRENT_NUM_MAPGROUP_MAPS
|
2021-03-10 18:06:06 -08:00
|
|
|
ENDM
|
|
|
|
|
2017-12-25 20:45:54 -08:00
|
|
|
; map group ids
|
|
|
|
; `newgroup` indexes are for:
|
2018-04-09 15:58:10 -07:00
|
|
|
; - MapGroupPointers (see data/maps/maps.asm)
|
2017-12-26 22:29:15 -08:00
|
|
|
; - MapGroupRoofs (see data/maps/roofs.asm)
|
2024-02-26 13:09:32 -08:00
|
|
|
; - MapSprites (see data/maps/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)
|
2017-12-08 21:50:59 -08:00
|
|
|
const_def
|
2013-07-07 22:35:41 -07:00
|
|
|
|
2023-07-25 06:33:08 -07:00
|
|
|
newgroup LEVEL_1 ; 1
|
|
|
|
map_const LEVEL_1_MAP_1, 5, 4 ; 1
|
|
|
|
; map_const LEVEL_1_MAP_2, 5, 8 ; 2
|
2021-03-10 18:06:06 -08:00
|
|
|
endgroup
|
2018-02-14 02:52:01 -08:00
|
|
|
|
2023-07-25 06:33:08 -07:00
|
|
|
; newgroup LEVEL_2 ; 2
|
|
|
|
; map_const LEVEL_2_MAP_1, 4, 4 ; 1
|
|
|
|
; endgroup
|
2020-06-16 08:28:52 -07:00
|
|
|
|
2023-09-02 15:22:23 -07:00
|
|
|
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
|
2023-12-31 04:39:00 -08:00
|
|
|
map_const DEBUGLEVEL_2_MAP_2, 5, 8 ; 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
|
2023-10-06 11:42:00 -07:00
|
|
|
map_const DEBUGLEVEL_5_MAP_1, 15, 10 ; 1
|
2023-10-02 07:11:52 -07:00
|
|
|
endgroup
|
2023-09-02 15:22:23 -07:00
|
|
|
endc
|
|
|
|
|
2023-07-25 06:33:08 -07:00
|
|
|
DEF NUM_MAP_GROUPS EQU const_value
|