File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ DEF MAP_BORDER EQU 3
1919; wWarpEntries
2020DEF MAX_WARP_EVENTS EQU 32
2121
22+ ; wNumSigns
23+ DEF MAX_BG_EVENTS EQU 16
24+
25+ ; wMapSpriteData
26+ DEF MAX_OBJECT_EVENTS EQU 16
27+
2228; flower and water tile animations
2329 const_def
2430 const TILEANIM_NONE ; 0
Original file line number Diff line number Diff line change 7272
7373;\1 source map
7474MACRO def_warps_to
75+ ASSERT {_NUM_WARP_EVENTS} <= MAX_WARP_EVENTS , \
76+ "Too many warp_events (above {d:MAX_WARP_EVENTS})!"
77+ ASSERT {_NUM_BG_EVENTS} <= MAX_BG_EVENTS , \
78+ "Too many bg_events (above {d:MAX_BG_EVENTS})!"
79+ ASSERT {_NUM_OBJECT_EVENTS} <= MAX_OBJECT_EVENTS , \
80+ "Too many object_events (above {d:MAX_OBJECT_EVENTS})!"
7581 ; text ID values are significant (see DisplayTextID in home/text_scripts.asm)
7682 FOR n , {_NUM_BG_EVENTS}
7783 ASSERT {_BG_EVENT_{d:n}_TEXT_ID} > {_NUM_OBJECT_EVENTS} , \
@@ -84,8 +90,6 @@ MACRO def_warps_to
8490 FOR n , {_NUM_WARP_EVENTS}
8591 warp_to _WARP_{d:n}_X , _WARP_{d:n}_Y , \1_WIDTH
8692 ENDR
87- ASSERT {_NUM_WARP_EVENTS} <= MAX_WARP_EVENTS , \
88- "Too many warp_events (above {d:MAX_WARP_EVENTS})!"
8993ENDM
9094
9195;\1 x position
Original file line number Diff line number Diff line change @@ -1826,22 +1826,22 @@ wDestinationWarpID:: db
18261826
18271827 ds 128
18281828
1829- ; number of signs in the current map (up to 16 )
1829+ ; number of signs in the current map (up to MAX_BG_EVENTS )
18301830wNumSigns:: db
18311831
1832- wSignCoords:: ds 16 * 2 ; Y, X
1833- wSignTextIDs:: ds 16
1832+ wSignCoords:: ds MAX_BG_EVENTS * 2 ; Y, X
1833+ wSignTextIDs:: ds MAX_BG_EVENTS
18341834
1835- ; number of sprites on the current map (up to 16 )
1835+ ; number of sprites on the current map (up to MAX_OBJECT_EVENTS )
18361836wNumSprites:: db
18371837
18381838; these two variables track the X and Y offset in blocks from the last special warp used
18391839; they don't seem to be used for anything
18401840wYOffsetSinceLastSpecialWarp:: db
18411841wXOffsetSinceLastSpecialWarp:: db
18421842
1843- wMapSpriteData:: ds 16 * 2 ; movement byte 2, text ID
1844- wMapSpriteExtraData:: ds 16 * 2 ; trainer class/item ID, trainer set ID
1843+ wMapSpriteData:: ds MAX_OBJECT_EVENTS * 2 ; movement byte 2, text ID
1844+ wMapSpriteExtraData:: ds MAX_OBJECT_EVENTS * 2 ; trainer class/item ID, trainer set ID
18451845
18461846; map height in 2x2 meta-tiles
18471847wCurrentMapHeight2:: db
You can’t perform that action at this time.
0 commit comments