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

@@ -1,37 +1,37 @@
; pic + oam animations
frame: MACRO
MACRO frame
db \1
x = \2
if _NARG > 2
rept _NARG - 2
x |= 1 << (\3 + 1)
shift
endr
endc
DEF x = \2
if _NARG > 2
rept _NARG - 2
DEF x |= 1 << (\3 + 1)
shift
endr
endc
db x
ENDM
const_def -1, -1
const endanim_command ; $ff
endanim: MACRO
MACRO endanim
db endanim_command
ENDM
const dorestart_command ; $fe
dorestart: MACRO
MACRO dorestart
db dorestart_command
ENDM
const dowait_command ; $fd
dowait: MACRO
MACRO dowait
db dowait_command
db \1 ; frames
ENDM
const delanim_command ; $fc
delanim: MACRO
MACRO delanim
; Removes the object from the screen, as opposed to `endanim` which just stops all motion
db delanim_command
ENDM
@@ -41,13 +41,13 @@ ENDM
const_def -2, -1
const setrepeat_command ; $fe
setrepeat: MACRO
MACRO setrepeat
db setrepeat_command
db \1 ; amount of times to repeat
ENDM
const dorepeat_command ; $fd
dorepeat: MACRO
MACRO dorepeat
db dorepeat_command
db \1 ; command offset to jump to
ENDM