diff options
author | tron <tron@openttd.org> | 2004-12-04 09:26:39 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-04 09:26:39 +0000 |
commit | 291d25a88bfcc8fa5e10b383ceaf03c446e032f5 (patch) | |
tree | c64a0b16a280a9b4e7a310e747e96bca0821aa0e /train_cmd.c | |
parent | b88fc15e4744dd7bcba649ac399f1f07fbcab769 (diff) | |
download | openttd-291d25a88bfcc8fa5e10b383ceaf03c446e032f5.tar.xz |
(svn r925) Use sound enums
Also play the correct sound when a toyland road vehicle breaks down
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/train_cmd.c b/train_cmd.c index 568d1c90d..8f9b18782 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1243,7 +1243,12 @@ static void HandleLocomotiveSmokeCloud(Vehicle *v) static void TrainPlayLeaveStationSound(Vehicle *v) { - static const byte sfx[3] = { 0x2, 0x8, 0x8 }; + static const SoundFx sfx[] = { + SND_04_TRAIN, + SND_0A_TRAIN_HORN, + SND_0A_TRAIN_HORN + }; + int engtype = v->engine_type; switch (_engines[engtype].railtype) { @@ -2007,7 +2012,7 @@ static void CheckTrainCollision(Vehicle *v) 0); ModifyStationRatingAround(v->tile, v->owner, -160, 30); - SndPlayVehicleFx(17, v); + SndPlayVehicleFx(SND_13_BIG_CRASH, v); } static void *CheckVehicleAtSignal(Vehicle *v, void *data) @@ -2320,7 +2325,8 @@ static void HandleBrokenTrain(Vehicle *v) InvalidateWindow(WC_VEHICLE_VIEW, v->index); InvalidateWindow(WC_VEHICLE_DETAILS, v->index); - SndPlayVehicleFx((_opt.landscape != LT_CANDY) ? 0xE : 0x3A, v); + SndPlayVehicleFx((_opt.landscape != LT_CANDY) ? + SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v); if (!(v->vehstatus & VS_HIDDEN)) { Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE); @@ -2417,7 +2423,7 @@ static void TrainCheckIfLineEnds(Vehicle *v) if (IS_TILETYPE(tile, MP_STREET) && (_map5[tile] & 0xF0)==0x10) { if (!(_map5[tile] & 4)) { _map5[tile] |= 4; - SndPlayVehicleFx(12, v); + SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v); MarkTileDirtyByTile(tile); } } |