Mercurial > touhou
diff pytouhou/ui/sprite.pyx @ 449:d56536ef28e8
Improve render_elements’ speed a lot, and fix it in some corner cases. Thanks liori!
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 03 Aug 2013 15:49:11 +0200 |
parents | 723a3e67a223 |
children | bfea9e9a6845 |
line wrap: on
line diff
--- a/pytouhou/ui/sprite.pyx +++ b/pytouhou/ui/sprite.pyx @@ -67,7 +67,7 @@ cpdef object get_sprite_rendering_data(S ty * y_1 + toy, (ty + th) * y_1 + toy) - key = sprite.anm.texture, sprite.blendfunc + key = MAX_TEXTURES * sprite.blendfunc + <long>sprite.anm.texture r, g, b = sprite.color values = tuple([x for x in vertmat.data[:12]]), uvs, (r, g, b, sprite.alpha) sprite._rendering_data = key, values