Mercurial > touhou
comparison eosd @ 321:61adb5453e46
Implement music playback.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 13 Jun 2012 15:29:43 +0200 |
parents | da53bc29b94a |
children | 1b4f04b08729 |
comparison
equal
deleted
inserted
replaced
320:1a4ffdda8735 | 321:61adb5453e46 |
---|---|
41 prng = None | 41 prng = None |
42 | 42 |
43 resource_loader = Loader(path) | 43 resource_loader = Loader(path) |
44 | 44 |
45 resource_loader.scan_archives(data) | 45 resource_loader.scan_archives(data) |
46 default_power = [0, 64, 128, 128, 128, 128, 0][stage_num - 1] | |
47 game = EoSDGame(resource_loader, [PlayerState(character=character, power=default_power)], stage_num, rank, 16, | |
48 prng=prng) | |
49 | 46 |
50 # Load stage data | 47 # Load stage data |
51 stage = resource_loader.get_stage('stage%d.std' % stage_num) | 48 stage = resource_loader.get_stage('stage%d.std' % stage_num) |
49 | |
50 default_power = [0, 64, 128, 128, 128, 128, 0][stage_num - 1] | |
51 game = EoSDGame(resource_loader, [PlayerState(character=character, power=default_power)], stage_num, rank, 16, | |
52 prng=prng, bgms=stage.bgms) | |
52 | 53 |
53 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) | 54 background_anm_wrapper = resource_loader.get_anm_wrapper(('stg%dbg.anm' % stage_num,)) |
54 background = Background(stage, background_anm_wrapper) | 55 background = Background(stage, background_anm_wrapper) |
55 | 56 |
56 # Main loop | 57 # Main loop |
60 | 61 |
61 pathsep = os.path.pathsep | 62 pathsep = os.path.pathsep |
62 default_data = (pathsep.join(('CM.DAT', 'th06*_CM.DAT', '*CM.DAT', '*cm.dat')), | 63 default_data = (pathsep.join(('CM.DAT', 'th06*_CM.DAT', '*CM.DAT', '*cm.dat')), |
63 pathsep.join(('ST.DAT', 'th6*ST.DAT', '*ST.DAT', '*st.dat')), | 64 pathsep.join(('ST.DAT', 'th6*ST.DAT', '*ST.DAT', '*st.dat')), |
64 pathsep.join(('IN.DAT', 'th6*IN.DAT', '*IN.DAT', '*in.dat')), | 65 pathsep.join(('IN.DAT', 'th6*IN.DAT', '*IN.DAT', '*in.dat')), |
66 pathsep.join(('MD.DAT', 'th6*MD.DAT', '*MD.DAT', '*md.dat')), | |
65 pathsep.join(('102h.exe', '102*.exe', '東方紅魔郷.exe', '*.exe'))) | 67 pathsep.join(('102h.exe', '102*.exe', '東方紅魔郷.exe', '*.exe'))) |
66 | 68 |
67 | 69 |
68 parser = argparse.ArgumentParser(description='Libre reimplementation of the Touhou 6 engine.') | 70 parser = argparse.ArgumentParser(description='Libre reimplementation of the Touhou 6 engine.') |
69 | 71 |