added some more music

This commit is contained in:
Frank Villaro-Dixon 2015-01-02 23:16:20 +01:00
parent e7c3d39b2e
commit 2ac4aa8749
5 changed files with 421 additions and 3 deletions

View file

@ -1,3 +1,4 @@
DIM.M_-_DIM.M_-__16BIT.wav
OxiD_-_8bit.mp3
Ozzed_-_Here_Comes_the_8-bit_Empire.wav
pornophonique_-_sad_robot.wav

Binary file not shown.

View file

@ -0,0 +1,414 @@
0.308265114
0.605814072
0.934459175
2.548285713
2.829935515
3.118684251
3.414574129
4.974208918
7.500746162
7.830464644
8.126424661
8.430569994
8.749838538
10.014691410
12.558937448
12.838491805
13.134466566
13.454463270
15.037957392
15.990696939
16.574560581
17.550585124
20.101996806
20.991279968
21.590352784
22.551236750
22.862379381
23.149922085
23.446686511
24.077811149
24.406073206
25.021243421
25.942754613
26.638966085
27.540825603
27.861765794
28.150431580
28.454117970
30.038595536
30.342363610
30.622423456
32.534792136
32.846184737
33.124980364
35.006907220
35.342020545
35.638764184
37.518812369
38.158630622
38.702586113
39.382626535
40.062774140
42.534576978
44.990714306
47.534589964
48.206746437
48.702566134
49.086562216
49.438218632
50.006545772
52.566221376
55.078355727
57.606494894
58.190511136
58.781431833
60.046623981
60.686839673
61.166501012
61.478483240
62.573975068
63.078164458
63.438207989
63.742279687
65.061130053
65.735275217
66.230319785
67.558180888
68.174412978
68.734652380
70.086127045
70.702621456
71.270516284
72.574391630
72.854223642
73.213983293
73.542200890
73.845476497
75.054362598
75.646438101
76.206328470
76.566324041
77.572711041
78.198699328
78.797976960
80.086111190
80.390497364
80.694526781
81.253555940
81.549419501
81.868270384
82.630011191
83.198169097
83.734462955
84.030343816
84.350216830
85.077917158
85.678453065
86.182104691
86.510190731
86.837574993
87.541880551
88.174550011
88.750867334
90.061244121
90.654270296
91.174073258
91.550526116
92.582825252
93.150009778
93.678407292
94.021617607
95.054418481
95.646438460
96.181637767
96.566364084
97.518860342
97.845854500
100.085570563
101.206531916
102.582425116
103.797658070
105.085621745
106.261941336
107.548743152
107.893541687
109.735076493
110.686012938
111.277558668
111.837633704
112.495213065
113.542326464
113.829822970
114.109202495
114.438210296
115.110418633
115.342383537
115.702475023
116.326464779
116.893413162
117.526662633
118.582743987
118.861050137
119.152093168
119.421460553
120.085576553
120.405573275
120.726347588
121.310102287
121.878229624
122.534787837
123.518427887
123.797962981
124.068558725
125.030869880
125.340767564
125.662246034
126.294380262
126.966655551
127.558293622
128.525893968
128.829795160
129.117496620
129.422702059
130.062580347
132.534347013
135.037786180
136.214757742
136.534421379
137.542769059
138.214384077
138.789277245
139.422677842
140.046719515
142.534487600
145.038076729
148.222096393
148.718242656
149.094420197
149.389383122
150.686026261
151.910001913
153.197890005
155.078616218
156.254925886
157.582567031
158.886173870
160.054435299
160.398208712
160.734018056
161.310014556
162.534381647
163.222143171
163.789551050
165.086307112
165.614079736
166.126305002
166.518154533
167.582388247
168.182298485
168.782276487
170.126570885
170.702120478
171.213721429
171.502519737
171.813794927
172.566969380
173.141841702
173.741670767
174.062241072
174.366041567
175.142392584
175.678396522
176.150141086
176.477083226
176.797764425
177.550233342
178.166217564
178.718519884
180.061935677
180.653987795
181.118342167
181.470055313
182.613788877
183.166267574
183.670004673
184.022343713
185.078573976
185.653956618
186.206284415
186.532814101
187.574100863
187.877049985
190.062437793
190.605951796
191.157411146
191.493164642
192.550182341
193.124872597
193.653327724
193.981483540
195.102246690
195.662061228
196.181993669
196.501760634
197.508892858
197.846097606
198.806613232
199.117805840
200.062301395
200.381890620
201.006904426
201.309958264
201.925986664
202.558262508
202.885831796
203.550350906
203.861993087
204.422294148
205.053919636
205.342222385
205.999037320
206.302137619
206.925896239
207.550126218
207.861837468
208.470260478
208.766192379
210.094081995
210.381799516
210.997884923
211.293915603
212.533746495
212.829394367
214.334187892
214.677516931
215.094284449
215.390243996
216.054515207
216.598283480
217.526605558
217.838246446
218.470601932
218.781690833
220.086231557
220.646082764
221.197701086
221.509871961
222.556134928
223.157873476
223.669293709
223.989443402
225.078599669
225.677220063
226.221923695
226.550060678
227.558361358
227.894070355
230.046283437
231.142802852
231.469542836
232.550650142
233.077243811
233.619908157
233.941142733
235.006725400
235.557795378
236.126173283
236.470271760
237.518265915
240.054056698
240.614399920
241.118193321
241.454281513
242.550933386
243.134088030
243.630086240
244.030058083
245.022195331
245.638288266
246.206112495
246.550206711
247.518531181
248.926204092
249.965917210
251.190090537
252.438221166
252.742183862
253.102116198
253.756114941
254.334212978
254.966125502
255.973092684
256.286135182
256.550101431
257.550358823
257.837829865
258.165890269
258.772182567
259.381700644
259.990155456
260.982176323
261.268919186
261.565819652
261.966080560
262.622597880
262.885166450
263.181945187
263.773832425
264.357931566
264.990122774
265.958611934
266.262160376
266.558205404
267.540490006
267.829194873
268.149623067
268.773811265
269.406284689
270.030480786
271.014247233
271.310034961
271.606191084
272.598601708
273.222370983
273.717678128
274.037566181
275.061839862
275.653246343
276.141242533
276.494206791
277.566464131
278.125850246
278.654219042
278.989301061
280.141699670
280.662221239
281.237383303
282.598254249
283.158101878
283.670170763
283.973410304
285.070042604
285.661556724
286.157741357
286.470097494
287.550124823
288.118142264
288.678038798
289.006116335
290.069319905
290.693928676
291.245239217
292.494211870
295.061736206
295.342118664
295.646185382
295.989777922
296.629914482
296.925263793
297.590469963
300.126115664
300.373719698
300.670340659
302.646152725

