Mercurial > touhou
comparison pytouhou/resource/loader.py @ 229:5afc75f71fed
Add “SHT” support to EoSD, and do a little cleanup.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 30 Dec 2011 18:37:06 +0100 |
parents | 0595315d3880 |
children | c417bb6c98bf |
comparison
equal
deleted
inserted
replaced
228:8f4cd1c01d22 | 229:5afc75f71fed |
---|---|
4 from pytouhou.formats.std import Stage | 4 from pytouhou.formats.std import Stage |
5 from pytouhou.formats.ecl import ECL | 5 from pytouhou.formats.ecl import ECL |
6 from pytouhou.formats.anm0 import Animations | 6 from pytouhou.formats.anm0 import Animations |
7 from pytouhou.formats.msg import MSG | 7 from pytouhou.formats.msg import MSG |
8 from pytouhou.formats.sht import SHT | 8 from pytouhou.formats.sht import SHT |
9 from pytouhou.formats.exe import SHT as EoSDSHT | |
9 | 10 |
10 | 11 |
11 from pytouhou.resource.anmwrapper import AnmWrapper | 12 from pytouhou.resource.anmwrapper import AnmWrapper |
12 | 13 |
13 | 14 |
100 file = self.get_file(name) | 101 file = self.get_file(name) |
101 self.instanced_shts[name] = SHT.read(file) #TODO: modular | 102 self.instanced_shts[name] = SHT.read(file) #TODO: modular |
102 return self.instanced_shts[name] | 103 return self.instanced_shts[name] |
103 | 104 |
104 | 105 |
106 def get_eosd_characters(self, name): | |
107 with open(name, 'rb') as file: | |
108 characters = EoSDSHT.read(file) #TODO: modular | |
109 return characters | |
110 | |
111 | |
105 def get_anm_wrapper(self, names): | 112 def get_anm_wrapper(self, names): |
106 return AnmWrapper(self.get_anm(name) for name in names) | 113 return AnmWrapper(self.get_anm(name) for name in names) |
107 | 114 |
108 | 115 |
109 def get_anm_wrapper2(self, names): | 116 def get_anm_wrapper2(self, names): |