RGBDS syntax updates (#358)

New MACRO and DEF syntax
This commit is contained in:
vulcandth 2022-06-06 16:25:31 -05:00 committed by GitHub
parent d7808d110f
commit 6b5be9129c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 958 additions and 958 deletions

View file

@ -8,7 +8,7 @@ SoftReset::
Init::
; Program init.
rLCDC_DEFAULT EQU %11100011
DEF rLCDC_DEFAULT EQU %11100011
; * LCD enabled
; * Window tile map at $9C00
; * Window display enabled

View file

@ -59,20 +59,20 @@ PrintNumber::
cp 6
jr z, .hundred_thousands
print_digit: MACRO
MACRO print_digit
IF (\1) / $10000
ld a, \1 / $10000 % $100
ELSE
xor a
ENDC
IF (\1) / $10000
ld a, \1 / $10000 % $100
ELSE
xor a
ENDC
ldh [hPowerOf10 + 0], a
IF (\1) / $100
ld a, \1 / $100 % $100
ELSE
xor a
ENDC
IF (\1) / $100
ld a, \1 / $100 % $100
ELSE
xor a
ENDC
ldh [hPowerOf10 + 1], a
ld a, \1 / $1 % $100

View file

@ -123,7 +123,7 @@ TextIDErrorText:: ; "[hSpriteIndexOrTextID] ERROR."
text_far _TextIDErrorText
text_end
print_name: MACRO
MACRO print_name
push de
ld de, \1
jr PlaceCommandCharacter

View file

@ -66,7 +66,7 @@ DisplayTextID::
; check first byte of text for special cases
dict2: MACRO
MACRO dict2
cp \1
jr nz, .not\@
\2

View file

@ -93,7 +93,7 @@ DelayFrame::
; Wait for the next vblank interrupt.
; As a bonus, this saves battery.
NOT_VBLANKED EQU 1
DEF NOT_VBLANKED EQU 1
ld a, NOT_VBLANKED
ldh [hVBlankOccurred], a