# HG changeset patch # User Thibaut Girka # Date 1312206342 -7200 # Node ID 057cb96907e32178d8a8d02a40a23ce4c8a85ff6 # Parent 57667251d040929b2c8b1ac0f70edf5a9680d445 Add preliminay support for EoSD's ANM format diff --git a/pytouhou/formats/anm0.py b/pytouhou/formats/anm0.py new file mode 100644 --- /dev/null +++ b/pytouhou/formats/anm0.py @@ -0,0 +1,66 @@ +from struct import pack, unpack +from pytouhou.utils.helpers import read_string + +#TODO: refactor/clean up + + +class Animations(object): + def __init__(self): + self.size = (0, 0) + self.first_name = None + self.secondary_name = None + self.sprites = {} + self.scripts = {} + + + @classmethod + def read(cls, file): + nb_sprites, nb_scripts, zero1 = unpack('