sound_type.h

Go to the documentation of this file.
00001 /* $Id: sound_type.h 26460 2014-04-13 10:47:39Z frosch $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * 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.
00006  * 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.
00007  * 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/>.
00008  */
00009 
00012 #ifndef SOUND_TYPE_H
00013 #define SOUND_TYPE_H
00014 
00015 struct SoundEntry {
00016   uint8 file_slot;
00017   size_t file_offset;
00018   size_t file_size;
00019   uint16 rate;
00020   uint8 bits_per_sample;
00021   uint8 channels;
00022   uint8 volume;
00023   uint8 priority;
00024   byte grf_container_ver; 
00025 };
00026 
00027 enum SoundFx {
00028   SND_BEGIN = 0,
00029   SND_02_SPLAT_WATER = 0,                
00030   SND_03_FACTORY_WHISTLE,
00031   SND_04_TRAIN,
00032   SND_05_TRAIN_THROUGH_TUNNEL,
00033   SND_06_SHIP_HORN,
00034   SND_07_FERRY_HORN,
00035   SND_08_PLANE_TAKE_OFF,
00036   SND_09_JET,
00037   SND_0A_TRAIN_HORN,
00038   SND_0B_MINING_MACHINERY,
00039   SND_0C_ELECTRIC_SPARK,
00040   SND_0D_STEAM,
00041   SND_0E_LEVEL_CROSSING,
00042   SND_0F_VEHICLE_BREAKDOWN,
00043   SND_10_TRAIN_BREAKDOWN,
00044   SND_11_CRASH,
00045   SND_12_EXPLOSION,                      // 16 == 0x10
00046   SND_13_BIG_CRASH,
00047   SND_14_CASHTILL,
00048   SND_15_BEEP,                           // 19 == 0x13
00049   SND_16_MORSE,                          // 20 == 0x14
00050   SND_17_SKID_PLANE,
00051   SND_18_HELICOPTER,
00052   SND_19_BUS_START_PULL_AWAY,
00053   SND_1A_BUS_START_PULL_AWAY_WITH_HORN,
00054   SND_1B_TRUCK_START,
00055   SND_1C_TRUCK_START_2,
00056   SND_1D_APPLAUSE,
00057   SND_1E_OOOOH,
00058   SND_1F_SPLAT_OTHER,                    
00059   SND_20_SPLAT_RAIL,                     
00060   SND_21_JACKHAMMER,
00061   SND_22_CAR_HORN,
00062   SND_23_CAR_HORN_2,
00063   SND_24_SHEEP,
00064   SND_25_COW,
00065   SND_26_HORSE,
00066   SND_27_BLACKSMITH_ANVIL,
00067   SND_28_SAWMILL,                        // 38 == 0x26 !
00068   SND_00_GOOD_YEAR,                      // 39 == 0x27 !
00069   SND_01_BAD_YEAR,                       // 40 == 0x28 !
00070   SND_29_RIP,                            // 41 == 0x29 !
00071   SND_2A_EXTRACT_AND_POP,
00072   SND_2B_COMEDY_HIT,
00073   SND_2C_MACHINERY,
00074   SND_2D_RIP_2,
00075   SND_2E_EXTRACT_AND_POP,
00076   SND_2F_POP,
00077   SND_30_CARTOON_SOUND,
00078   SND_31_EXTRACT,
00079   SND_32_POP_2,
00080   SND_33_PLASTIC_MINE,
00081   SND_34_WIND,
00082   SND_35_COMEDY_BREAKDOWN,
00083   SND_36_CARTOON_CRASH,
00084   SND_37_BALLOON_SQUEAK,
00085   SND_38_CHAINSAW,
00086   SND_39_HEAVY_WIND,
00087   SND_3A_COMEDY_BREAKDOWN_2,
00088   SND_3B_JET_OVERHEAD,
00089   SND_3C_COMEDY_CAR,
00090   SND_3D_ANOTHER_JET_OVERHEAD,
00091   SND_3E_COMEDY_CAR_2,
00092   SND_3F_COMEDY_CAR_3,
00093   SND_40_COMEDY_CAR_START_AND_PULL_AWAY,
00094   SND_41_MAGLEV,
00095   SND_42_LOON_BIRD,
00096   SND_43_LION,
00097   SND_44_MONKEYS,
00098   SND_45_PLANE_CRASHING,
00099   SND_46_PLANE_ENGINE_SPUTTERING,
00100   SND_47_MAGLEV_2,
00101   SND_48_DISTANT_BIRD,                    // 72 == 0x48
00102   SND_END
00103 };
00104 
00106 static const uint ORIGINAL_SAMPLE_COUNT = 73;
00107 
00108 typedef uint16 SoundID;
00109 
00110 #endif /* SOUND_TYPE_H */