diff options
author | frosch <frosch@openttd.org> | 2011-07-02 11:28:22 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-07-02 11:28:22 +0000 |
commit | 4e5534f85e349d3b18a4a806365dd8712b8a0ea8 (patch) | |
tree | 14c34511a35530fd2ddce82a87b03b08969548f0 /src/newgrf_sound.cpp | |
parent | ff52f85b9eaaf6781cee1c1e43138b6332e7b481 (diff) | |
download | openttd-4e5534f85e349d3b18a4a806365dd8712b8a0ea8.tar.xz |
(svn r22615) -Codechange: The return value of PlayTileSound() has no purpose. Remove it and document the rest.
Diffstat (limited to 'src/newgrf_sound.cpp')
-rw-r--r-- | src/newgrf_sound.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index e5ab65d90..6151f4cb3 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -86,15 +86,20 @@ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event) return true; } -bool PlayTileSound(const GRFFile *file, SoundID sound_id, TileIndex tile) +/** + * Play a NewGRF sound effect at the location of a specfic tile. + * @param file NewGRF triggering the sound effect. + * @param sound_id Sound effect the NewGRF wants to play. + * @param tile Location of the effect. + */ +void PlayTileSound(const GRFFile *file, SoundID sound_id, TileIndex tile) { if (sound_id >= ORIGINAL_SAMPLE_COUNT) { sound_id -= ORIGINAL_SAMPLE_COUNT; - if (sound_id > file->num_sounds) return false; + if (sound_id > file->num_sounds) return; sound_id += file->sound_offset; } assert(sound_id < GetNumSounds()); SndPlayTileFx(sound_id, tile); - return true; } |