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/newgrf.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/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 1a4a2ca33..10529b189 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -811,7 +811,7 @@ static ChangeInfoResult RoadVehicleChangeInfo(uint engine, int numinfo, int prop break; case 0x12: // SFX - rvi->sfx = (SoundFx)grf_load_byte(&buf); + rvi->sfx = grf_load_byte(&buf); break; case 0x13: // Power in 10hp @@ -937,7 +937,7 @@ static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop break; case 0x10: // SFX - svi->sfx = (SoundFx)grf_load_byte(&buf); + svi->sfx = grf_load_byte(&buf); break; case 0x11: // Cargos available for refitting @@ -1053,7 +1053,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int break; case 0x12: // SFX - avi->sfx = (SoundFx)grf_load_byte(&buf); + avi->sfx = grf_load_byte(&buf); break; case 0x13: // Cargos available for refitting @@ -2020,7 +2020,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, b } for (int i = 0; i < numinfo; i++) { - uint sound = sid + i + _cur_grffile->sound_offset - ORIGINAL_SAMPLE_COUNT; + SoundID sound = sid + i + _cur_grffile->sound_offset - ORIGINAL_SAMPLE_COUNT; if (sound >= GetNumSounds()) { grfmsg(1, "SoundEffectChangeInfo: Sound %d not defined (max %d)", sound, GetNumSounds()); @@ -2037,7 +2037,7 @@ static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, b break; case 0x0A: { // Override old sound - uint orig_sound = grf_load_byte(&buf); + SoundID orig_sound = grf_load_byte(&buf); if (orig_sound >= ORIGINAL_SAMPLE_COUNT) { grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, ORIGINAL_SAMPLE_COUNT); |