comparison pytouhou/opengl/texture.py @ 25:cc864aadc733

Preload enemy and background textures
author Thibaut Girka <thib@sitedethib.com>
date Fri, 12 Aug 2011 19:25:08 +0200
parents 66ce9bb440ac
children ab826bc29aa2
comparison
equal deleted inserted replaced
24:93aa1b55d97c 25:cc864aadc733
15 15
16 def __getitem__(self, key): 16 def __getitem__(self, key):
17 if not key in self.textures: 17 if not key in self.textures:
18 self.textures[key] = self.load_texture(key) 18 self.textures[key] = self.load_texture(key)
19 return self.textures[key] 19 return self.textures[key]
20
21
22 def preload(self, anms):
23 for anm in anms:
24 key = anm.first_name, anm.secondary_name
25 texture = self[key]
20 26
21 27
22 def set_archive(self, archive): 28 def set_archive(self, archive):
23 self.archive = archive 29 self.archive = archive
24 30