Mercurial > touhou
diff 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 |
line wrap: on
line diff
--- a/pytouhou/resource/loader.py +++ b/pytouhou/resource/loader.py @@ -6,6 +6,7 @@ from pytouhou.formats.ecl import ECL from pytouhou.formats.anm0 import Animations from pytouhou.formats.msg import MSG from pytouhou.formats.sht import SHT +from pytouhou.formats.exe import SHT as EoSDSHT from pytouhou.resource.anmwrapper import AnmWrapper @@ -102,6 +103,12 @@ class Loader(object): return self.instanced_shts[name] + def get_eosd_characters(self, name): + with open(name, 'rb') as file: + characters = EoSDSHT.read(file) #TODO: modular + return characters + + def get_anm_wrapper(self, names): return AnmWrapper(self.get_anm(name) for name in names)