RGBDS syntax updates (#905)

New MACRO and DEF syntax
This commit is contained in:
vulcandth
2022-06-06 16:25:42 -05:00
committed by GitHub
parent a4d346cc8c
commit 3648afda16
179 changed files with 2546 additions and 2545 deletions

View File

@@ -2,12 +2,12 @@
; names taken from pandocs
; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands
attr_blk: MACRO
MACRO attr_blk
db (SGB_ATTR_BLK << 3) + ((\1 * 6) / 16 + 1)
db \1
ENDM
attr_blk_data: MACRO
MACRO attr_blk_data
db \1 ; which regions are affected
db \2 + (\3 << 2) + (\4 << 4) ; palette for each region
db \5, \6, \7, \8 ; x1, y1, x2, y2

View File

@@ -2,17 +2,17 @@
; names taken from pandocs
; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands
sgb_pal_set: MACRO
MACRO sgb_pal_set
db (SGB_PAL_SET << 3) + 1
dw PREDEFPAL_\1, PREDEFPAL_\2, PREDEFPAL_\3, PREDEFPAL_\4
ds 7, 0
ENDM
sgb_pal01: MACRO
MACRO sgb_pal01
db (SGB_PAL01 << 3) + 1
ENDM
sgb_pal23: MACRO
MACRO sgb_pal23
db (SGB_PAL23 << 3) + 1
ENDM