# HG changeset patch # User Thibaut Girka # Date 1315341645 -7200 # Node ID e544f9a7966d837018b033fb4f3c1d18a597a427 # Parent 340fcda8e64a5441b30263ca41b3171c8d8d9d5c Add writing support to pytouhou.formats.ecl! diff --git a/pytouhou/formats/ecl.py b/pytouhou/formats/ecl.py --- a/pytouhou/formats/ecl.py +++ b/pytouhou/formats/ecl.py @@ -133,6 +133,16 @@ class ECL(object): 134: ('', None), 135: ('i', None)} #TODO + _main_instructions = {0: ('ffIhHHH', 'spawn_enemy'), + 2: ('ffIhHHH', 'spawn_enemy_mirrored'), + 4: ('ffIhHHH', 'spawn_enemy_random'), + 6: ('ffIhHHH', 'spawn_enemy_mirrored_random'), + 8: ('', None), + 9: ('', None), + 10: ('II', None), + 12: ('', None)} + + def __init__(self): self.main = [] self.subs = [[]] @@ -143,7 +153,7 @@ class ECL(object): sub_count, main_offset = unpack('