diff options
| author | Marcus Huderle <huderlem@gmail.com> | 2013-12-15 16:18:14 -0600 |
|---|---|---|
| committer | Marcus Huderle <huderlem@gmail.com> | 2013-12-15 16:18:14 -0600 |
| commit | 549fe35420c2cd114cafa5997633297fa3ff9290 (patch) | |
| tree | 454f88103f1a3616612afd73bc532adbdf036459 /preprocessor.py | |
| parent | Nicknaming screen loads the 'ED' symbol separately. (diff) | |
| parent | incbin killing part 2 (diff) | |
| download | pokeyellow-549fe35420c2cd114cafa5997633297fa3ff9290.tar.gz pokeyellow-549fe35420c2cd114cafa5997633297fa3ff9290.tar.xz pokeyellow-549fe35420c2cd114cafa5997633297fa3ff9290.zip | |
Merged and fixed incbin conflicts with Danny.
Diffstat (limited to '')
| -rw-r--r-- | preprocessor.py (renamed from textpre.py) | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/textpre.py b/preprocessor.py index 294e9ccb..cb9353af 100644 --- a/textpre.py +++ b/preprocessor.py @@ -1,10 +1,17 @@ # -*- coding: utf-8 -*- import extras.pokemontools.preprocessor as preprocessor + import extras.pokemontools.configuration as configuration +config = configuration.Config() import sys +from extras.pokemontools.crystal import ( + callchannel, + loopchannel, +) + chars = { "ガ": 0x05, "ギ": 0x06, @@ -260,14 +267,21 @@ chars = { "9": 0xFF, } -preprocessor.chars = chars +def load_pokered_macros(): + macros = [callchannel, loopchannel] + return macros -from extras.pokemontools.crystal import ( - callchannel, - loopchannel, -) +def setup_processor(): + preprocessor.chars = chars + macros = load_pokered_macros() + processor = preprocessor.Preprocessor(config, macros) + return processor -config = configuration.Config() -macros = [callchannel, loopchannel] -processor = preprocessor.Preprocessor(config, macros) -processor.preprocess() +def main(): + processor = setup_processor() + output = processor.preprocess() + processor.update_globals() + return output + +if __name__ == '__main__': + main() |
