Mercurial > touhou
diff pytouhou/game/game.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 | a6af3ff86612 |
line wrap: on
line diff
--- a/pytouhou/game/game.pyx +++ b/pytouhou/game/game.pyx @@ -119,14 +119,14 @@ cdef class Game: del self.texts['enemy_spellcard'] - cdef void set_player_bomb(self): + cdef void set_player_bomb(self) except *: face = Effect((-32, -16), 1, self.msg_anm[0][0][0]) face.sprite.allow_dest_offset = True self.effects.append(face) self.texts['player_spellcard'] = self.new_native_text((24, 24), u'Player Spellcard') - cdef void unset_player_bomb(self): + cdef void unset_player_bomb(self) except *: del self.texts['player_spellcard'] @@ -140,14 +140,14 @@ cdef class Game: player=player)) - cdef void autocollect(self, Player player): + cdef void autocollect(self, Player player) except *: cdef Item item for item in self.items: item.autocollect(player) - cdef void cancel_bullets(self): + cdef void cancel_bullets(self) except *: cdef Bullet bullet cdef Laser laser @@ -156,7 +156,7 @@ cdef class Game: for laser in self.lasers: laser.cancel() - cdef void cancel_player_lasers(self): + cdef void cancel_player_lasers(self) except *: cdef PlayerLaser laser for laser in self.players_lasers: if laser is not None: @@ -319,7 +319,7 @@ cdef class Game: self.frame += 1 - cdef void update_background(self): + cdef void update_background(self) except *: if self.time_stop: return if self.spellcard_effect is not None: @@ -327,14 +327,14 @@ cdef class Game: #TODO: update the actual background here? - cdef void update_enemies(self): + cdef void update_enemies(self) except *: cdef Enemy enemy for enemy in self.enemies: enemy.update() - cdef void update_msg(self, long keystate): + cdef void update_msg(self, long keystate) except *: cdef long k for k in (1, 256): @@ -346,7 +346,7 @@ cdef class Game: self.msg_runner.run_iteration() - cdef void update_players(self, list keystates): + cdef void update_players(self, list keystates) except *: cdef Bullet bullet cdef Player player cdef long keystate @@ -373,26 +373,26 @@ cdef class Game: player.play_sound('extend') - cdef void update_effects(self): + cdef void update_effects(self) except *: cdef Element effect for effect in self.effects: effect.update() - cdef void update_hints(self): + cdef void update_hints(self) except *: for hint in self.hints: if hint['Count'] == self.frame and hint['Base'] == 'start': self.new_hint(hint) - cdef void update_faces(self): + cdef void update_faces(self) except *: for face in self.faces: if face: face.update() - cdef void update_bullets(self): + cdef void update_bullets(self) except *: cdef Player player cdef Bullet bullet cdef Item item