diff options
author | rubidium <rubidium@openttd.org> | 2009-05-17 17:17:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-17 17:17:48 +0000 |
commit | 9c24e2bb8fdc29620ea8d73ecec9c93e8e3b3e53 (patch) | |
tree | 1b503e6d6551d4e0b93ceeaa187e88e3797ea7af /src/sound.cpp | |
parent | e3bd95e7b6694a68a73bbb2649d6f96092e2e313 (diff) | |
download | openttd-9c24e2bb8fdc29620ea8d73ecec9c93e8e3b3e53.tar.xz |
(svn r16340) -Codechange: introduce SoundID (uint16) and use that instead of SoundFX, which was used as a byte and uint16 at different places, when the uint16 sound ID is meant.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r-- | src/sound.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sound.cpp b/src/sound.cpp index a12b2b840..b5bc93ec5 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -123,11 +123,11 @@ bool SoundInitialize(const char *filename) } /* Low level sound player */ -static void StartSound(uint sound, int panning, uint volume) +static void StartSound(SoundID sound_id, int panning, uint volume) { if (volume == 0) return; - const FileEntry *fe = GetSound(sound); + const FileEntry *fe = GetSound(sound_id); if (fe == NULL) return; MixerChannel *mc = MxAllocateChannel(); @@ -195,7 +195,7 @@ void SndCopyToPool() * @param top Top edge of virtual coordinates where the sound is produced * @param bottom Bottom edge of virtual coordinates where the sound is produced */ -static void SndPlayScreenCoordFx(SoundFx sound, int left, int right, int top, int bottom) +static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, int bottom) { if (msf.effect_vol == 0) return; @@ -220,7 +220,7 @@ static void SndPlayScreenCoordFx(SoundFx sound, int left, int right, int top, in } } -void SndPlayTileFx(SoundFx sound, TileIndex tile) +void SndPlayTileFx(SoundID sound, TileIndex tile) { /* emits sound from center of the tile */ int x = min(MapMaxX() - 1, TileX(tile)) * TILE_SIZE + TILE_SIZE / 2; @@ -232,7 +232,7 @@ void SndPlayTileFx(SoundFx sound, TileIndex tile) SndPlayScreenCoordFx(sound, pt.x, pt2.x, pt.y, pt2.y); } -void SndPlayVehicleFx(SoundFx sound, const Vehicle *v) +void SndPlayVehicleFx(SoundID sound, const Vehicle *v) { SndPlayScreenCoordFx(sound, v->coord.left, v->coord.right, @@ -240,7 +240,7 @@ void SndPlayVehicleFx(SoundFx sound, const Vehicle *v) ); } -void SndPlayFx(SoundFx sound) +void SndPlayFx(SoundID sound) { StartSound(sound, 0, msf.effect_vol); } |