10#include <glm/vec2.hpp>
11#include <glm/mat4x4.hpp>
17struct scenario_building_context;
88 dcon::province_adjacency_id
adj;
104 glm::mat3 globe_rotation,
float time_counter);
109 void set_drag_box(
bool draw_box, glm::vec2 pos1, glm::vec2 pos2, glm::vec2 pixel_size);
300void make_navy_path(
sys::state& state, std::vector<map::curved_line_vertex>& buffer, dcon::navy_id selected_navy,
float size_x,
float size_y);
301void make_army_path(
sys::state& state, std::vector<map::curved_line_vertex>& buffer, dcon::army_id selected_army,
float size_x,
float size_y);
302glm::vec2
put_in_local(glm::vec2 new_point, glm::vec2 base_point,
float size_x);
303void add_bezier_to_buffer(std::vector<map::curved_line_vertex>& buffer, glm::vec2 start, glm::vec2 end, glm::vec2 start_per, glm::vec2 end_per,
float progress,
bool last_curve,
float size_x,
float size_y,
uint32_t num_b_segments);
304void add_tl_bezier_to_buffer(std::vector<map::textured_line_vertex>& buffer, glm::vec2 start, glm::vec2 end, glm::vec2 start_per, glm::vec2 end_per,
float progress,
bool last_curve,
float size_x,
float size_y,
uint32_t num_b_segments,
float& distance);
305void add_tl_bezier_to_buffer(std::vector<map::textured_line_with_width_vertex>& buffer, glm::vec2 start, glm::vec2 end, glm::vec2 start_tangent, glm::vec2 end_tangent,
float progress,
bool last_curve,
float size_x,
float size_y,
uint32_t num_b_segments,
float& distance,
float width_start,
float width_end);
std::vector< textured_line_with_width_vertex > river_vertices
static constexpr uint32_t texture_diag_border_identifier
static constexpr uint32_t uniform_texture_sampler
void update_railroad_paths(sys::state &state)
static constexpr uint32_t uniform_colormap_water
static constexpr uint32_t shader_textured_line
static constexpr uint32_t texture_strategy_unit_arrow
void load_terrain_data(parsers::scenario_building_context &context)
std::vector< GLsizei > river_counts
void load_shaders(simple_fs::directory &root)
static constexpr uint32_t texture_array_province_color
GLuint texture_arrays[texture_array_count]
static constexpr uint32_t uniform_rotation
static constexpr uint32_t uniform_overlay
static constexpr uint32_t texture_sea_mask
static constexpr uint32_t shader_line_border
static constexpr uint32_t vo_coastal
std::vector< GLsizei > coastal_counts
void update_fog_of_war(sys::state &state)
GLuint vao_array[vo_count]
static constexpr uint32_t uniform_water_normal
static constexpr uint32_t uniform_stripes_texture
static constexpr uint32_t texture_colormap_water
static constexpr uint32_t texture_coastal_border
std::vector< GLint > coastal_starts
std::vector< text_line_vertex > province_text_line_vertices
std::vector< GLsizei > static_mesh_counts
std::vector< curved_line_vertex > retreat_unit_arrow_vertices
static constexpr uint32_t shader_map_standing_object
void load_map(sys::state &state)
void set_selected_province(sys::state &state, dcon::province_id province_id)
static constexpr uint32_t shader_count
std::vector< GLuint > text_line_texture_per_quad
static constexpr uint32_t shader_text_line
std::vector< text_line_vertex > text_line_vertices
static constexpr uint32_t uniform_diag_border_identifier
static constexpr uint32_t texture_imp_border
static constexpr uint32_t texture_array_count
static constexpr uint32_t vo_count
static constexpr uint32_t texture_province_fow
static constexpr uint32_t uniform_provinces_sea_mask
std::vector< GLsizei > strategy_unit_arrow_counts
static constexpr uint32_t uniform_opaque
static constexpr uint32_t texture_national_border
static constexpr uint32_t vo_land
static constexpr uint32_t vo_objective_unit_arrow
static constexpr uint32_t texture_hover_border
uint16_t safe_get_province(glm::ivec2 pt)
static constexpr uint32_t uniform_border_width
std::vector< border > borders
static constexpr uint32_t shader_line_unit_arrow
static constexpr uint32_t vo_province_text_line
std::vector< curved_line_vertex > attack_unit_arrow_vertices
static constexpr uint32_t vo_unit_arrow
std::vector< GLint > objective_unit_arrow_starts
static constexpr uint32_t shader_railroad_line
std::vector< GLint > river_starts
std::vector< uint8_t > median_terrain_type
static constexpr uint32_t uniform_province_highlight
static constexpr uint32_t texture_unit_arrow
void set_province_text_lines(sys::state &state, std::vector< text_line_generator_data > const &data)
std::vector< uint16_t > province_id_map
static constexpr uint32_t uniform_province_color
std::vector< uint8_t > diagonal_borders
void gen_prov_color_texture(GLuint texture_handle, std::vector< uint32_t > const &prov_color, uint8_t layers=1)
std::vector< textured_line_vertex_b > border_vertices
std::vector< curved_line_vertex > other_objective_unit_arrow_vertices
std::vector< GLint > static_mesh_starts
static constexpr uint32_t texture_prov_border
std::vector< GLsizei > other_objective_unit_arrow_counts
static constexpr uint32_t texture_terrain
GLuint static_mesh_textures[max_static_meshes]
std::vector< uint16_t > map_indices
static constexpr uint32_t vo_drag_box
static constexpr uint32_t vo_border
static constexpr uint32_t texture_overlay
std::vector< curved_line_vertex > unit_arrow_vertices
std::vector< GLsizei > retreat_unit_arrow_counts
std::vector< curved_line_vertex > strategy_unit_arrow_vertices
static constexpr uint32_t uniform_count
static constexpr uint32_t uniform_colormap_terrain
static constexpr uint32_t uniform_aspect_ratio
void update_borders(sys::state &state)
static constexpr uint32_t uniform_time
std::vector< textured_line_vertex_b > coastal_vertices
static constexpr uint32_t uniform_province_fow
static constexpr uint32_t uniform_offset
static constexpr uint32_t vo_attack_unit_arrow
static constexpr uint32_t uniform_terrain_texture_sampler
static constexpr uint32_t vo_other_objective_unit_arrow
void make_coastal_borders(sys::state &state, std::vector< bool > &visited)
std::vector< GLint > retreat_unit_arrow_starts
static constexpr uint32_t uniform_zoom
static constexpr uint32_t texture_array_terrainsheet
std::vector< uint8_t > terrain_id_map
static constexpr uint32_t texture_stripes
void load_border_data(parsers::scenario_building_context &context)
static constexpr uint32_t uniform_width
std::vector< GLsizei > objective_unit_arrow_counts
static constexpr uint32_t texture_retreat_unit_arrow
void load_provinces_mid_point(parsers::scenario_building_context &context)
void load_median_terrain_type(parsers::scenario_building_context &context)
static constexpr uint32_t uniform_is_black
void make_borders(sys::state &state, std::vector< bool > &visited)
static constexpr uint32_t uniform_subroutines_index_2
static constexpr uint32_t max_static_meshes
GLuint shader_uniforms[shader_count][uniform_count]
static constexpr uint32_t uniform_target_topview_fixup
static constexpr uint32_t texture_provinces
static constexpr uint32_t vo_static_mesh
void create_curved_river_vertices(parsers::scenario_building_context &context, std::vector< uint8_t > const &river_data, std::vector< uint8_t > const &terrain_data)
static constexpr uint32_t uniform_map_size
static constexpr uint32_t texture_railroad
GLuint shaders[shader_count]
static constexpr uint32_t vo_railroad
static constexpr uint32_t texture_water_normal
std::vector< GLint > attack_unit_arrow_starts
std::vector< GLsizei > unit_arrow_counts
void load_map_data(parsers::scenario_building_context &context)
static constexpr uint32_t texture_other_objective_unit_arrow
static constexpr uint32_t uniform_target_facing
static constexpr uint32_t shader_borders
void render(sys::state &state, glm::vec2 screen_size, glm::vec2 offset, float zoom, map_view map_view_mode, map_mode::mode active_map_mode, glm::mat3 globe_rotation, float time_counter)
static constexpr uint32_t uniform_line_texture
static constexpr uint32_t texture_objective_unit_arrow
static constexpr uint32_t vo_retreat_unit_arrow
void set_text_lines(sys::state &state, std::vector< text_line_generator_data > const &data)
static constexpr uint32_t uniform_gamma
void create_border_ogl_objects()
static constexpr uint32_t vo_strategy_unit_arrow
static constexpr uint32_t uniform_model_offset
static constexpr uint32_t texture_attack_unit_arrow
static constexpr uint32_t texture_province_highlight
uint32_t land_vertex_count
GLuint vbo_array[vo_count]
std::vector< GLint > railroad_starts
std::vector< GLsizei > attack_unit_arrow_counts
std::vector< GLint > strategy_unit_arrow_starts
std::vector< GLint > unit_arrow_starts
std::vector< uint32_t > province_area
static constexpr uint32_t texture_river_body
static constexpr uint32_t uniform_subroutines_index
std::vector< GLint > other_objective_unit_arrow_starts
static constexpr uint32_t shader_drag_box
static constexpr uint32_t uniform_colormap_political
void load_province_data(parsers::scenario_building_context &context, ogl::image &image)
void set_drag_box(bool draw_box, glm::vec2 pos1, glm::vec2 pos2, glm::vec2 pixel_size)
static constexpr uint32_t uniform_provinces_texture_sampler
static constexpr uint32_t texture_count
std::vector< screen_vertex > drag_box_vertices
static constexpr uint32_t vo_river
GLuint textures[texture_count]
std::vector< uint32_t > province_id_sea_mask
static constexpr uint32_t vo_text_line
static constexpr uint32_t texture_colormap_terrain
std::vector< GLsizei > railroad_counts
std::vector< curved_line_vertex > objective_unit_arrow_vertices
void set_province_color(std::vector< uint32_t > const &prov_color)
static constexpr uint32_t shader_textured_line_with_variable_width
static constexpr uint32_t uniform_terrainsheet_texture_sampler
static constexpr uint32_t texture_colormap_political
static constexpr uint32_t texture_state_border
std::vector< textured_line_vertex > railroad_vertices
static constexpr uint32_t uniform_unit_arrow
static constexpr uint32_t shader_terrain
glm::vec2 put_in_local(glm::vec2 new_point, glm::vec2 base_point, float size_x)
void make_army_path(sys::state &state, std::vector< map::curved_line_vertex > &buffer, dcon::army_id selected_army, float size_x, float size_y)
void add_bezier_to_buffer(std::vector< map::curved_line_vertex > &buffer, glm::vec2 start, glm::vec2 end, glm::vec2 start_per, glm::vec2 end_per, float progress, bool last_curve, float size_x, float size_y, uint32_t num_b_segments)
void make_navy_path(sys::state &state, std::vector< map::curved_line_vertex > &buffer, dcon::navy_id selected_navy, float size_x, float size_y)
void load_river_crossings(parsers::scenario_building_context &context, std::vector< uint8_t > const &river_data, glm::ivec2 map_size)
void add_tl_bezier_to_buffer(std::vector< map::textured_line_vertex > &buffer, glm::vec2 start, glm::vec2 end, glm::vec2 start_per, glm::vec2 end_per, float progress, bool last_curve, float size_x, float size_y, uint32_t num_b_segments, float &distance)
dcon::province_adjacency_id adj
curved_line_vertex(glm::vec2 position, glm::vec2 normal_direction, glm::vec2 direction, glm::vec2 texture_coord, float type)
glm::vec2 normal_direction_
map_vertex(float x, float y)
screen_vertex(float x, float y)
text_line_generator_data()
text_line_generator_data(text::stored_glyphs &&text_, glm::vec4 coeff_, glm::vec2 basis_, glm::vec2 ratio_)
glm::vec2 normal_direction_
text_line_vertex(glm::vec2 position, glm::vec2 normal_direction, glm::vec2 direction, glm::vec3 texture_coord, float thickness)
glm::vec2 normal_direction_
float texture_coordinate_
glm::vec2 normal_direction_
float texture_coordinate_