(svn r12817) -Feature: the ability to play NewGRF sounds for industries and stations.

This commit is contained in:
rubidium
2008-04-21 11:29:01 +00:00
parent 2a779a5e10
commit a40bba8bac
7 changed files with 35 additions and 13 deletions

View File

@@ -69,9 +69,11 @@ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event)
return true;
}
bool PlayHouseSound(uint16 sound_id, TileIndex tile)
bool PlayTileSound(const GRFFile *file, uint16 sound_id, TileIndex tile)
{
if (sound_id < GetNumOriginalSounds()) {
if (sound_id >= GetNumOriginalSounds()) sound_id += file->sound_offset - GetNumOriginalSounds();
if (sound_id < GetNumSounds()) {
SndPlayTileFx((SoundFx)sound_id, tile);
return true;
}