waypoint.c
changeset 3900 4984308f9125
parent 3792 2eb8388731bf
child 3933 a5f08e17f4a0
equal deleted inserted replaced
3899:4c5b1de6cb17 3900:4984308f9125
    15 #include "town.h"
    15 #include "town.h"
    16 #include "waypoint.h"
    16 #include "waypoint.h"
    17 #include "variables.h"
    17 #include "variables.h"
    18 #include "table/strings.h"
    18 #include "table/strings.h"
    19 #include "vehicle.h"
    19 #include "vehicle.h"
       
    20 #include "yapf/yapf.h"
    20 
    21 
    21 enum {
    22 enum {
    22 	/* Max waypoints: 64000 (8 * 8000) */
    23 	/* Max waypoints: 64000 (8 * 8000) */
    23 	WAYPOINT_POOL_BLOCK_SIZE_BITS = 3,       /* In bits, so (1 << 3) == 8 */
    24 	WAYPOINT_POOL_BLOCK_SIZE_BITS = 3,       /* In bits, so (1 << 3) == 8 */
    24 	WAYPOINT_POOL_MAX_BLOCKS      = 8000,
    25 	WAYPOINT_POOL_MAX_BLOCKS      = 8000,
   301 			MakeRailNormal(tile, GetTileOwner(tile), GetRailWaypointBits(tile), GetRailType(tile));
   302 			MakeRailNormal(tile, GetTileOwner(tile), GetRailWaypointBits(tile), GetRailType(tile));
   302 			MarkTileDirtyByTile(tile);
   303 			MarkTileDirtyByTile(tile);
   303 		} else {
   304 		} else {
   304 			DoClearSquare(tile);
   305 			DoClearSquare(tile);
   305 			SetSignalsOnBothDir(tile, GetRailWaypointTrack(tile));
   306 			SetSignalsOnBothDir(tile, GetRailWaypointTrack(tile));
       
   307 			YapfNotifyTrackLayoutChange(tile, GetRailWaypointTrack(tile));
   306 		}
   308 		}
   307 	}
   309 	}
   308 
   310 
   309 	return _price.remove_train_depot;
   311 	return _price.remove_train_depot;
   310 }
   312 }