# HG changeset patch # User Emmanuel Gil Peyrot # Date 1315165967 25200 # Node ID e2d8f2a56ea4aa5afb6ca18b4514828c6dbf87ce # Parent ca571697ec83b8afa9dfbdda26e027cd6fe3a80a Handle ECL opcodes with string. diff --git a/pytouhou/formats/ecl.py b/pytouhou/formats/ecl.py --- a/pytouhou/formats/ecl.py +++ b/pytouhou/formats/ecl.py @@ -13,7 +13,7 @@ ## -from struct import pack, unpack +from struct import pack, unpack, calcsize from pytouhou.utils.helpers import read_string from pytouhou.utils.helpers import get_logger @@ -90,7 +90,7 @@ class ECL(object): 88: ('if','alter_laser_angle'), 90: ('iiii', None), 92: ('i', None), - #93: set_spellcard, a string is there + 93: ('hhs', 'set_spellcard'), 94: ('', 'end_spellcard'), 95: ('ifffhhi', None), 96: ('', None), @@ -165,7 +165,13 @@ class ECL(object): size, rank_mask, param_mask = unpack('