Changeset - r15789:c3566de65d78
[Not reviewed]
master
1 10 0
yexo - 14 years ago 2010-08-12 21:36:43
yexo@openttd.org
(svn r20474) -Cleanup: remove some unused code
11 files changed with 4 insertions and 166 deletions:
0 comments (0 inline, 0 general)
projects/openttd_vs100.vcxproj
Show inline comments
 
@@ -1016,7 +1016,6 @@
 
    <ClInclude Include="..\src\misc\blob.hpp" />
 
    <ClCompile Include="..\src\misc\countedobj.cpp" />
 
    <ClInclude Include="..\src\misc\countedptr.hpp" />
 
    <ClInclude Include="..\src\misc\crc32.hpp" />
 
    <ClCompile Include="..\src\misc\dbg_helpers.cpp" />
 
    <ClInclude Include="..\src\misc\dbg_helpers.h" />
 
    <ClInclude Include="..\src\misc\fixedsizearray.hpp" />
projects/openttd_vs100.vcxproj.filters
Show inline comments
 
@@ -2251,9 +2251,6 @@
 
    <ClInclude Include="..\src\misc\countedptr.hpp">
 
      <Filter>Misc</Filter>
 
    </ClInclude>
 
    <ClInclude Include="..\src\misc\crc32.hpp">
 
      <Filter>Misc</Filter>
 
    </ClInclude>
 
    <ClCompile Include="..\src\misc\dbg_helpers.cpp">
 
      <Filter>Misc</Filter>
 
    </ClCompile>
projects/openttd_vs80.vcproj
Show inline comments
 
@@ -3408,10 +3408,6 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\misc\crc32.hpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\misc\dbg_helpers.cpp"
 
				>
 
			</File>
projects/openttd_vs90.vcproj
Show inline comments
 
@@ -3405,10 +3405,6 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\misc\crc32.hpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\misc\dbg_helpers.cpp"
 
				>
 
			</File>
source.list
Show inline comments
 
@@ -802,7 +802,6 @@ misc/binaryheap.hpp
 
misc/blob.hpp
 
misc/countedobj.cpp
 
misc/countedptr.hpp
 
misc/crc32.hpp
 
misc/dbg_helpers.cpp
 
misc/dbg_helpers.h
 
misc/fixedsizearray.hpp
src/aircraft_cmd.cpp
Show inline comments
 
@@ -141,28 +141,6 @@ static StationID FindNearestHangar(const
 
	return index;
 
}
 

	
 
#if 0
 
/**
 
 * Check if given vehicle has a goto hangar in his orders
 
 * @param v vehicle to inquiry
 
 * @return true if vehicle v has an airport in the schedule, that has a hangar
 
 */
 
static bool HaveHangarInOrderList(Aircraft *v)
 
{
 
	const Order *order;
 

	
 
	FOR_VEHICLE_ORDERS(v, order) {
 
		const Station *st = Station::Get(order->station);
 
		if (st->owner == v->owner && (st->facilities & FACIL_AIRPORT)) {
 
			/* If an airport doesn't have a hangar, skip it */
 
			if (st->Airport()->nof_depots != 0) return true;
 
		}
 
	}
 

	
 
	return false;
 
}
 
#endif
 

	
 
SpriteID Aircraft::GetImage(Direction direction) const
 
{
 
	uint8 spritenum = this->spritenum;
src/misc/crc32.hpp
Show inline comments
 
deleted file
src/music_gui.cpp
Show inline comments
 
@@ -717,13 +717,6 @@ struct MusicWindow : public Window {
 
				break;
 
		}
 
	}
 

	
 
#if 0
 
	virtual void OnTick()
 
	{
 
		this->SetWidgetDirty(MW_GAUGE);
 
	}
 
#endif
 
};
 

	
 
static const NWidgetPart _nested_music_window_widgets[] = {
src/newgrf.cpp
Show inline comments
 
@@ -4317,22 +4317,6 @@ static void FeatureNewName(ByteReader *b
 
						break;
 
				}
 
				break;
 

	
 
#if 0
 
				case GSF_CANALS:
 
				case GSF_BRIDGES:
 
					AddGRFString(_cur_spriteid, id, lang, name);
 
					switch (GB(id, 8, 8)) {
 
						case 0xC9: // House name
 
						default:
 
							grfmsg(7, "FeatureNewName: Unsupported ID (0x%04X)", id);
 
					}
 
					break;
 

	
 
				default :
 
					grfmsg(7, "FeatureNewName: Unsupported feature (0x%02X)", feature);
 
					break;
 
#endif
 
		}
 
	}
 
}
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -124,15 +124,6 @@ static uint NPFDistanceTrack(TileIndex t
 
	return diagTracks * NPF_TILE_LENGTH + straightTracks * NPF_TILE_LENGTH * STRAIGHT_TRACK_LENGTH;
 
}
 

	
 

	
 
#if 0
 
static uint NTPHash(uint key1, uint key2)
 
{
 
	/* This function uses the old hash, which is fixed on 10 bits (1024 buckets) */
 
	return PATHFIND_HASH_TILE(key1);
 
}
 
#endif
 

	
 
/**
 
 * Calculates a hash value for use in the NPF.
 
 * @param key1 The TileIndex of the tile to hash
src/tgp.cpp
Show inline comments
 
@@ -890,26 +890,6 @@ static double int_noise(const long x, co
 

	
 

	
 
/**
 
 * Hj. Malthaner's routine included 2 different noise smoothing methods.
 
 * We now use the "raw" int_noise one.
 
 * However, it may be useful to move to the other routine in future.
 
 * So it is included too.
 
 */
 
static double smoothed_noise(const int x, const int y, const int prime)
 
{
 
#if 0
 
	/* A hilly world (four corner smooth) */
 
	const double sides = int_noise(x - 1, y) + int_noise(x + 1, y) + int_noise(x, y - 1) + int_noise(x, y + 1);
 
	const double center  =  int_noise(x, y);
 
	return (sides + sides + center * 4) / 8.0;
 
#endif
 

	
 
	/* This gives very hilly world */
 
	return int_noise(x, y, prime);
 
}
 

	
 

	
 
/**
 
 * This routine determines the interpolated value between a and b
 
 */
 
static inline double linear_interpolate(const double a, const double b, const double x)
 
@@ -930,10 +910,10 @@ static double interpolated_noise(const d
 
	const double fractional_X = x - (double)integer_X;
 
	const double fractional_Y = y - (double)integer_Y;
 

	
 
	const double v1 = smoothed_noise(integer_X,     integer_Y,     prime);
 
	const double v2 = smoothed_noise(integer_X + 1, integer_Y,     prime);
 
	const double v3 = smoothed_noise(integer_X,     integer_Y + 1, prime);
 
	const double v4 = smoothed_noise(integer_X + 1, integer_Y + 1, prime);
 
	const double v1 = int_noise(integer_X,     integer_Y,     prime);
 
	const double v2 = int_noise(integer_X + 1, integer_Y,     prime);
 
	const double v3 = int_noise(integer_X,     integer_Y + 1, prime);
 
	const double v4 = int_noise(integer_X + 1, integer_Y + 1, prime);
 

	
 
	const double i1 = linear_interpolate(v1, v2, fractional_X);
 
	const double i2 = linear_interpolate(v3, v4, fractional_X);
0 comments (0 inline, 0 general)