Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

rgbds-style inline macro definitions #64

Open
yenatch opened this issue Dec 31, 2013 · 0 comments
Open

rgbds-style inline macro definitions #64

yenatch opened this issue Dec 31, 2013 · 0 comments

Comments

@yenatch
Copy link
Contributor

yenatch commented Dec 31, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant