aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
committerdannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
commitca019eac8fd96559f4d4e712f0b53e95492e5dcb (patch)
tree209a500e3bda6c2109e5acec60448e9e52f8c2af /macros
parentUse more ldpikacry (diff)
parentRequire RGBDS 0.9.3 for its DMG palette specs (#513) (diff)
downloadpokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.gz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.xz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'macros')
-rw-r--r--macros/asserts.asm2
-rw-r--r--macros/coords.asm6
-rw-r--r--macros/gfx.asm10
-rw-r--r--macros/scripts/maps.asm6
4 files changed, 15 insertions, 9 deletions
diff --git a/macros/asserts.asm b/macros/asserts.asm
index 402d97dd..7ca47892 100644
--- a/macros/asserts.asm
+++ b/macros/asserts.asm
@@ -44,7 +44,7 @@ MACRO list_start
ENDM
MACRO li
- ASSERT STRFIND(\1, "@") == -1, STRCAT("String terminator \"@\" in list entry: ", \1)
+ ASSERT STRFIND(\1, "@") == -1, "String terminator \"@\" in list entry: \1"
db \1, "@"
DEF list_index += 1
ENDM
diff --git a/macros/coords.asm b/macros/coords.asm
index 984073ed..6eccdec4 100644
--- a/macros/coords.asm
+++ b/macros/coords.asm
@@ -47,11 +47,11 @@ ENDM
MACRO bgcoord
; register, x, y[, origin]
- validate_coords \2, \3, BG_MAP_WIDTH, BG_MAP_HEIGHT
+ validate_coords \2, \3, TILEMAP_WIDTH, TILEMAP_HEIGHT
IF _NARG >= 4
- ld \1, (\3) * BG_MAP_WIDTH + (\2) + \4
+ ld \1, (\3) * TILEMAP_WIDTH + (\2) + \4
ELSE
- ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0
+ ld \1, (\3) * TILEMAP_WIDTH + (\2) + vBGMap0
ENDC
ENDM
diff --git a/macros/gfx.asm b/macros/gfx.asm
index 944e6dd5..7b8fcf5d 100644
--- a/macros/gfx.asm
+++ b/macros/gfx.asm
@@ -5,16 +5,16 @@ MACRO RGB
ENDR
ENDM
-DEF palred EQUS "(1 << 0) *"
-DEF palgreen EQUS "(1 << 5) *"
-DEF palblue EQUS "(1 << 10) *"
+DEF palred EQUS "(1 << B_COLOR_RED) *"
+DEF palgreen EQUS "(1 << B_COLOR_GREEN) *"
+DEF palblue EQUS "(1 << B_COLOR_BLUE) *"
DEF palettes EQUS "* PALETTE_SIZE"
DEF palette EQUS "+ PALETTE_SIZE *"
DEF color EQUS "+ PAL_COLOR_SIZE *"
-DEF tiles EQUS "* LEN_2BPP_TILE"
-DEF tile EQUS "+ LEN_2BPP_TILE *"
+DEF tiles EQUS "* TILE_SIZE"
+DEF tile EQUS "+ TILE_SIZE *"
MACRO dbsprite
; x tile, y tile, x pixel, y pixel, vtile offset, attributes
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
index 2837d0c0..49150c6e 100644
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -72,6 +72,12 @@ ENDM
;\1 source map
MACRO def_warps_to
+ ASSERT {_NUM_WARP_EVENTS} <= MAX_WARP_EVENTS, \
+ "Too many warp_events (above {d:MAX_WARP_EVENTS})!"
+ ASSERT {_NUM_BG_EVENTS} <= MAX_BG_EVENTS, \
+ "Too many bg_events (above {d:MAX_BG_EVENTS})!"
+ ASSERT {_NUM_OBJECT_EVENTS} <= MAX_OBJECT_EVENTS, \
+ "Too many object_events (above {d:MAX_OBJECT_EVENTS})!"
; text ID values are significant (see DisplayTextID in home/text_scripts.asm)
FOR n, {_NUM_BG_EVENTS}
ASSERT {_BG_EVENT_{d:n}_TEXT_ID} > {_NUM_OBJECT_EVENTS}, \