Handling NewGRF provided sounds. More...
#include "stdafx.h"
#include "engine_base.h"
#include "newgrf.h"
#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "vehicle_base.h"
#include "sound_func.h"
Go to the source code of this file.
Functions | |
SoundEntry * | AllocateSound () |
void | InitializeSoundPool () |
SoundEntry * | GetSound (SoundID index) |
uint | GetNumSounds () |
bool | PlayVehicleSound (const Vehicle *v, VehicleSoundEvent event) |
Checks whether a NewGRF wants to play a different vehicle sound effect. | |
bool | PlayTileSound (const GRFFile *file, SoundID sound_id, TileIndex tile) |
Variables | |
static SmallVector< SoundEntry, 8 > | _sounds |
Handling NewGRF provided sounds.
Definition in file newgrf_sound.cpp.
bool PlayVehicleSound | ( | const Vehicle * | v, | |
VehicleSoundEvent | event | |||
) |
Checks whether a NewGRF wants to play a different vehicle sound effect.
v | Vehicle to play sound effect for. | |
event | Trigger for the sound effect. |
Definition at line 60 of file newgrf_sound.cpp.
References CALLBACK_FAILED, CBID_VEHICLE_SOUND_EFFECT, CBM_VEHICLE_SOUND_EFFECT, Vehicle::engine_type, GetEngineGRF(), GetVehicleCallback(), HasBit(), and ORIGINAL_SAMPLE_COUNT.
Referenced by AircraftController(), AircraftLandAirplane(), Vehicle::HandleBreakdown(), Train::PlayLeaveStationSound(), and Vehicle::ShowVisualEffect().