OpenTTD
sound_type.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef SOUND_TYPE_H
11 #define SOUND_TYPE_H
12 
13 struct SoundEntry {
14  uint8 file_slot;
15  size_t file_offset;
16  size_t file_size;
17  uint16 rate;
18  uint8 bits_per_sample;
19  uint8 channels;
20  uint8 volume;
21  uint8 priority;
23 };
24 
37 enum SoundFx {
38  SND_BEGIN = 0,
40  SND_03_FACTORY_WHISTLE,
41  SND_04_TRAIN,
42  SND_05_TRAIN_THROUGH_TUNNEL,
43  SND_06_SHIP_HORN,
44  SND_07_FERRY_HORN,
45  SND_08_PLANE_TAKE_OFF,
46  SND_09_JET,
47  SND_0A_TRAIN_HORN,
48  SND_0B_MINING_MACHINERY,
49  SND_0C_ELECTRIC_SPARK,
50  SND_0D_STEAM,
51  SND_0E_LEVEL_CROSSING,
52  SND_0F_VEHICLE_BREAKDOWN,
53  SND_10_TRAIN_BREAKDOWN,
54  SND_11_CRASH,
55  SND_12_EXPLOSION, // 16 == 0x10
56  SND_13_BIG_CRASH,
57  SND_14_CASHTILL,
58  SND_15_BEEP, // 19 == 0x13
59  SND_16_MORSE, // 20 == 0x14
60  SND_17_SKID_PLANE,
61  SND_18_HELICOPTER,
62  SND_19_BUS_START_PULL_AWAY,
63  SND_1A_BUS_START_PULL_AWAY_WITH_HORN,
64  SND_1B_TRUCK_START,
65  SND_1C_TRUCK_START_2,
66  SND_1D_APPLAUSE,
67  SND_1E_OOOOH,
70  SND_21_JACKHAMMER,
71  SND_22_CAR_HORN,
72  SND_23_CAR_HORN_2,
73  SND_24_SHEEP,
74  SND_25_COW,
75  SND_26_HORSE,
76  SND_27_BLACKSMITH_ANVIL,
77  SND_28_SAWMILL, // 38 == 0x26 !
78  SND_00_GOOD_YEAR, // 39 == 0x27 !
79  SND_01_BAD_YEAR, // 40 == 0x28 !
80  SND_29_RIP, // 41 == 0x29 !
81  SND_2A_EXTRACT_AND_POP,
82  SND_2B_COMEDY_HIT,
83  SND_2C_MACHINERY,
84  SND_2D_RIP_2,
85  SND_2E_EXTRACT_AND_POP,
86  SND_2F_POP,
87  SND_30_CARTOON_SOUND,
88  SND_31_EXTRACT,
89  SND_32_POP_2,
90  SND_33_PLASTIC_MINE,
91  SND_34_WIND,
92  SND_35_COMEDY_BREAKDOWN,
93  SND_36_CARTOON_CRASH,
94  SND_37_BALLOON_SQUEAK,
95  SND_38_CHAINSAW,
96  SND_39_HEAVY_WIND,
97  SND_3A_COMEDY_BREAKDOWN_2,
98  SND_3B_JET_OVERHEAD,
99  SND_3C_COMEDY_CAR,
100  SND_3D_ANOTHER_JET_OVERHEAD,
101  SND_3E_COMEDY_CAR_2,
102  SND_3F_COMEDY_CAR_3,
103  SND_40_COMEDY_CAR_START_AND_PULL_AWAY,
104  SND_41_MAGLEV,
105  SND_42_LOON_BIRD,
106  SND_43_LION,
107  SND_44_MONKEYS,
108  SND_45_PLANE_CRASHING,
109  SND_46_PLANE_ENGINE_SPUTTERING,
110  SND_47_MAGLEV_2,
111  SND_48_DISTANT_BIRD, // 72 == 0x48
112  SND_END
113 };
114 
116 static const uint ORIGINAL_SAMPLE_COUNT = 73;
117 
118 typedef uint16 SoundID;
119 
120 static const SoundID INVALID_SOUND = 0xFFFF;
121 
122 #endif /* SOUND_TYPE_H */
static const uint ORIGINAL_SAMPLE_COUNT
The number of sounds in the original sample.cat.
Definition: sound_type.h:116
Water construction.
Definition: sound_type.h:39
Rail construction.
Definition: sound_type.h:69
byte grf_container_ver
NewGRF container version if the sound is from a NewGRF.
Definition: sound_type.h:22
Non-water non-rail construction.
Definition: sound_type.h:68
SoundFx
Sound effects from baseset.
Definition: sound_type.h:37