rgbds-style inline macro definitions
Opened this issue · 0 comments
yenatch commented
Currently, adding and using a new macro in kanzure/pokecrystal requires the user to add a class to pokemontools/crystal.py.
Sometimes using a macro is the easiest way to arrange arbitrary data structures. For that purpose the macro does not need to be persistent and is best defined inline. bentley/rgbds already lets you do this, like so:
move: MACRO
db \1 ; animation
db \2 ; effect
db \3 ; power
db \4 ; type
db \5 * $ff / 100 ; accuracy (percent)
db \6 ; pp
db \7 * $ff / 100 ; effect chance (percent)
ENDM
move POUND, EFFECT_NORMAL_HIT, 40, NORMAL, 100, 35, 0
Apparently depending on rgbds is undesirable, and depending on pokemontools is not. In that case, this should be implemented in pokemontools.