comparison pytouhou/game/game.pxd @ 509:292fea5c584e

Some more type optimisations.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 25 Nov 2013 19:12:56 +0100
parents 3d3285918ba1
children 577c3a88fb67
comparison
equal deleted inserted replaced
508:1bc014f9d572 509:292fea5c584e
1 from pytouhou.game.effect cimport Effect 1 from pytouhou.game.effect cimport Effect
2 from pytouhou.game.player cimport Player 2 from pytouhou.game.player cimport Player
3 from pytouhou.game.text cimport Text, NativeText 3 from pytouhou.game.text cimport Text, NativeText
4 from pytouhou.utils.random cimport Random
4 5
5 cdef class Game: 6 cdef class Game:
6 cdef public long width, height, nb_bullets_max, stage, rank, difficulty, difficulty_counter, difficulty_min, difficulty_max, frame, last_keystate 7 cdef public long width, height, nb_bullets_max, stage, rank, difficulty, difficulty_min, difficulty_max, frame
7 cdef public list bullet_types, laser_types, item_types, players, enemies, effects, bullets, lasers, cancelled_bullets, players_bullets, players_lasers, items, labels, faces, texts, hints, bonus_list 8 cdef public list bullet_types, laser_types, item_types, players, enemies, effects, bullets, lasers, cancelled_bullets, players_bullets, players_lasers, items, labels, faces, texts, hints, bonus_list
8 cdef public object interface, boss, msg_runner, prng, sfx_player 9 cdef public object interface, boss, msg_runner, sfx_player
10 cdef public Random prng
9 cdef public double continues 11 cdef public double continues
10 cdef public Effect spellcard_effect 12 cdef public Effect spellcard_effect
11 cdef public tuple spellcard 13 cdef public tuple spellcard
12 cdef public bint time_stop, msg_wait 14 cdef public bint time_stop, msg_wait
13 cdef public unsigned short deaths_count, next_bonus 15 cdef public unsigned short deaths_count, next_bonus
14 16
17 cdef long difficulty_counter, last_keystate
15 cdef bint friendly_fire 18 cdef bint friendly_fire
16 19
17 cdef list msg_sprites(self) 20 cdef list msg_sprites(self)
18 cdef list lasers_sprites(self) 21 cdef list lasers_sprites(self)
19 cdef void modify_difficulty(self, long diff) except * 22 cdef void modify_difficulty(self, long diff) nogil
20 cpdef enable_spellcard_effect(self) 23 cpdef enable_spellcard_effect(self)
21 cpdef disable_spellcard_effect(self) 24 cpdef disable_spellcard_effect(self)
22 cdef void set_player_bomb(self) except * 25 cdef void set_player_bomb(self) except *
23 cdef void unset_player_bomb(self) except * 26 cdef void unset_player_bomb(self) except *
24 cpdef drop_bonus(self, double x, double y, long _type, end_pos=*, player=*) 27 cpdef drop_bonus(self, double x, double y, long _type, end_pos=*, player=*)