Mercurial > touhou
comparison pytouhou/game/game.py @ 373:6deab6ad8be8
Add the ability to save a replay.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 05 Aug 2012 16:37:26 +0200 |
parents | 704bea2e4360 |
children | c25530efea3b |
comparison
equal
deleted
inserted
replaced
372:704bea2e4360 | 373:6deab6ad8be8 |
---|---|
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 ## GNU General Public License for more details. | 12 ## GNU General Public License for more details. |
13 ## | 13 ## |
14 | 14 |
15 from itertools import chain | 15 from itertools import chain |
16 | |
17 from pytouhou.utils.random import Random | |
18 | 16 |
19 from pytouhou.vm.eclrunner import ECLMainRunner | 17 from pytouhou.vm.eclrunner import ECLMainRunner |
20 from pytouhou.vm.msgrunner import MSGRunner | 18 from pytouhou.vm.msgrunner import MSGRunner |
21 | 19 |
22 from pytouhou.game.bullet import LAUNCHED, CANCELLED | 20 from pytouhou.game.bullet import LAUNCHED, CANCELLED |
70 self.time_stop = False | 68 self.time_stop = False |
71 self.msg_runner = None | 69 self.msg_runner = None |
72 self.msg_wait = False | 70 self.msg_wait = False |
73 self.bonus_list = [0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, | 71 self.bonus_list = [0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, |
74 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 2] | 72 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 2] |
75 self.prng = prng or Random() | 73 self.prng = prng |
76 self.frame = 0 | 74 self.frame = 0 |
77 | 75 |
78 self.enm_anm_wrapper = resource_loader.get_anm_wrapper2(('stg%denm.anm' % stage, | 76 self.enm_anm_wrapper = resource_loader.get_anm_wrapper2(('stg%denm.anm' % stage, |
79 'stg%denm2.anm' % stage)) | 77 'stg%denm2.anm' % stage)) |
80 self.etama4 = resource_loader.get_anm_wrapper(('etama4.anm',)) | 78 self.etama4 = resource_loader.get_anm_wrapper(('etama4.anm',)) |