OpenTTD
sound_type.h
Go to the documentation of this file.
1 /* $Id: sound_type.h 27507 2016-02-08 21:05:57Z frosch $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * 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.
6  * 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.
7  * 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/>.
8  */
9 
12 #ifndef SOUND_TYPE_H
13 #define SOUND_TYPE_H
14 
15 struct SoundEntry {
16  uint8 file_slot;
17  size_t file_offset;
18  size_t file_size;
19  uint16 rate;
20  uint8 bits_per_sample;
21  uint8 channels;
22  uint8 volume;
23  uint8 priority;
25 };
26 
39 enum SoundFx {
40  SND_BEGIN = 0,
42  SND_03_FACTORY_WHISTLE,
43  SND_04_TRAIN,
44  SND_05_TRAIN_THROUGH_TUNNEL,
45  SND_06_SHIP_HORN,
46  SND_07_FERRY_HORN,
47  SND_08_PLANE_TAKE_OFF,
48  SND_09_JET,
49  SND_0A_TRAIN_HORN,
50  SND_0B_MINING_MACHINERY,
51  SND_0C_ELECTRIC_SPARK,
52  SND_0D_STEAM,
53  SND_0E_LEVEL_CROSSING,
54  SND_0F_VEHICLE_BREAKDOWN,
55  SND_10_TRAIN_BREAKDOWN,
56  SND_11_CRASH,
57  SND_12_EXPLOSION, // 16 == 0x10
58  SND_13_BIG_CRASH,
59  SND_14_CASHTILL,
60  SND_15_BEEP, // 19 == 0x13
61  SND_16_MORSE, // 20 == 0x14
62  SND_17_SKID_PLANE,
63  SND_18_HELICOPTER,
64  SND_19_BUS_START_PULL_AWAY,
65  SND_1A_BUS_START_PULL_AWAY_WITH_HORN,
66  SND_1B_TRUCK_START,
67  SND_1C_TRUCK_START_2,
68  SND_1D_APPLAUSE,
69  SND_1E_OOOOH,
72  SND_21_JACKHAMMER,
73  SND_22_CAR_HORN,
74  SND_23_CAR_HORN_2,
75  SND_24_SHEEP,
76  SND_25_COW,
77  SND_26_HORSE,
78  SND_27_BLACKSMITH_ANVIL,
79  SND_28_SAWMILL, // 38 == 0x26 !
80  SND_00_GOOD_YEAR, // 39 == 0x27 !
81  SND_01_BAD_YEAR, // 40 == 0x28 !
82  SND_29_RIP, // 41 == 0x29 !
83  SND_2A_EXTRACT_AND_POP,
84  SND_2B_COMEDY_HIT,
85  SND_2C_MACHINERY,
86  SND_2D_RIP_2,
87  SND_2E_EXTRACT_AND_POP,
88  SND_2F_POP,
89  SND_30_CARTOON_SOUND,
90  SND_31_EXTRACT,
91  SND_32_POP_2,
92  SND_33_PLASTIC_MINE,
93  SND_34_WIND,
94  SND_35_COMEDY_BREAKDOWN,
95  SND_36_CARTOON_CRASH,
96  SND_37_BALLOON_SQUEAK,
97  SND_38_CHAINSAW,
98  SND_39_HEAVY_WIND,
99  SND_3A_COMEDY_BREAKDOWN_2,
100  SND_3B_JET_OVERHEAD,
101  SND_3C_COMEDY_CAR,
102  SND_3D_ANOTHER_JET_OVERHEAD,
103  SND_3E_COMEDY_CAR_2,
104  SND_3F_COMEDY_CAR_3,
105  SND_40_COMEDY_CAR_START_AND_PULL_AWAY,
106  SND_41_MAGLEV,
107  SND_42_LOON_BIRD,
108  SND_43_LION,
109  SND_44_MONKEYS,
110  SND_45_PLANE_CRASHING,
111  SND_46_PLANE_ENGINE_SPUTTERING,
112  SND_47_MAGLEV_2,
113  SND_48_DISTANT_BIRD, // 72 == 0x48
114  SND_END
115 };
116 
118 static const uint ORIGINAL_SAMPLE_COUNT = 73;
119 
120 typedef uint16 SoundID;
121 
122 static const SoundID INVALID_SOUND = 0xFFFF;
123 
124 #endif /* SOUND_TYPE_H */
static const uint ORIGINAL_SAMPLE_COUNT
The number of sounds in the original sample.cat.
Definition: sound_type.h:118
Water construction.
Definition: sound_type.h:41
Rail construction.
Definition: sound_type.h:71
byte grf_container_ver
NewGRF container version if the sound is from a NewGRF.
Definition: sound_type.h:24
Non-water non-rail construction.
Definition: sound_type.h:70
SoundFx
Sound effects from baseset.
Definition: sound_type.h:39