Define pokeanim setup commands like std scripts, predefs, and specials

No need for a macro workaround in rgbds 0.4.0
This commit is contained in:
Rangi 2020-06-10 17:15:53 -04:00
parent 9ab2575727
commit 60c71add58

View File

@ -48,14 +48,10 @@ AnimateMon_HOF:
pokeanim: MACRO
rept _NARG
; Workaround for a bug where macro args can't come after the start of a symbol
if !DEF(\1_POKEANIM)
\1_POKEANIM EQUS "PokeAnim_\1_"
endc
db (\1_POKEANIM - PokeAnim_SetupCommands) / 2
db (PokeAnim_\1_SetupCommand - PokeAnim_SetupCommands) / 2
shift
endr
db (PokeAnim_Finish_ - PokeAnim_SetupCommands) / 2
db (PokeAnim_Finish_SetupCommand - PokeAnim_SetupCommands) / 2
ENDM
PokeAnims:
@ -132,22 +128,24 @@ SetUpPokeAnim:
scf
ret
PokeAnim_SetupCommands:
setup_command: MACRO
\1_: dw \1
add_setup_command: MACRO
\1_SetupCommand:
dw \1
ENDM
setup_command PokeAnim_Finish
setup_command PokeAnim_BasePic
setup_command PokeAnim_SetWait
setup_command PokeAnim_Wait
setup_command PokeAnim_Setup
setup_command PokeAnim_Setup2
setup_command PokeAnim_Idle
setup_command PokeAnim_Play
setup_command PokeAnim_Play2
setup_command PokeAnim_Cry
setup_command PokeAnim_CryNoWait
setup_command PokeAnim_StereoCry
PokeAnim_SetupCommands:
add_setup_command PokeAnim_Finish
add_setup_command PokeAnim_BasePic
add_setup_command PokeAnim_SetWait
add_setup_command PokeAnim_Wait
add_setup_command PokeAnim_Setup
add_setup_command PokeAnim_Setup2
add_setup_command PokeAnim_Idle
add_setup_command PokeAnim_Play
add_setup_command PokeAnim_Play2
add_setup_command PokeAnim_Cry
add_setup_command PokeAnim_CryNoWait
add_setup_command PokeAnim_StereoCry
PokeAnim_SetWait:
ld a, 18