Mercurial > touhou
comparison pytouhou/ui/sprite.pyx @ 304:f3099ebf4f61
Update attribute names to reflect the actual interface.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 13 Mar 2012 18:38:14 +0100 |
parents | 3539520fff93 |
children | 9e2cbb2c2c64 |
comparison
equal
deleted
inserted
replaced
303:647bde10353d | 304:f3099ebf4f61 |
---|---|
19 | 19 |
20 | 20 |
21 cpdef object get_sprite_rendering_data(object sprite): | 21 cpdef object get_sprite_rendering_data(object sprite): |
22 cdef Matrix vertmat | 22 cdef Matrix vertmat |
23 | 23 |
24 if not sprite._changed: | 24 if not sprite.changed: |
25 return sprite._rendering_data | 25 return sprite._rendering_data |
26 | 26 |
27 vertmat = Matrix([[-.5, .5, .5, -.5], | 27 vertmat = Matrix([[-.5, .5, .5, -.5], |
28 [-.5, -.5, .5, .5], | 28 [-.5, -.5, .5, .5], |
29 [ .0, .0, .0, .0], | 29 [ .0, .0, .0, .0], |
68 | 68 |
69 key = (sprite.anm.first_name, sprite.anm.secondary_name), sprite.blendfunc | 69 key = (sprite.anm.first_name, sprite.anm.secondary_name), sprite.blendfunc |
70 r, g, b = sprite.color | 70 r, g, b = sprite.color |
71 values = ((x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4)), uvs, [r, g, b, sprite.alpha] * 4 | 71 values = ((x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4)), uvs, [r, g, b, sprite.alpha] * 4 |
72 sprite._rendering_data = key, values | 72 sprite._rendering_data = key, values |
73 sprite._changed = False | 73 sprite.changed = False |
74 | 74 |
75 return sprite._rendering_data | 75 return sprite._rendering_data |
76 | 76 |