Mercurial > touhou
diff pytouhou/ui/renderer.pyx @ 384:690b5faaa0e6
Make rendering of multiple-sprites elements work like single-sprites.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 02 Oct 2012 13:27:05 +0200 |
parents | 0537af9125a7 |
children | 9e2cbb2c2c64 |
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pyx +++ b/pytouhou/ui/renderer.pyx @@ -15,6 +15,7 @@ from libc.stdlib cimport malloc, free from libc.math cimport tan from math import radians +from itertools import chain import ctypes @@ -54,7 +55,8 @@ cdef class Renderer: indices_by_texture = {} - for element in elements: + objects = chain(*[element.objects for element in elements]) + for element in objects: if nb_vertices >= MAX_ELEMENTS - 4: break