comparison pytouhou/ui/gamerenderer.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
comparison
equal deleted inserted replaced
383:0537af9125a7 384:690b5faaa0e6
120 glDisable(GL_FOG) 120 glDisable(GL_FOG)
121 else: 121 else:
122 self.game_shader.bind() 122 self.game_shader.bind()
123 self.game_shader.uniform_matrixf('mvp', self.game_mvp.get_c_data()) 123 self.game_shader.uniform_matrixf('mvp', self.game_mvp.get_c_data())
124 124
125 self.render_elements(chain(*(enemy.objects() for enemy in game.enemies if enemy.visible)))
126 self.render_elements(enemy for enemy in game.enemies if enemy.visible) 125 self.render_elements(enemy for enemy in game.enemies if enemy.visible)
127 self.render_elements(game.effects) 126 self.render_elements(game.effects)
128 self.render_elements(chain(game.players_bullets, 127 self.render_elements(chain(game.players_bullets,
129 game.lasers_sprites(), 128 game.lasers_sprites(),
130 game.players, 129 game.players,
131 game.msg_sprites(), 130 game.msg_sprites()))
132 *(player.objects() for player in game.players)))
133 self.render_elements(chain(game.bullets, game.lasers, 131 self.render_elements(chain(game.bullets, game.lasers,
134 game.cancelled_bullets, game.items, 132 game.cancelled_bullets, game.items,
135 (item.indicator for item in game.items if item.indicator), 133 game.labels))
136 *(label.objects() for label in game.labels)))
137 134