function Road::_GetDirectionEfficient(from, to, is_bridge, map_size_x = Road._map_size_x) { if (!is_bridge && AITile.GetSlope(to) == AITile.SLOPE_FLAT) return 0xFF; local diff = from - to; switch (diff) { case 1: return 1; case -1: return 2; case map_size_x: return 4; case -map_size_x: return 8; default: assert(false); } }