View file

@ -22,10 +22,11 @@ main()
struct s_game ga;
srand(time(NULL));
start:
init_game(&ga);
init_music(&ga);
init_SDL(&ga);
start:
init_game(&ga);
music_loadnplay(&ga);
struct s_obstacle a = create_obstacle(SHAPE_THICK, 2, 1, -1);
@ -48,11 +49,13 @@ start:
draw_game(&ga);
SDL_Flip(ga.screen);
#if 1
if(check_collisions(&ga)) {
puts("PERDU");
SDL_Delay(2000);
goto start;
}
#endif
get_keys(&ga);

View file

@ -94,6 +94,7 @@ music_loadnplay(struct s_game *g) { //{{{
mus = Mix_LoadMUS(music_path);
Mix_PlayMusic(mus, 1);
g->audio.beat_already_done = 0;
free(music_path);
}//}}}
@ -120,7 +121,6 @@ did_have_beat(struct s_game *g) {
float secs_passed = actual_time.tv_sec - g->start_time.tv_sec +
(actual_time.tv_nsec - g->start_time.tv_nsec) / 1e9;
if(g->audio.num_beats[music] > g->audio.beat_already_done) {
if(g->audio.beats[music][g->audio.beat_already_done] < secs_passed) {
g->audio.beat_already_done++;