comparison pytouhou/resource/loader.py @ 429:40d5f3083ebc

Implement PCB’s ANM2 format and vm.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 03 Aug 2013 15:48:57 +0200
parents 6d7dbcb31d95
children c9433188ffdb
comparison
equal deleted inserted replaced
428:f41a26971a19 429:40d5f3083ebc
15 import os 15 import os
16 from glob import glob 16 from glob import glob
17 from itertools import chain 17 from itertools import chain
18 from io import BytesIO 18 from io import BytesIO
19 19
20 from pytouhou.formats import WrongFormatError
20 from pytouhou.formats.pbg3 import PBG3 21 from pytouhou.formats.pbg3 import PBG3
21 from pytouhou.formats.std import Stage 22 from pytouhou.formats.std import Stage
22 from pytouhou.formats.ecl import ECL 23 from pytouhou.formats.ecl import ECL
23 from pytouhou.formats.anm0 import ANM0 24 from pytouhou.formats.anm0 import ANM0
24 from pytouhou.formats.msg import MSG 25 from pytouhou.formats.msg import MSG
138 139
139 140
140 def get_anm(self, name): 141 def get_anm(self, name):
141 if name not in self.instanced_anms: 142 if name not in self.instanced_anms:
142 file = self.get_file(name) 143 file = self.get_file(name)
143 self.instanced_anms[name] = ANM0.read(file) #TODO: modular 144 self.instanced_anms[name] = ANM0.read(file)
144 return self.instanced_anms[name] 145 return self.instanced_anms[name]
145 146
146 147
147 def get_stage(self, name): 148 def get_stage(self, name):
148 file = self.get_file(name) 149 file = self.get_file(name)