Changeset - r4081:0047ebb4c2d4
[Not reviewed]
master
0 3 0
tron - 18 years ago 2006-06-28 06:10:20
tron@openttd.org
(svn r5396) - Remove two fixed parameters
- Simplify an expresssion: c ? f(x) : f(y) -> f(c ? x : y)
3 files changed with 7 insertions and 12 deletions:
0 comments (0 inline, 0 general)
pathfind.c
Show inline comments
 
@@ -756,7 +756,7 @@ start_at:
 

	
 
				/* Check the rail type only if the train is *NOT* on top of a bridge. */
 
				if (!(IsBridgeTile(tile) && IsBridgeMiddle(tile) && GetBridgeAxis(tile) == DiagDirToAxis(direction))) {
 
					if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
 
					if (!HASBIT(tpf->railtypes, IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile))) {
 
						bits = 0;
 
						break;
 
					}
rail_cmd.c
Show inline comments
 
@@ -1205,7 +1205,7 @@ static void DrawSpecialBuilding(
 
 * @param snow Draw as snow
 
 * @param flat Always draw foundation
 
 */
 
static void DrawTrackBits(TileInfo* ti, TrackBits track, bool flat)
 
static void DrawTrackBits(TileInfo* ti, TrackBits track)
 
{
 
	const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
 
	PalSpriteID image;
 
@@ -1233,13 +1233,7 @@ static void DrawTrackBits(TileInfo* ti, 
 
	(image++, true);
 

	
 
	if (ti->tileh != SLOPE_FLAT) {
 
		int foundation;
 

	
 
		if (flat) {
 
			foundation = ti->tileh;
 
		} else {
 
			foundation = GetRailFoundation(ti->tileh, track);
 
		}
 
		uint foundation = GetRailFoundation(ti->tileh, track);
 

	
 
		if (foundation != 0) DrawFoundation(ti, foundation);
 

	
 
@@ -1313,7 +1307,7 @@ static void DrawTile_Track(TileInfo *ti)
 
	if (GetRailTileType(ti->tile) != RAIL_TILE_DEPOT_WAYPOINT) {
 
		TrackBits rails = GetTrackBits(ti->tile);
 

	
 
		DrawTrackBits(ti, rails, false);
 
		DrawTrackBits(ti, rails);
 

	
 
		if (_display_opt & DO_FULL_DETAIL) DrawTrackDetails(ti);
 

	
road_cmd.c
Show inline comments
 
@@ -696,8 +696,9 @@ const byte _road_sloped_sprites[14] = {
 
 * @param ti TileInfo
 
 * @param road RoadBits to draw
 
 */
 
static void DrawRoadBits(TileInfo* ti, RoadBits road)
 
static void DrawRoadBits(TileInfo* ti)
 
{
 
	RoadBits road = GetRoadBits(ti->tile);
 
	const DrawRoadTileStruct *drts;
 
	PalSpriteID image = 0;
 
	Roadside roadside;
 
@@ -752,7 +753,7 @@ static void DrawTile_Road(TileInfo *ti)
 
{
 
	switch (GetRoadTileType(ti->tile)) {
 
		case ROAD_TILE_NORMAL:
 
			DrawRoadBits(ti, GetRoadBits(ti->tile));
 
			DrawRoadBits(ti);
 
			break;
 

	
 
		case ROAD_TILE_CROSSING: {
0 comments (0 inline, 0 general)