diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-06-10 17:15:53 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-06-10 17:15:53 -0400 |
commit | 60c71add580aa3aa5b096beeadd9bb83145768f6 (patch) | |
tree | de35c73058f041e5551a64e3f9d99e8a4fdfc5b5 | |
parent | 9ab257572793d5cdcd8156ca9e1566613ab72814 (diff) |
Define pokeanim setup commands like std scripts, predefs, and specials
No need for a macro workaround in rgbds 0.4.0
-rw-r--r-- | engine/gfx/pic_animation.asm | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/engine/gfx/pic_animation.asm b/engine/gfx/pic_animation.asm index fda39e5c6..f2a59b75a 100644 --- a/engine/gfx/pic_animation.asm +++ b/engine/gfx/pic_animation.asm @@ -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 |