Mercurial > touhou
annotate pytouhou/game/game.pxd @ 536:6b76c9ba3975
Make archives return files by default, instead of bytes.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 05 Apr 2014 18:53:48 +0200 |
parents | 7c3c90468996 |
children | a6af3ff86612 |
rev | line source |
---|---|
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 from pytouhou.game.effect cimport Effect |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 from pytouhou.game.player cimport Player |
473
1c891c71cf22
Cythonize pytouhou.game.text.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
471
diff
changeset
|
3 from pytouhou.game.text cimport Text, NativeText |
528
7c3c90468996
Inherit music players from a base class.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
516
diff
changeset
|
4 from pytouhou.game.music cimport MusicPlayer |
509
292fea5c584e
Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
5 from pytouhou.utils.random cimport Random |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 cdef class Game: |
509
292fea5c584e
Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
8 cdef public long width, height, nb_bullets_max, stage, rank, difficulty, difficulty_min, difficulty_max, frame |
516
577c3a88fb67
Merge the lists Game.texts and Game.native_texts into the Game.texts dict.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
509
diff
changeset
|
9 cdef public list bullet_types, laser_types, item_types, players, enemies, effects, bullets, lasers, cancelled_bullets, players_bullets, players_lasers, items, labels, faces, hints, bonus_list |
528
7c3c90468996
Inherit music players from a base class.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
516
diff
changeset
|
10 cdef public object interface, boss, msg_runner |
516
577c3a88fb67
Merge the lists Game.texts and Game.native_texts into the Game.texts dict.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
509
diff
changeset
|
11 cdef public dict texts |
528
7c3c90468996
Inherit music players from a base class.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
516
diff
changeset
|
12 cdef public MusicPlayer sfx_player |
509
292fea5c584e
Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
13 cdef public Random prng |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 cdef public double continues |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 cdef public Effect spellcard_effect |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 cdef public tuple spellcard |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 cdef public bint time_stop, msg_wait |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 cdef public unsigned short deaths_count, next_bonus |
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 |
509
292fea5c584e
Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
20 cdef long difficulty_counter, last_keystate |
492
887de1309491
Add friendly fire in netplay.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
486
diff
changeset
|
21 cdef bint friendly_fire |
887de1309491
Add friendly fire in netplay.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
486
diff
changeset
|
22 |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
23 cdef list msg_sprites(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
24 cdef list lasers_sprites(self) |
509
292fea5c584e
Some more type optimisations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
25 cdef void modify_difficulty(self, long diff) nogil |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
26 cpdef enable_spellcard_effect(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
27 cpdef disable_spellcard_effect(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
28 cdef void set_player_bomb(self) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
29 cdef void unset_player_bomb(self) except * |
502
3d3285918ba1
Disallow collection of items dropped by the other player in netplay, also fixes a longstanding bug where autocollection worked with those items.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
492
diff
changeset
|
30 cpdef drop_bonus(self, double x, double y, long _type, end_pos=*, player=*) |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
31 cdef void autocollect(self, Player player) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
32 cdef void cancel_bullets(self) except * |
471
06f0eeb519bb
Make Laser and Orb extension types, and use that where possible.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
468
diff
changeset
|
33 cdef void cancel_player_lasers(self) except * |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
34 cpdef change_bullets_into_star_items(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
35 cpdef change_bullets_into_bonus(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
36 cpdef kill_enemies(self) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
37 cpdef new_effect(self, pos, long anim, anm=*, long number=*) |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
38 cpdef new_particle(self, pos, long anim, long amp, long number=*, bint reverse=*, long duration=*) |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
39 cpdef new_enemy(self, pos, life, instr_type, bonus_dropped, die_score) |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
40 cpdef new_msg(self, sub) |
473
1c891c71cf22
Cythonize pytouhou.game.text.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
471
diff
changeset
|
41 cdef Text new_label(self, tuple pos, bytes text) |
1c891c71cf22
Cythonize pytouhou.game.text.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
471
diff
changeset
|
42 cpdef NativeText new_native_text(self, tuple pos, unicode text, align=*) |
1c891c71cf22
Cythonize pytouhou.game.text.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
471
diff
changeset
|
43 cpdef Text new_hint(self, hint) |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
44 cpdef new_face(self, side, effect) |
486
2f53be1b2f60
Merge netplay branch.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
473
diff
changeset
|
45 cpdef run_iter(self, list keystates) |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
46 cdef void update_background(self) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
47 cdef void update_enemies(self) except * |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
48 cdef void update_msg(self, long keystate) except * |
486
2f53be1b2f60
Merge netplay branch.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
473
diff
changeset
|
49 cdef void update_players(self, list keystates) except * |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
50 cdef void update_effects(self) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
51 cdef void update_hints(self) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
52 cdef void update_faces(self) except * |
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
466
diff
changeset
|
53 cdef void update_bullets(self) except * |
466
b16d34fca5b4
Revert a change in 78e1c3864e73, causing boss rush to not destroy any standard enemy.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
447
diff
changeset
|
54 cpdef cleanup(self) |