Changeset - r14123:a73ffee57a40
[Not reviewed]
master
0 1 0
peter1138 - 15 years ago 2010-01-01 18:10:50
peter1138@openttd.org
(svn r18680) -Fix: Whole station area is already correct size.
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_station.cpp
Show inline comments
 
@@ -52,50 +52,48 @@ struct ETileArea : TileArea {
 
			default: NOT_REACHED();
 

	
 
			case TA_TILE:
 
				this->tile = tile;
 
				this->w    = 1;
 
				this->h    = 1;
 
				break;
 

	
 
			case TA_PLATFORM: {
 
				TileIndex start, end;
 
				Axis axis = GetRailStationAxis(tile);
 
				TileIndexDiff delta = TileOffsByDiagDir(AxisToDiagDir(axis));
 

	
 
				for (end = tile; IsRailStationTile(end + delta) && IsCompatibleTrainStationTile(tile, end + delta); end += delta) { /* Nothing */ }
 
				for (start = tile; IsRailStationTile(start - delta) && IsCompatibleTrainStationTile(tile, start - delta); start -= delta) { /* Nothing */ }
 

	
 
				this->tile = start;
 
				this->w = TileX(end) - TileX(start) + 1;
 
				this->h = TileY(end) - TileY(start) + 1;
 
				break;
 
			}
 

	
 
			case TA_WHOLE:
 
				st->GetTileArea(this, Station::IsExpected(st) ? STATION_RAIL : STATION_WAYPOINT);
 
				this->w++;
 
				this->h++;
 
				break;
 
		}
 
	}
 
};
 

	
 

	
 
/**
 
 * Reset station classes to their default state.
 
 * This includes initialising the Default and Waypoint classes with an empty
 
 * entry, for standard stations and waypoints.
 
 */
 
void ResetStationClasses()
 
{
 
	for (StationClassID i = STAT_CLASS_BEGIN; i < STAT_CLASS_MAX; i++) {
 
		_station_classes[i].id = 0;
 
		_station_classes[i].name = STR_EMPTY;
 
		_station_classes[i].stations = 0;
 

	
 
		free(_station_classes[i].spec);
 
		_station_classes[i].spec = NULL;
 
	}
 

	
 
	/* Set up initial data */
 
	_station_classes[0].id = 'DFLT';
0 comments (0 inline, 0 general)