# sound_type.h

Go to the documentation of this file.

    00001 /* $Id: sound_type.h 17248 2009-08-21 20:21:05Z rubidium $ */
    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 MusicFileSettings {
    00016   byte playlist;
    00017   byte music_vol;
    00018   byte effect_vol;
    00019   byte custom_1[33];
    00020   byte custom_2[33];
    00021   bool playing;
    00022   bool shuffle;
    00023 };
    00024
    00025 struct SoundEntry {
    00026   uint8 file_slot;
    00027   size_t file_offset;
    00028   size_t file_size;
    00029   uint16 rate;
    00030   uint8 bits_per_sample;
    00031   uint8 channels;
    00032   uint8 volume;
    00033   uint8 priority;
    00034 };
    00035
    00036 enum SoundFx {
    00037   SND_BEGIN = 0,
    00038   SND_02_SPLAT = 0,                          //  0 == 0x00 !
    00039   SND_03_FACTORY_WHISTLE,
    00040   SND_04_TRAIN,
    00041   SND_05_TRAIN_THROUGH_TUNNEL,
    00042   SND_06_SHIP_HORN,
    00043   SND_07_FERRY_HORN,
    00044   SND_08_PLANE_TAKE_OFF,
    00045   SND_09_JET,
    00046   SND_0A_TRAIN_HORN,
    00047   SND_0B_MINING_MACHINERY,
    00048   SND_0C_ELECTRIC_SPARK,
    00049   SND_0D_STEAM,
    00050   SND_0E_LEVEL_CROSSING,
    00051   SND_0F_VEHICLE_BREAKDOWN,
    00052   SND_10_TRAIN_BREAKDOWN,
    00053   SND_11_CRASH,
    00054   SND_12_EXPLOSION,                      // 16 == 0x10
    00055   SND_13_BIG_CRASH,
    00056   SND_14_CASHTILL,
    00057   SND_15_BEEP,                           // 19 == 0x13
    00058   SND_16_MORSE,                          // 20 == 0x14
    00059   SND_17_SKID_PLANE,
    00060   SND_18_HELICOPTER,
    00061   SND_19_BUS_START_PULL_AWAY,
    00062   SND_1A_BUS_START_PULL_AWAY_WITH_HORN,
    00063   SND_1B_TRUCK_START,
    00064   SND_1C_TRUCK_START_2,
    00065   SND_1D_APPLAUSE,
    00066   SND_1E_OOOOH,
    00067   SND_1F_SPLAT,                          // 29 == 0x1D
    00068   SND_20_SPLAT_2,                        // 30 == 0x1E
    00069   SND_21_JACKHAMMER,
    00070   SND_22_CAR_HORN,
    00071   SND_23_CAR_HORN_2,
    00072   SND_24_SHEEP,
    00073   SND_25_COW,
    00074   SND_26_HORSE,
    00075   SND_27_BLACKSMITH_ANVIL,
    00076   SND_28_SAWMILL,                        // 38 == 0x26 !
    00077   SND_00_GOOD_YEAR,                      // 39 == 0x27 !
    00078   SND_01_BAD_YEAR,                       // 40 == 0x28 !
    00079   SND_29_RIP,                            // 41 == 0x29 !
    00080   SND_2A_EXTRACT_AND_POP,
    00081   SND_2B_COMEDY_HIT,
    00082   SND_2C_MACHINERY,
    00083   SND_2D_RIP_2,
    00084   SND_2E_EXTRACT_AND_POP,
    00085   SND_2F_POP,
    00086   SND_30_CARTOON_SOUND,
    00087   SND_31_EXTRACT,
    00088   SND_32_POP_2,
    00089   SND_33_PLASTIC_MINE,
    00090   SND_34_WIND,
    00091   SND_35_COMEDY_BREAKDOWN,
    00092   SND_36_CARTOON_CRASH,
    00093   SND_37_BALLOON_SQUEAK,
    00094   SND_38_CHAINSAW,
    00095   SND_39_HEAVY_WIND,
    00096   SND_3A_COMEDY_BREAKDOWN_2,
    00097   SND_3B_JET_OVERHEAD,
    00098   SND_3C_COMEDY_CAR,
    00099   SND_3D_ANOTHER_JET_OVERHEAD,
    00100   SND_3E_COMEDY_CAR_2,
    00101   SND_3F_COMEDY_CAR_3,
    00102   SND_40_COMEDY_CAR_START_AND_PULL_AWAY,
    00103   SND_41_MAGLEV,
    00104   SND_42_LOON_BIRD,
    00105   SND_43_LION,
    00106   SND_44_MONKEYS,
    00107   SND_45_PLANE_CRASHING,
    00108   SND_46_PLANE_ENGINE_SPUTTERING,
    00109   SND_47_MAGLEV_2,
    00110   SND_48_DISTANT_BIRD,                    // 72 == 0x48
    00111   SND_END
    00112 };
    00113
    00115 static const uint ORIGINAL_SAMPLE_COUNT = 73;
    00116
    00117 typedef uint16 SoundID;
    00118
    00119 #endif /* SOUND_TYPE_H */