annotate pytouhou/game/player.pxd @ 472:8038f1957b71

Type bullettype, itemtype and lasertype a bit.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 16 Sep 2013 18:42:04 +0200
parents feecdb4a8928
children 887de1309491
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 from pytouhou.game.element cimport Element
447
78e1c3864e73 Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 445
diff changeset
2 from pytouhou.game.game cimport Game
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 cdef class PlayerState:
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 cdef public double x, y
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 cdef public bint touchable, focused
465
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
7 cdef public long character, score, effective_score, lives, bombs, power
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
8 cdef public long graze, points
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
9
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
10 cdef long invulnerable_time, power_bonus, continues, continues_used, miss,
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
11 cdef long bombs_used
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
13
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
14 cdef class Player(Element):
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
15 cdef public PlayerState state
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
16 cdef public long death_time
447
78e1c3864e73 Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 445
diff changeset
17 cdef public Game _game
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
18
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
19 cdef object anm
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
20 cdef tuple speeds
457
4ccc47828002 Display the name of a spellcard and the face of its invoker.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 447
diff changeset
21 cdef long fire_time, bomb_time, direction
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
22
468
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
23 cdef void set_anim(self, index) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
24 cdef void play_sound(self, str name) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
25 cdef void collide(self) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
26 cdef void fire(self) except *
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
27 cpdef update(self, long keystate)