author | truelight |
Thu, 24 Mar 2005 14:43:40 +0000 | |
changeset 1540 | 6eef12dab5bf |
parent 1496 | 15d859a626e8 |
child 1584 | 7122e759d56c |
permissions | -rw-r--r-- |
0 | 1 |
#ifndef SOUND_H |
2 |
#define SOUND_H |
|
3 |
||
4 |
typedef struct MusicFileSettings { |
|
5 |
byte playlist; |
|
6 |
byte music_vol; |
|
7 |
byte effect_vol; |
|
8 |
byte custom_1[33]; |
|
9 |
byte custom_2[33]; |
|
10 |
bool btn_down; |
|
11 |
bool shuffle; |
|
12 |
} MusicFileSettings; |
|
13 |
||
14 |
VARDEF byte _music_wnd_cursong; |
|
15 |
VARDEF bool _song_is_active; |
|
16 |
VARDEF byte _cur_playlist[33]; |
|
17 |
VARDEF MusicFileSettings msf; |
|
18 |
||
1496
15d859a626e8
(svn r2000) Split the sound system into backend (mixer.[ch]) and frontend (sound.[ch])
tron
parents:
337
diff
changeset
|
19 |
bool SoundInitialize(const char *filename); |
0 | 20 |
|
337
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
21 |
typedef enum SoundFx { |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
22 |
SND_02_SPLAT, // 0 == 0x00 ! |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
23 |
SND_03_FACTORY_WHISTLE, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
24 |
SND_04_TRAIN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
25 |
SND_05_TRAIN_THROUGH_TUNNEL, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
26 |
SND_06_SHIP_HORN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
27 |
SND_07_FERRY_HORN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
28 |
SND_08_PLANE_TAKE_OFF, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
29 |
SND_09_JET, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
30 |
SND_0A_TRAIN_HORN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
31 |
SND_0B_MINING_MACHINERY, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
32 |
SND_0C_ELECTRIC_SPARK, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
33 |
SND_0D_STEAM, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
34 |
SND_0E_LEVEL_CROSSING, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
35 |
SND_0F_VEHICLE_BREAKDOWN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
36 |
SND_10_TRAIN_BREAKDOWN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
37 |
SND_11_CRASH, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
38 |
SND_12_EXPLOSION, // 16 == 0x10 |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
39 |
SND_13_BIG_CRASH, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
40 |
SND_14_CASHTILL, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
41 |
SND_15_BEEP, // 19 == 0x13 |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
42 |
SND_16_MORSE, // 20 == 0x14 |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
43 |
SND_17_SKID_PLANE, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
44 |
SND_18_HELICOPTER, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
45 |
SND_19_BUS_START_PULL_AWAY, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
46 |
SND_1A_BUS_START_PULL_AWAY_WITH_HORN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
47 |
SND_1B_TRUCK_START, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
48 |
SND_1C_TRUCK_START_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
49 |
SND_1D_APPLAUSE, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
50 |
SND_1E_OOOOH, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
51 |
SND_1F_SPLAT, // 29 == 0x1D |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
52 |
SND_20_SPLAT_2, // 30 == 0x1E |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
53 |
SND_21_JACKHAMMER, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
54 |
SND_22_CAR_HORN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
55 |
SND_23_CAR_HORN_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
56 |
SND_24_SHEEP, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
57 |
SND_25_COW, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
58 |
SND_26_HORSE, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
59 |
SND_27_BLACKSMITH_ANVIL, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
60 |
SND_28_SAWMILL, // 38 == 0x26 ! |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
61 |
SND_00_GOOD_YEAR, // 39 == 0x27 ! |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
62 |
SND_01_BAD_YEAR, // 40 == 0x28 ! |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
63 |
SND_29_RIP, // 41 == 0x29 ! |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
64 |
SND_2A_EXTRACT_AND_POP, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
65 |
SND_2B_COMEDY_HIT, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
66 |
SND_2C_MACHINERY, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
67 |
SND_2D_RIP_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
68 |
SND_2E_EXTRACT_AND_POP, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
69 |
SND_2F_POP, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
70 |
SND_30_CARTOON_SOUND, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
71 |
SND_31_EXTRACT, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
72 |
SND_32_POP_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
73 |
SND_33_PLASTIC_MINE, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
74 |
SND_34_WIND, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
75 |
SND_35_COMEDY_BREAKDOWN, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
76 |
SND_36_CARTOON_CRASH, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
77 |
SND_37_BALLOON_SQUEAK, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
78 |
SND_38_CHAINSAW, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
79 |
SND_39_HEAVY_WIND, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
80 |
SND_3A_COMEDY_BREAKDOWN_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
81 |
SND_3B_JET_OVERHEAD, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
82 |
SND_3C_COMEDY_CAR, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
83 |
SND_3D_ANOTHER_JET_OVERHEAD, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
84 |
SND_3E_COMEDY_CAR_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
85 |
SND_3F_COMEDY_CAR_3, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
86 |
SND_40_COMEDY_CAR_START_AND_PULL_AWAY, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
87 |
SND_41_MAGLEV, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
88 |
SND_42_LOON_BIRD, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
89 |
SND_43_LION, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
90 |
SND_44_MONKEYS, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
91 |
SND_45_PLANE_CRASHING, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
92 |
SND_46_PLANE_ENGINE_SPUTTERING, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
93 |
SND_47_MAGLEV_2, |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
94 |
SND_48_DISTANT_BIRD // 72 == 0x48 |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
95 |
} SoundFx; |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
96 |
|
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
97 |
void SndPlayTileFx(SoundFx sound, TileIndex tile); |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
98 |
void SndPlayVehicleFx(SoundFx sound, const Vehicle *v); |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
99 |
void SndPlayFx(SoundFx sound); |
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
0
diff
changeset
|
100 |
|
0 | 101 |
#endif /* SOUND_H */ |