(svn r27953) -Cleanup: Adjust other languages for r27952
[openttd.git] / src / sound_type.h
blob76fe25139e83453fc294da6644c76f2e5912c540
1 /* $Id$ */
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 */
10 /** @file sound_type.h Types related to sounds. */
12 #ifndef SOUND_TYPE_H
13 #define SOUND_TYPE_H
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;
24 byte grf_container_ver; ///< NewGRF container version if the sound is from a NewGRF.
27 /**
28 * Sound effects from baseset.
30 * This enum contains the sound effects from the sound baseset.
31 * For hysterical raisins the order of sound effects in the baseset
32 * is different to the order they are referenced in TTD/NewGRF.
33 * - The first two sound effects from the baseset are inserted at position 39.
34 * (see translation table _sound_idx)
35 * - The order in the enum is the order using in TTD/NewGRF.
36 * - The naming of the enum values includes the position in the baseset.
37 * That is, for sound effects 0x02 to 0x28 the naming is off-by-two.
39 enum SoundFx {
40 SND_BEGIN = 0,
41 SND_02_SPLAT_WATER = 0, ///< Water construction.
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,
70 SND_1F_SPLAT_OTHER, ///< Non-water non-rail construction.
71 SND_20_SPLAT_RAIL, ///< Rail construction.
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
117 /** The number of sounds in the original sample.cat */
118 static const uint ORIGINAL_SAMPLE_COUNT = 73;
120 typedef uint16 SoundID;
122 static const SoundID INVALID_SOUND = 0xFFFF;
124 #endif /* SOUND_TYPE_H */