Mercurial > touhou
comparison pytouhou/game/background.py @ 90:630e9045e851
Minor refactoring
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 04 Sep 2011 10:12:15 +0200 |
parents | 6a08f44fa01b |
children | 85f3b8ba3f24 |
comparison
equal
deleted
inserted
replaced
89:1513f5626656 | 90:630e9045e851 |
---|---|
74 for script_index, ox, oy, oz, width_override, height_override in obj.quads: | 74 for script_index, ox, oy, oz, width_override, height_override in obj.quads: |
75 #TODO: per-texture rendering | 75 #TODO: per-texture rendering |
76 sprite = Sprite() | 76 sprite = Sprite() |
77 anm_runner = ANMRunner(self.anm_wrapper, script_index, sprite) | 77 anm_runner = ANMRunner(self.anm_wrapper, script_index, sprite) |
78 anm_runner.run_frame() | 78 anm_runner.run_frame() |
79 sprite.update() | 79 sprite.update(width_override, height_override) |
80 if sprite._changed: | 80 if sprite._changed: |
81 sprite.update_vertices_uvs_colors(width_override, height_override) | 81 sprite.update_vertices_uvs_colors() |
82 uvs, vertices = sprite._uvs, tuple((x + ox, y + oy, z + oz) for x, y, z in sprite._vertices) | 82 uvs, vertices = sprite._uvs, tuple((x + ox, y + oy, z + oz) for x, y, z in sprite._vertices) |
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 |