# sound_type.h

Go to the documentation of this file.

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