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 | e56c3cddd8fcf8c852ee7f3c8dc49df9623a94d0 (patch) | |
tree | c64a0b16a280a9b4e7a310e747e96bca0821aa0e /rail_gui.c | |
parent | d036559e0ed75f6357e129f2d78808240519fc78 (diff) | |
download | openttd-e56c3cddd8fcf8c852ee7f3c8dc49df9623a94d0.tar.xz |
(svn r925) Use sound enums
Also play the correct sound when a toyland road vehicle breaks down
Diffstat (limited to 'rail_gui.c')
-rw-r--r-- | rail_gui.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/rail_gui.c b/rail_gui.c index 05040cb84..a166a4c6f 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -33,7 +33,7 @@ typedef void OnButtonClick(Window *w); static void CcPlaySound1E(bool success, uint tile, uint32 p1, uint32 p2) { - if (success) SndPlayTileFx(0x1E, tile); + if (success) SndPlayTileFx(SND_20_SPLAT_2, tile); } static void GenericPlaceRail(uint tile, int cmd) @@ -96,7 +96,7 @@ static void CcDepot(bool success, uint tile, uint32 p1, uint32 p2) if (success) { int dir = p2; - SndPlayTileFx(0x1E, tile); + SndPlayTileFx(SND_20_SPLAT_2, tile); ResetObjectToPlace(); tile += _place_depot_offs_xy[dir]; @@ -127,7 +127,7 @@ static void PlaceRail_Waypoint(uint tile) static void CcStation(bool success, uint tile, uint32 p1, uint32 p2) { if (success) { - SndPlayTileFx(0x1E, tile); + SndPlayTileFx(SND_20_SPLAT_2, tile); ResetObjectToPlace(); } } @@ -183,7 +183,7 @@ static void PlaceRail_Bridge(uint tile) static void CcBuildTunnel(bool success, uint tile, uint32 p1, uint32 p2) { if (success) { - SndPlayTileFx(0x1E, tile); + SndPlayTileFx(SND_20_SPLAT_2, tile); ResetObjectToPlace(); } else { SetRedErrorSquare(_build_tunnel_endtile); @@ -287,7 +287,7 @@ static void BuildRailClick_Remove(Window *w) if (w->disabled_state & (1<<16)) return; SetWindowDirty(w); - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); _thd.make_square_red = !!((w->click_state ^= (1 << 16)) & (1<<16)); MarkTileDirty(_thd.pos.x, _thd.pos.y); @@ -900,7 +900,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) { case 3: case 4: _railstation.orientation = e->click.widget - 3; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; @@ -913,7 +913,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) { case 11: _railstation.numtracks = (e->click.widget - 5) + 1; _railstation.dragdrop = false; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; @@ -926,20 +926,20 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) { case 18: _railstation.platlength = (e->click.widget - 12) + 1; _railstation.dragdrop = false; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; case 19: _railstation.dragdrop ^= true; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; case 20: case 21: _station_show_coverage = e->click.widget - 20; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; } @@ -1025,7 +1025,7 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e) case 5: case 6: _build_depot_direction = e->click.widget - 3; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; } @@ -1091,7 +1091,7 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e) case 6: case 7: _cur_waypoint_type = e->click.widget - 3; - SndPlayFx(0x13); + SndPlayFx(SND_15_BEEP); SetWindowDirty(w); break; } |