Mercurial > touhou
comparison pytouhou/game/enemymanager.py @ 72:6a08f44fa01b
Handle a few more ANM instructions. pytouhou.game.background needs some serious refactoring.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 28 Aug 2011 01:23:11 +0200 |
parents | a142e57218a0 |
children | e4af16a019d3 |
comparison
equal
deleted
inserted
replaced
71:a03d7a94b997 | 72:6a08f44fa01b |
---|---|
140 | 140 |
141 | 141 |
142 def get_objects_by_texture(self): | 142 def get_objects_by_texture(self): |
143 objects_by_texture = {} | 143 objects_by_texture = {} |
144 key = self._sprite.anm.first_name, self._sprite.anm.secondary_name | 144 key = self._sprite.anm.first_name, self._sprite.anm.secondary_name |
145 key = (key, self._sprite.blendfunc) | |
145 if not key in objects_by_texture: | 146 if not key in objects_by_texture: |
146 objects_by_texture[key] = (0, [], [], []) | 147 objects_by_texture[key] = (0, [], [], []) |
147 vertices = tuple((x + self.x, y + self.y, z) for x, y, z in self._sprite._vertices) | 148 vertices = tuple((x + self.x, y + self.y, z) for x, y, z in self._sprite._vertices) |
148 objects_by_texture[key][1].extend(vertices) | 149 objects_by_texture[key][1].extend(vertices) |
149 objects_by_texture[key][2].extend(self._sprite._uvs) | 150 objects_by_texture[key][2].extend(self._sprite._uvs) |