comparison eosd @ 341:61caded6b4f5

Clean music playback API a little.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 04 Jul 2012 23:05:21 +0200
parents 39bc59953dfa
children eab591728abf
comparison
equal deleted inserted replaced
340:39bc59953dfa 341:61caded6b4f5
110 prng = None 110 prng = None
111 111
112 # Load stage data 112 # Load stage data
113 stage = resource_loader.get_stage('stage%d.std' % stage_num) 113 stage = resource_loader.get_stage('stage%d.std' % stage_num)
114 114
115 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, bgms=stage.bgms, continues=continues) 115 game = game_class(resource_loader, states, stage_num, rank, difficulty, prng=prng, continues=continues)
116 116
117 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) 117 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,))
118 background = Background(stage, background_anm_wrapper) 118 background = Background(stage, background_anm_wrapper)
119 119
120 # Main loop 120 # Main loop
121 runner.load_game(game, background, replay) 121 runner.load_game(game, background, stage.bgms, replay)
122 try: 122 try:
123 runner.start() 123 runner.start()
124 break 124 break
125 except NextStage: 125 except NextStage:
126 game.music.pause() 126 game.music.pause()