Changeset - r21328:def02569ef03
[Not reviewed]
master
0 7 0
frosch - 11 years ago 2014-03-23 13:28:32
frosch@openttd.org
(svn r26422) -Fix [FS#5946]: Some road constructions used the rail sound effect. Rename the enum items to properly reflect their purpose.
7 files changed with 18 insertions and 18 deletions:
0 comments (0 inline, 0 general)
src/airport_gui.cpp
Show inline comments
 
@@ -44,7 +44,7 @@ void CcBuildAirport(const CommandCost &r
 
{
 
	if (result.Failed()) return;
 

	
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
}
 

	
src/dock_gui.cpp
Show inline comments
 
@@ -41,13 +41,13 @@ void CcBuildDocks(const CommandCost &res
 
{
 
	if (result.Failed()) return;
 

	
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
}
 

	
 
void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
 
}
 

	
 

	
src/rail_gui.cpp
Show inline comments
 
@@ -86,7 +86,7 @@ static bool IsStationAvailable(const Sta
 

	
 
void CcPlaySound1E(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
 
}
 

	
 
static void GenericPlaceRail(TileIndex tile, int cmd)
 
@@ -133,7 +133,7 @@ void CcRailDepot(const CommandCost &resu
 

	
 
	DiagDirection dir = (DiagDirection)p2;
 

	
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 

	
 
	tile += TileOffsByDiagDir(dir);
 
@@ -171,7 +171,7 @@ void CcStation(const CommandCost &result
 
{
 
	if (result.Failed()) return;
 

	
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
 
	/* Only close the station builder window if the default station and non persistent building is chosen. */
 
	if (_railstation.station_class == STAT_CLASS_DFLT && _railstation.station_type == 0 && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
}
 
@@ -272,7 +272,7 @@ static void PlaceRail_Bridge(TileIndex t
 
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded()) {
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
 
		if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
	} else {
 
		SetRedErrorSquare(_build_tunnel_endtile);
src/road_gui.cpp
Show inline comments
 
@@ -63,7 +63,7 @@ static DiagDirection _road_station_picke
 

	
 
void CcPlaySound1D(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
	if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
}
 

	
 
/**
 
@@ -93,7 +93,7 @@ static void PlaceRoad_Bridge(TileIndex t
 
void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded()) {
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, start_tile);
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, start_tile);
 
		if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 

	
 
		DiagDirection start_direction = ReverseDiagDir(GetTunnelBridgeDirection(start_tile));
 
@@ -174,7 +174,7 @@ void CcRoadDepot(const CommandCost &resu
 
	if (result.Failed()) return;
 

	
 
	DiagDirection dir = (DiagDirection)GB(p1, 0, 2);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
	ConnectRoadToStructure(tile, dir);
 
}
 
@@ -198,7 +198,7 @@ void CcRoadStop(const CommandCost &resul
 
	if (result.Failed()) return;
 

	
 
	DiagDirection dir = (DiagDirection)GB(p2, 6, 2);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
	TileArea roadstop_area(tile, GB(p1, 0, 8), GB(p1, 8, 8));
 
	TILE_AREA_LOOP(cur_tile, roadstop_area) {
src/sound_type.h
Show inline comments
 
@@ -26,7 +26,7 @@ struct SoundEntry {
 

	
 
enum SoundFx {
 
	SND_BEGIN = 0,
 
	SND_02_SPLAT = 0,                          //  0 == 0x00 !
 
	SND_02_SPLAT_WATER = 0,                ///< Water construction.
 
	SND_03_FACTORY_WHISTLE,
 
	SND_04_TRAIN,
 
	SND_05_TRAIN_THROUGH_TUNNEL,
 
@@ -55,8 +55,8 @@ enum SoundFx {
 
	SND_1C_TRUCK_START_2,
 
	SND_1D_APPLAUSE,
 
	SND_1E_OOOOH,
 
	SND_1F_SPLAT,                          // 29 == 0x1D
 
	SND_20_SPLAT_2,                        // 30 == 0x1E
 
	SND_1F_SPLAT_OTHER,                    ///< Non-water non-rail construction.
 
	SND_20_SPLAT_RAIL,                     ///< Rail construction.
 
	SND_21_JACKHAMMER,
 
	SND_22_CAR_HORN,
 
	SND_23_CAR_HORN_2,
src/terraform_gui.cpp
Show inline comments
 
@@ -40,7 +40,7 @@
 
void CcTerraform(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
 
{
 
	if (result.Succeeded()) {
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
	} else {
 
		extern TileIndex _terraform_err_tile;
 
		SetRedErrorSquare(_terraform_err_tile);
 
@@ -88,7 +88,7 @@ static void GenerateRockyArea(TileIndex 
 
		success = true;
 
	}
 

	
 
	if (success && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, end);
 
	if (success && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, end);
 
}
 

	
 
/**
 
@@ -409,7 +409,7 @@ static void CommonRaiseLowerBigLand(Tile
 

	
 
		if (ta.w == 0 || ta.h == 0) return;
 

	
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
		if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 

	
 
		uint h;
 
		if (mode != 0) {
src/town_gui.cpp
Show inline comments
 
@@ -958,7 +958,7 @@ void CcFoundTown(const CommandCost &resu
 
{
 
	if (result.Failed()) return;
 

	
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
 
	if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
 
	if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
 
}
 

	
0 comments (0 inline, 0 general)