src/road_cmd.cpp
changeset 8119 52b48108425a
parent 8116 8da76dcb3287
child 8121 3bc6351e7369
equal deleted inserted replaced
8118:fa5fe5491657 8119:52b48108425a
    11 #include "road_map.h"
    11 #include "road_map.h"
    12 #include "road_internal.h"
    12 #include "road_internal.h"
    13 #include "sprite.h"
    13 #include "sprite.h"
    14 #include "table/sprites.h"
    14 #include "table/sprites.h"
    15 #include "table/strings.h"
    15 #include "table/strings.h"
    16 #include "functions.h"
    16 #include "tile_cmd.h"
    17 #include "map.h"
    17 #include "map.h"
    18 #include "landscape.h"
    18 #include "landscape.h"
    19 #include "town_map.h"
    19 #include "town_map.h"
    20 #include "vehicle.h"
    20 #include "vehicle.h"
    21 #include "viewport.h"
    21 #include "viewport.h"
  1351  */
  1351  */
  1352 static const byte _roadveh_enter_depot_dir[4] = {
  1352 static const byte _roadveh_enter_depot_dir[4] = {
  1353 	TRACKDIR_X_SW, TRACKDIR_Y_NW, TRACKDIR_X_NE, TRACKDIR_Y_SE
  1353 	TRACKDIR_X_SW, TRACKDIR_Y_NW, TRACKDIR_X_NE, TRACKDIR_Y_SE
  1354 };
  1354 };
  1355 
  1355 
  1356 static uint32 VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
  1356 static VehicleEnterTileStatus VehicleEnter_Road(Vehicle *v, TileIndex tile, int x, int y)
  1357 {
  1357 {
  1358 	switch (GetRoadTileType(tile)) {
  1358 	switch (GetRoadTileType(tile)) {
  1359 		case ROAD_TILE_CROSSING:
  1359 		case ROAD_TILE_CROSSING:
  1360 			if (v->type == VEH_TRAIN && !IsCrossingBarred(tile)) {
  1360 			if (v->type == VEH_TRAIN && !IsCrossingBarred(tile)) {
  1361 				/* train crossing a road */
  1361 				/* train crossing a road */