Mercurial > touhou
comparison pytouhou/formats/std.py @ 321:61adb5453e46
Implement music playback.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 13 Jun 2012 15:29:43 +0200 |
parents | 88361534c77e |
children | 70e2ed71b09c |
comparison
equal
deleted
inserted
replaced
320:1a4ffdda8735 | 321:61adb5453e46 |
---|---|
95 bgm_a_path = read_string(file, 128, 'ascii') | 95 bgm_a_path = read_string(file, 128, 'ascii') |
96 bgm_b_path = read_string(file, 128, 'ascii') | 96 bgm_b_path = read_string(file, 128, 'ascii') |
97 bgm_c_path = read_string(file, 128, 'ascii') | 97 bgm_c_path = read_string(file, 128, 'ascii') |
98 bgm_d_path = read_string(file, 128, 'ascii') | 98 bgm_d_path = read_string(file, 128, 'ascii') |
99 | 99 |
100 stage.bgms = [(bgm_a, bgm_a_path), (bgm_b, bgm_b_path), (bgm_c, bgm_c_path), (bgm_d, bgm_d_path)] #TODO: handle ' ' | 100 stage.bgms = [None if bgm[0] == u' ' else bgm |
101 for bgm in ((bgm_a, bgm_a_path), (bgm_b, bgm_b_path), (bgm_c, bgm_c_path), (bgm_d, bgm_d_path))] | |
101 | 102 |
102 # Read model definitions | 103 # Read model definitions |
103 offsets = unpack('<%s' % ('I' * nb_models), file.read(4 * nb_models)) | 104 offsets = unpack('<%s' % ('I' * nb_models), file.read(4 * nb_models)) |
104 for offset in offsets: | 105 for offset in offsets: |
105 model = Model() | 106 model = Model() |