road_cmd.c
changeset 1313 f1013ec3d318
parent 1281 dd226de69402
child 1327 6e507eb10edd
equal deleted inserted replaced
1312:594340ca5b87 1313:f1013ec3d318
     9 #include "player.h"
     9 #include "player.h"
    10 #include "town.h"
    10 #include "town.h"
    11 #include "gfx.h"
    11 #include "gfx.h"
    12 #include "npf.h"
    12 #include "npf.h"
    13 #include "sound.h"
    13 #include "sound.h"
       
    14 #include "depot.h"
    14 
    15 
    15 /* When true, GetTrackStatus for roads will treat roads under reconstruction
    16 /* When true, GetTrackStatus for roads will treat roads under reconstruction
    16  * as normal roads instead of impassable. This is used when detecting whether
    17  * as normal roads instead of impassable. This is used when detecting whether
    17  * a road can be removed. This is of course ugly, but I don't know a better
    18  * a road can be removed. This is of course ugly, but I don't know a better
    18  * solution just like that... */
    19  * solution just like that... */
   112 		_error_message = STR_2009_LOCAL_AUTHORITY_REFUSES;
   113 		_error_message = STR_2009_LOCAL_AUTHORITY_REFUSES;
   113 		return false;
   114 		return false;
   114 	}
   115 	}
   115 
   116 
   116 	return true;
   117 	return true;
   117 }
       
   118 
       
   119 bool IsRoadDepotTile(TileIndex tile)
       
   120 {
       
   121 	return IsTileType(tile, MP_STREET) &&
       
   122 					(_map5[tile] & 0xF0) == 0x20;
       
   123 }
   118 }
   124 
   119 
   125 uint GetRoadBitsByTile(TileIndex tile)
   120 uint GetRoadBitsByTile(TileIndex tile)
   126 {
   121 {
   127 	uint32 r = GetTileTrackStatus(tile, TRANSPORT_ROAD);
   122 	uint32 r = GetTileTrackStatus(tile, TRANSPORT_ROAD);