src/tunnelbridge_cmd.cpp
changeset 8119 52b48108425a
parent 8116 8da76dcb3287
child 8131 160939e24ed3
equal deleted inserted replaced
8118:fa5fe5491657 8119:52b48108425a
    10 #include "bridge_map.h"
    10 #include "bridge_map.h"
    11 #include "rail_map.h"
    11 #include "rail_map.h"
    12 #include "road_map.h"
    12 #include "road_map.h"
    13 #include "table/sprites.h"
    13 #include "table/sprites.h"
    14 #include "table/strings.h"
    14 #include "table/strings.h"
    15 #include "functions.h"
    15 #include "tile_cmd.h"
    16 #include "map.h"
    16 #include "map.h"
    17 #include "landscape.h"
    17 #include "landscape.h"
    18 #include "tunnel_map.h"
    18 #include "tunnel_map.h"
    19 #include "unmovable_map.h"
    19 #include "unmovable_map.h"
    20 #include "vehicle.h"
    20 #include "vehicle.h"
  1255 static const byte _tunnel_fractcoord_4[4]    = {0x52, 0x85, 0x98, 0x29};
  1255 static const byte _tunnel_fractcoord_4[4]    = {0x52, 0x85, 0x98, 0x29};
  1256 static const byte _tunnel_fractcoord_5[4]    = {0x92, 0x89, 0x58, 0x25};
  1256 static const byte _tunnel_fractcoord_5[4]    = {0x92, 0x89, 0x58, 0x25};
  1257 static const byte _tunnel_fractcoord_6[4]    = {0x92, 0x89, 0x56, 0x45};
  1257 static const byte _tunnel_fractcoord_6[4]    = {0x92, 0x89, 0x56, 0x45};
  1258 static const byte _tunnel_fractcoord_7[4]    = {0x52, 0x85, 0x96, 0x49};
  1258 static const byte _tunnel_fractcoord_7[4]    = {0x52, 0x85, 0x96, 0x49};
  1259 
  1259 
  1260 static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y)
  1260 static VehicleEnterTileStatus VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y)
  1261 {
  1261 {
  1262 	int z = GetSlopeZ(x, y) - v->z_pos;
  1262 	int z = GetSlopeZ(x, y) - v->z_pos;
  1263 
  1263 
  1264 	if (abs(z) > 2) return VETSB_CANNOT_ENTER;
  1264 	if (abs(z) > 2) return VETSB_CANNOT_ENTER;
  1265 
  1265