diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-12-28 23:56:34 -0800 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-12-28 23:56:34 -0800 |
commit | 983ef29fd0e3645cb6335ee8bb172312790a56e2 (patch) | |
tree | 93d198b963f6142ac35a99c503cff21680065b49 /preprocessor.py | |
parent | 0fdbdb43a794358b5ed484114486e2992d520338 (diff) | |
parent | a8cb73b654af67bb3caad2c6d45edce7436032b1 (diff) |
Merge pull request #221 from yenatch/more-objects
analyze the bytes
Diffstat (limited to 'preprocessor.py')
-rw-r--r-- | preprocessor.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/preprocessor.py b/preprocessor.py index b5f2e3a4a..f5bc08637 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -25,6 +25,11 @@ from extras.pokemontools.audio import ( Note, ) +from extras.pokemontools.battle_animations import ( + BattleAnimWait, + battle_animation_classes, +) + def load_pokecrystal_macros(): """ Construct a list of macros that are needed for pokecrystal preprocessing. @@ -48,20 +53,20 @@ def load_pokecrystal_macros(): ourmacros += movement_command_classes ourmacros += music_classes ourmacros += effect_classes + ourmacros += battle_animation_classes + [BattleAnimWait] return ourmacros -def preprocess(config, macros, lines=None): - """ - Entry point for the preprocessor. - """ +def setup_processor(): + config = configuration.Config() + macros = load_pokecrystal_macros() processor = preprocessor.Preprocessor(config, macros) - return processor.preprocess(lines=lines) + return processor def main(): - config = configuration.Config() - macros = load_pokecrystal_macros() - return preprocess(config, macros) + processor = setup_processor() + processor.preprocess() + processor.update_globals # only run against stdin when not included as a module if __name__ == "__main__": |