Mercurial > touhou
diff pytouhou/game/player.pyx @ 606:3c2f96f1d715
Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 26 Nov 2014 13:36:38 +0100 |
parents | e15672733c93 |
children | 2cf518129725 |
line wrap: on
line diff
--- a/pytouhou/game/player.pyx +++ b/pytouhou/game/player.pyx @@ -68,16 +68,16 @@ cdef class Player(Element): self.death_time = 0 - cdef void set_anim(self, index): + cdef void set_anim(self, index) except *: self.sprite = Sprite() self.anmrunner = ANMRunner(self.anm, index, self.sprite) - cdef void play_sound(self, str name): + cdef void play_sound(self, str name) except *: self._game.sfx_player.play('%s.wav' % name) - cdef void collide(self): + cdef void collide(self) except *: if not self.invulnerable_time and not self.death_time and self.touchable: # Border Between Life and Death self.death_time = self._game.frame self._game.new_effect((self.x, self.y), 17) @@ -95,7 +95,7 @@ cdef class Player(Element): self.focused = False - cdef void fire(self): + cdef void fire(self) except *: cdef long shot_power sht = self.focused_sht if self.focused else self.sht