newgrf_sound.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef NEWGRF_SOUND_H
00013 #define NEWGRF_SOUND_H
00014
00015 #include "sound_type.h"
00016 #include "tile_type.h"
00017 #include "vehicle_type.h"
00018
00019 enum VehicleSoundEvent {
00020 VSE_START = 1,
00021 VSE_TUNNEL = 2,
00022 VSE_BREAKDOWN = 3,
00023 VSE_RUNNING = 4,
00024 VSE_TOUCHDOWN = 5,
00025 VSE_TRAIN_EFFECT = 6,
00026 VSE_RUNNING_16 = 7,
00027 VSE_STOPPED_16 = 8,
00028 VSE_LOAD_UNLOAD = 9,
00029 };
00030
00031
00032 SoundEntry *AllocateSound();
00033 void InitializeSoundPool();
00034 SoundEntry *GetSound(SoundID sound_id);
00035 uint GetNumSounds();
00036 bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event);
00037 bool PlayTileSound(const struct GRFFile *file, SoundID sound_id, TileIndex tile);
00038
00039 #endif