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

@@ -1370,7 +1370,7 @@ BillsPC_RefreshTextboxes:
.Placeholder:
db "-----@"
copy_box_data: MACRO
MACRO copy_box_data
.loop\@
ld a, [hl]
cp -1
@@ -1394,9 +1394,9 @@ copy_box_data: MACRO
jr .loop\@
.done\@
if \1
call CloseSRAM
endc
if \1
call CloseSRAM
endc
ld a, -1
ld [de], a
ld a, [wBillsPCTempBoxCount]

View File

@@ -835,7 +835,7 @@ Hatch_InitShellFragments:
call EggHatch_DoAnimFrame
ret
shell_fragment: MACRO
MACRO shell_fragment
; y tile, y pxl, x tile, x pxl, frameset offset, ???
db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6
ENDM

View File

@@ -11,7 +11,7 @@
const BLUESKY_MAIL_INDEX ; 7
const MUSIC_MAIL_INDEX ; 8
const MIRAGE_MAIL_INDEX ; 9
NUM_MAIL EQU const_value
DEF NUM_MAIL EQU const_value
ReadPartyMonMail:
ld a, [wCurPartyMon]

View File

@@ -1,4 +1,4 @@
RANDY_OT_ID EQU 01001
DEF RANDY_OT_ID EQU 01001
TryAddMonToParty:
; Check if to copy wild mon or generate a new one

View File

@@ -2,9 +2,9 @@
const PINK_PAGE ; 1
const GREEN_PAGE ; 2
const BLUE_PAGE ; 3
NUM_STAT_PAGES EQU const_value - 1
DEF NUM_STAT_PAGES EQU const_value - 1
STAT_PAGE_MASK EQU %00000011
DEF STAT_PAGE_MASK EQU %00000011
BattleStatsScreenInit:
ld a, [wLinkMode]