Mercurial > touhou
comparison pytouhou/game/background.py @ 92:85f3b8ba3f24
Minor refactoring and optimizations. Drop stageviewer.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 04 Sep 2011 17:33:40 +0200 |
parents | 630e9045e851 |
children | ca571697ec83 |
comparison
equal
deleted
inserted
replaced
91:f7525fa66bb0 | 92:85f3b8ba3f24 |
---|---|
83 colors = sprite._colors | 83 colors = sprite._colors |
84 faces.append((vertices, uvs, colors)) | 84 faces.append((vertices, uvs, colors)) |
85 self.objects.append(faces) | 85 self.objects.append(faces) |
86 | 86 |
87 | 87 |
88 def get_objects_by_texture(self, objects_by_texture): | |
89 objects_by_texture.update(self.objects_by_texture) | |
90 | |
91 | |
88 def update(self, frame): | 92 def update(self, frame): |
89 if not self.objects_by_texture: | 93 if not self.objects_by_texture: |
90 vertices, uvs, colors = self.object_instances_to_vertices_uvs_colors() | 94 vertices, uvs, colors = self.object_instances_to_vertices_uvs_colors() |
91 nb_vertices = len(vertices) | 95 nb_vertices = len(vertices) |
92 vertices_format = 'f' * (3 * nb_vertices) | 96 vertices_format = 'f' * (3 * nb_vertices) |