Mercurial > touhou
comparison pytouhou/game/bullet.py @ 108:2a03940deea3
Move everything graphical to pytouhou.opengl!
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 06 Sep 2011 00:26:13 +0200 |
parents | 5d9052b9a4e8 |
children | 92772413b5a6 |
comparison
equal
deleted
inserted
replaced
107:5d9052b9a4e8 | 108:2a03940deea3 |
---|---|
96 max_y < -self.y)): | 96 max_y < -self.y)): |
97 return False | 97 return False |
98 return True | 98 return True |
99 | 99 |
100 | 100 |
101 def get_objects_by_texture(self, objects_by_texture): | |
102 sprite = self._sprite | |
103 sprite.update_vertices_uvs_colors() | |
104 key = sprite.anm.first_name, sprite.anm.secondary_name | |
105 key = (key, sprite.blendfunc) | |
106 rec = objects_by_texture.setdefault(key, ([], [], [])) | |
107 vertices = ((x + self.x, y + self.y, z) for x, y, z in sprite._vertices) | |
108 rec[0].extend(vertices) | |
109 rec[1].extend(sprite._uvs) | |
110 rec[2].extend(sprite._colors) | |
111 | |
112 | |
113 def set_anim(self, anim_idx=None, sprite_idx_offset=None): | 101 def set_anim(self, anim_idx=None, sprite_idx_offset=None): |
114 if anim_idx is not None: | 102 if anim_idx is not None: |
115 self.anim_idx = anim_idx | 103 self.anim_idx = anim_idx |
116 | 104 |
117 if sprite_idx_offset is not None: | 105 if sprite_idx_offset is not None: |