Mercurial > touhou
comparison pytouhou/ui/sprite.pyx @ 420:3a7b36324611
Replace Pyglet’s image loader with our SDL2_image-based one.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 16 Jul 2013 21:07:15 +0200 |
parents | c5ba11ede097 |
children | 878273a984c4 |
comparison
equal
deleted
inserted
replaced
419:1c92721f8e49 | 420:3a7b36324611 |
---|---|
59 x_1 = 1. / sprite.anm.size[0] | 59 x_1 = 1. / sprite.anm.size[0] |
60 y_1 = 1. / sprite.anm.size[1] | 60 y_1 = 1. / sprite.anm.size[1] |
61 tox, toy = sprite.texoffsets | 61 tox, toy = sprite.texoffsets |
62 uvs = (tx * x_1 + tox, | 62 uvs = (tx * x_1 + tox, |
63 (tx + tw) * x_1 + tox, | 63 (tx + tw) * x_1 + tox, |
64 1. - (ty * y_1 + toy), | 64 ty * y_1 + toy, |
65 1. - ((ty + th) * y_1 + toy)) | 65 (ty + th) * y_1 + toy) |
66 | 66 |
67 (x1, x2 , x3, x4), (y1, y2, y3, y4), (z1, z2, z3, z4), _ = vertmat.data | 67 (x1, x2 , x3, x4), (y1, y2, y3, y4), (z1, z2, z3, z4), _ = vertmat.data |
68 | 68 |
69 key = sprite.anm.texture, sprite.blendfunc | 69 key = sprite.anm.texture, sprite.blendfunc |
70 r, g, b = sprite.color | 70 r, g, b = sprite.color |