Changeset - r22602:fa09f5d57048
[Not reviewed]
master
0 1 0
peter1138 - 8 years ago 2017-03-20 18:14:22
peter1138@openttd.org
(svn r27813) -Change: Remove _road_enter_dir_to_reachable_trackdirs

_road_enter_dir_to_reachable_trackdirs was just a copy of
DiagdirReachesTrackdirs. (cirdan)
1 file changed with 1 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -66,20 +66,12 @@ assert_compile(lengthof(_roadveh_images)
 
template <>
 
bool IsValidImageIndex<VEH_ROAD>(uint8 image_index)
 
{
 
	return image_index < lengthof(_roadveh_images);
 
}
 

	
 
/** 'Convert' the DiagDirection where a road vehicle enters to the trackdirs it can drive onto */
 
static const TrackdirBits _road_enter_dir_to_reachable_trackdirs[DIAGDIR_END] = {
 
	TRACKDIR_BIT_LEFT_N  | TRACKDIR_BIT_LOWER_E | TRACKDIR_BIT_X_NE,    // Enter from north east
 
	TRACKDIR_BIT_LEFT_S  | TRACKDIR_BIT_UPPER_E | TRACKDIR_BIT_Y_SE,    // Enter from south east
 
	TRACKDIR_BIT_UPPER_W | TRACKDIR_BIT_X_SW    | TRACKDIR_BIT_RIGHT_S, // Enter from south west
 
	TRACKDIR_BIT_RIGHT_N | TRACKDIR_BIT_LOWER_W | TRACKDIR_BIT_Y_NW     // Enter from north west
 
};
 

	
 
static const Trackdir _road_reverse_table[DIAGDIR_END] = {
 
	TRACKDIR_RVREV_NE, TRACKDIR_RVREV_SE, TRACKDIR_RVREV_SW, TRACKDIR_RVREV_NW
 
};
 

	
 
/** Converts the exit direction of a depot to trackdir the vehicle is going to drive to */
 
static const Trackdir _roadveh_depot_exit_trackdir[DIAGDIR_END] = {
 
@@ -932,13 +924,13 @@ static Trackdir RoadFindPathToDest(RoadV
 
	/* The above lookups should be moved to GetTileTrackStatus in the
 
	 * future, but that requires more changes to the pathfinder and other
 
	 * stuff, probably even more arguments to GTTS.
 
	 */
 

	
 
	/* Remove tracks unreachable from the enter dir */
 
	trackdirs &= _road_enter_dir_to_reachable_trackdirs[enterdir];
 
	trackdirs &= DiagdirReachesTrackdirs(enterdir);
 
	if (trackdirs == TRACKDIR_BIT_NONE) {
 
		/* No reachable tracks, so we'll reverse */
 
		return_track(_road_reverse_table[enterdir]);
 
	}
 

	
 
	if (v->reverse_ctr != 0) {
0 comments (0 inline, 0 general)