comparison pytouhou/game/bullet.pyx @ 527:db28538cd399

Use Sprite C arrays instead of their tuple representation where it makes sense.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 18:19:08 +0100
parents 887de1309491
children e35bef07290d
comparison
equal deleted inserted replaced
526:0b2a92a25245 527:db28538cd399
78 else: 78 else:
79 self.sprite.angle = angle 79 self.sprite.angle = angle
80 80
81 81
82 cdef bint is_visible(self, unsigned int screen_width, unsigned int screen_height): 82 cdef bint is_visible(self, unsigned int screen_width, unsigned int screen_height):
83 cdef double tw, th 83 tw, th = self.sprite._texcoords[2], self.sprite._texcoords[3]
84
85 tw, th = self.sprite.texcoords[2:]
86 x, y = self.x, self.y 84 x, y = self.x, self.y
87 85
88 max_x = tw / 2 86 max_x = tw / 2
89 max_y = th / 2 87 max_y = th / 2
90 88