Project Alice
|
Classes | |
struct | bmp_pixel_data |
struct | border |
struct | border_direction |
struct | curved_line_vertex |
class | display_data |
class | map_state |
struct | map_vertex |
struct | river_runner |
struct | river_vertex |
struct | screen_vertex |
struct | text_line_generator_data |
struct | text_line_vertex |
struct | textured_line_vertex |
struct | textured_line_vertex_b |
struct | textured_line_with_width_vertex |
Enumerations | |
enum | direction : uint8_t { UP_LEFT = 1 << 7 , UP_RIGHT = 1 << 6 , DOWN_LEFT = 1 << 5 , DOWN_RIGHT = 1 << 4 , UP = 1 << 3 , DOWN = 1 << 2 , LEFT = 1 << 1 , RIGHT = 1 << 0 } |
enum class | diagonal_border : uint8_t { UP_LEFT = 0x01 , UP_RIGHT = uint8_t(0x01 << 2) , DOWN_LEFT = uint8_t(0x01 << 4) , DOWN_RIGHT = uint8_t(0x01 << 6) , NOTHING = 0 } |
enum class | map_view { globe , globe_perspect , flat } |
Functions | |
void | add_nation_visible_provinces (sys::state &state, std::vector< dcon::province_id > &list, dcon::nation_id n) |
void | create_textured_line_vbo (GLuint vbo, std::vector< textured_line_vertex > &data) |
void | create_textured_line_vbo (GLuint vbo, std::vector< textured_line_with_width_vertex > &data) |
void | create_textured_line_b_vbo (GLuint vbo, std::vector< textured_line_vertex_b > &data) |
void | create_unit_arrow_vbo (GLuint vbo, std::vector< curved_line_vertex > &data) |
void | create_text_line_vbo (GLuint vbo) |
void | create_drag_box_vbo (GLuint vbo) |
std::optional< simple_fs::file > | try_load_shader (simple_fs::directory &root, native_string_view name) |
GLuint | create_program (simple_fs::file &vshader_file, simple_fs::file &fshader_file) |
GLuint | load_province_map (std::vector< uint16_t > &province_index, uint32_t size_x, uint32_t size_y) |
void | add_drag_box_line (std::vector< screen_vertex > &drag_box_vertices, glm::vec2 pos1, glm::vec2 pos2, glm::vec2 size, bool vertical) |
void | add_arrow_to_buffer (std::vector< map::curved_line_vertex > &buffer, glm::vec2 start, glm::vec2 end, glm::vec2 prev_normal_dir, glm::vec2 next_normal_dir, float fill_progress, bool end_arrow, 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 | add_tl_segment_buffer (std::vector< map::textured_line_vertex > &buffer, glm::vec2 start, glm::vec2 end, glm::vec2 next_normal_dir, float size_x, float size_y, float &distance) |
void | add_tl_segment_buffer (std::vector< map::textured_line_with_width_vertex > &buffer, glm::vec2 start, glm::vec2 end, glm::vec2 next_normal_dir, float size_x, float size_y, float &distance, float width) |
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) |
void | 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) |
glm::vec2 | put_in_local (glm::vec2 new_point, glm::vec2 base_point, float size_x) |
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 | 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 | create_railroad_connection (sys::state &state, std::vector< glm::vec2 > &railroad, dcon::province_id p1, dcon::province_id p2) |
bool | get_provinces_part_of_rr_path (sys::state &state, std::vector< bool > &visited_adj, std::vector< bool > &visited_prov, std::vector< dcon::province_id > &provinces, dcon::province_id p) |
GLuint | load_dds_texture (simple_fs::directory const &dir, native_string_view file_name, int soil_flags=ogl::SOIL_FLAG_TEXTURE_REPEATS) |
emfx::xac_pp_actor_material_layer | get_diffuse_layer (emfx::xac_pp_actor_material const &mat) |
void | load_static_meshes (sys::state &state) |
void | load_river_crossings (parsers::scenario_building_context &context, std::vector< uint8_t > const &river_data, glm::ivec2 map_size) |
bool | extend_if_possible (uint32_t x, int32_t border_id, direction dir, std::vector< border_direction > &last_row, std::vector< border_direction > ¤t_row, glm::vec2 map_size, std::vector< curved_line_vertex > &border_vertices) |
int32_t | get_border_index (uint16_t map_province_id1, uint16_t map_province_id2, parsers::scenario_building_context &context) |
bool | is_river (uint8_t river_data) |
int32_t | river_width (uint8_t river_data) |
bool | is_river_source (uint8_t river_data) |
bool | is_river_merge (uint8_t river_data) |
bool | coastal_point (sys::state &state, uint16_t a, uint16_t b) |
bool | order_indifferent_compare (uint16_t a, uint16_t b, uint16_t c, uint16_t d) |
std::vector< glm::vec2 > | make_border_section (display_data &dat, sys::state &state, std::vector< bool > &visited, uint16_t prov_prim, uint16_t prov_sec, int32_t start_x, int32_t start_y) |
void | add_border_segment_vertices (display_data &dat, std::vector< glm::vec2 > const &points) |
std::vector< glm::vec2 > | make_coastal_loop (display_data &dat, sys::state &state, std::vector< bool > &visited, int32_t start_x, int32_t start_y) |
void | add_coastal_loop_vertices (display_data &dat, std::vector< glm::vec2 > const &points) |
bool | check_for_child (river_vertex *vertex, uint32_t x, uint32_t y) |
bool | check_for_parent (river_vertex *vertex, uint32_t x, uint32_t y) |
bool | check_for_river (std::vector< uint8_t > const &river_data, river_runner &runner, int32_t x, int32_t y, glm::ivec2 size) |
std::vector< glm::ivec2 > | check_for_potential_child (std::vector< uint8_t > const &river_data, river_runner &runner, glm::ivec2 size) |
std::vector< uint8_t > | load_bmp (parsers::scenario_building_context &context, native_string_view name, glm::ivec2 map_size, uint8_t fill, std::vector< bmp_pixel_data > *color_table) |
ankerl::unordered_dense::map< uint32_t, uint8_t > | internal_make_index_map () |
glm::vec2 | get_port_location (sys::state &state, dcon::province_id p) |
bool | is_sea_province (sys::state &state, dcon::province_id prov_id) |
glm::vec2 | get_navy_location (sys::state &state, dcon::province_id prov_id) |
glm::vec2 | get_army_location (sys::state &state, dcon::province_id prov_id) |
void | update_unit_arrows (sys::state &state, display_data &map_data) |
void | update_bbox (std::array< glm::vec2, 5 > &bbox, glm::vec2 p) |
bool | is_inside_bbox (std::array< glm::vec2, 5 > &bbox, glm::vec2 p) |
void | update_bbox_negative (std::array< glm::vec2, 5 > &bbox, glm::vec2 p) |
dcon::nation_id | get_top_overlord (sys::state &state, dcon::nation_id n) |
void | update_text_lines (sys::state &state, display_data &map_data) |
Variables | |
constexpr float | min_zoom = 1.0f |
constexpr float | max_zoom = 75.0f |
constexpr float | zoom_close = 5.f |
constexpr float | zoom_very_close = 8.f |
constexpr uint32_t | default_num_b_segments = 16 |
constexpr float | control_point_length_factor = 0.3f |
|
strong |
Enumerator | |
---|---|
UP_LEFT | |
UP_RIGHT | |
DOWN_LEFT | |
DOWN_RIGHT | |
NOTHING |
Definition at line 19 of file map_borders.cpp.
enum map::direction : uint8_t |
Enumerator | |
---|---|
UP_LEFT | |
UP_RIGHT | |
DOWN_LEFT | |
DOWN_RIGHT | |
UP | |
DOWN | |
LEFT | |
RIGHT |
Definition at line 8 of file map_borders.cpp.
|
strong |
Enumerator | |
---|---|
globe | |
globe_perspect | |
flat |
Definition at line 17 of file map_state.hpp.
void map::add_arrow_to_buffer | ( | std::vector< map::curved_line_vertex > & | buffer, |
glm::vec2 | start, | ||
glm::vec2 | end, | ||
glm::vec2 | prev_normal_dir, | ||
glm::vec2 | next_normal_dir, | ||
float | fill_progress, | ||
bool | end_arrow, | ||
float | size_x, | ||
float | size_y | ||
) |
void map::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 map::add_border_segment_vertices | ( | display_data & | dat, |
std::vector< glm::vec2 > const & | points | ||
) |
Definition at line 426 of file map_borders.cpp.
void map::add_coastal_loop_vertices | ( | display_data & | dat, |
std::vector< glm::vec2 > const & | points | ||
) |
Definition at line 656 of file map_borders.cpp.
void map::add_drag_box_line | ( | std::vector< screen_vertex > & | drag_box_vertices, |
glm::vec2 | pos1, | ||
glm::vec2 | pos2, | ||
glm::vec2 | size, | ||
bool | vertical | ||
) |
void map::add_nation_visible_provinces | ( | sys::state & | state, |
std::vector< dcon::province_id > & | list, | ||
dcon::nation_id | n | ||
) |
void map::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 | ||
) |
void map::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 | ||
) |
void map::add_tl_segment_buffer | ( | std::vector< map::textured_line_vertex > & | buffer, |
glm::vec2 | start, | ||
glm::vec2 | end, | ||
glm::vec2 | next_normal_dir, | ||
float | size_x, | ||
float | size_y, | ||
float & | distance | ||
) |
void map::add_tl_segment_buffer | ( | std::vector< map::textured_line_with_width_vertex > & | buffer, |
glm::vec2 | start, | ||
glm::vec2 | end, | ||
glm::vec2 | next_normal_dir, | ||
float | size_x, | ||
float | size_y, | ||
float & | distance, | ||
float | width | ||
) |
bool map::check_for_child | ( | river_vertex * | vertex, |
uint32_t | x, | ||
uint32_t | y | ||
) |
Definition at line 848 of file map_borders.cpp.
bool map::check_for_parent | ( | river_vertex * | vertex, |
uint32_t | x, | ||
uint32_t | y | ||
) |
std::vector< glm::ivec2 > map::check_for_potential_child | ( | std::vector< uint8_t > const & | river_data, |
river_runner & | runner, | ||
glm::ivec2 | size | ||
) |
Definition at line 898 of file map_borders.cpp.
bool map::check_for_river | ( | std::vector< uint8_t > const & | river_data, |
river_runner & | runner, | ||
int32_t | x, | ||
int32_t | y, | ||
glm::ivec2 | size | ||
) |
Definition at line 876 of file map_borders.cpp.
bool map::coastal_point | ( | sys::state & | state, |
uint16_t | a, | ||
uint16_t | b | ||
) |
Definition at line 269 of file map_borders.cpp.
void map::create_drag_box_vbo | ( | GLuint | vbo | ) |
GLuint map::create_program | ( | simple_fs::file & | vshader_file, |
simple_fs::file & | fshader_file | ||
) |
void map::create_railroad_connection | ( | sys::state & | state, |
std::vector< glm::vec2 > & | railroad, | ||
dcon::province_id | p1, | ||
dcon::province_id | p2 | ||
) |
void map::create_text_line_vbo | ( | GLuint | vbo | ) |
void map::create_textured_line_b_vbo | ( | GLuint | vbo, |
std::vector< textured_line_vertex_b > & | data | ||
) |
void map::create_textured_line_vbo | ( | GLuint | vbo, |
std::vector< textured_line_vertex > & | data | ||
) |
void map::create_textured_line_vbo | ( | GLuint | vbo, |
std::vector< textured_line_with_width_vertex > & | data | ||
) |
void map::create_unit_arrow_vbo | ( | GLuint | vbo, |
std::vector< curved_line_vertex > & | data | ||
) |
bool map::extend_if_possible | ( | uint32_t | x, |
int32_t | border_id, | ||
direction | dir, | ||
std::vector< border_direction > & | last_row, | ||
std::vector< border_direction > & | current_row, | ||
glm::vec2 | map_size, | ||
std::vector< curved_line_vertex > & | border_vertices | ||
) |
Definition at line 42 of file map_borders.cpp.
glm::vec2 map::get_army_location | ( | sys::state & | state, |
dcon::province_id | prov_id | ||
) |
Definition at line 76 of file map_state.cpp.
int32_t map::get_border_index | ( | uint16_t | map_province_id1, |
uint16_t | map_province_id2, | ||
parsers::scenario_building_context & | context | ||
) |
emfx::xac_pp_actor_material_layer map::get_diffuse_layer | ( | emfx::xac_pp_actor_material const & | mat | ) |
glm::vec2 map::get_navy_location | ( | sys::state & | state, |
dcon::province_id | prov_id | ||
) |
glm::vec2 map::get_port_location | ( | sys::state & | state, |
dcon::province_id | p | ||
) |
bool map::get_provinces_part_of_rr_path | ( | sys::state & | state, |
std::vector< bool > & | visited_adj, | ||
std::vector< bool > & | visited_prov, | ||
std::vector< dcon::province_id > & | provinces, | ||
dcon::province_id | p | ||
) |
dcon::nation_id map::get_top_overlord | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 286 of file map_data_loading.cpp.
bool map::is_inside_bbox | ( | std::array< glm::vec2, 5 > & | bbox, |
glm::vec2 | p | ||
) |
bool map::is_river | ( | uint8_t | river_data | ) |
bool map::is_river_merge | ( | uint8_t | river_data | ) |
bool map::is_river_source | ( | uint8_t | river_data | ) |
bool map::is_sea_province | ( | sys::state & | state, |
dcon::province_id | prov_id | ||
) |
std::vector< uint8_t > map::load_bmp | ( | parsers::scenario_building_context & | context, |
native_string_view | name, | ||
glm::ivec2 | map_size, | ||
uint8_t | fill, | ||
std::vector< bmp_pixel_data > * | color_table | ||
) |
Definition at line 30 of file map_data_loading.cpp.
GLuint map::load_dds_texture | ( | simple_fs::directory const & | dir, |
native_string_view | file_name, | ||
int | soil_flags = ogl::SOIL_FLAG_TEXTURE_REPEATS |
||
) |
void map::load_river_crossings | ( | parsers::scenario_building_context & | context, |
std::vector< uint8_t > const & | river_data, | ||
glm::ivec2 | map_size | ||
) |
Definition at line 762 of file map_borders.cpp.
void map::load_static_meshes | ( | sys::state & | state | ) |
void map::make_army_path | ( | sys::state & | state, |
std::vector< map::curved_line_vertex > & | buffer, | ||
dcon::army_id | selected_army, | ||
float | size_x, | ||
float | size_y | ||
) |
std::vector< glm::vec2 > map::make_border_section | ( | display_data & | dat, |
sys::state & | state, | ||
std::vector< bool > & | visited, | ||
uint16_t | prov_prim, | ||
uint16_t | prov_sec, | ||
int32_t | start_x, | ||
int32_t | start_y | ||
) |
Definition at line 279 of file map_borders.cpp.
std::vector< glm::vec2 > map::make_coastal_loop | ( | display_data & | dat, |
sys::state & | state, | ||
std::vector< bool > & | visited, | ||
int32_t | start_x, | ||
int32_t | start_y | ||
) |
Definition at line 552 of file map_borders.cpp.
void map::make_navy_path | ( | sys::state & | state, |
std::vector< map::curved_line_vertex > & | buffer, | ||
dcon::navy_id | selected_navy, | ||
float | size_x, | ||
float | size_y | ||
) |
bool map::order_indifferent_compare | ( | uint16_t | a, |
uint16_t | b, | ||
uint16_t | c, | ||
uint16_t | d | ||
) |
glm::vec2 map::put_in_local | ( | glm::vec2 | new_point, |
glm::vec2 | base_point, | ||
float | size_x | ||
) |
int32_t map::river_width | ( | uint8_t | river_data | ) |
std::optional< simple_fs::file > map::try_load_shader | ( | simple_fs::directory & | root, |
native_string_view | name | ||
) |
void map::update_bbox | ( | std::array< glm::vec2, 5 > & | bbox, |
glm::vec2 | p | ||
) |
void map::update_bbox_negative | ( | std::array< glm::vec2, 5 > & | bbox, |
glm::vec2 | p | ||
) |
void map::update_text_lines | ( | sys::state & | state, |
display_data & | map_data | ||
) |
Definition at line 230 of file map_state.cpp.
void map::update_unit_arrows | ( | sys::state & | state, |
display_data & | map_data | ||
) |
Definition at line 80 of file map_state.cpp.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 604 of file constants.hpp.
|
inlineconstexpr |
Definition at line 603 of file constants.hpp.
|
inlineconstexpr |
Definition at line 605 of file constants.hpp.
|
inlineconstexpr |
Definition at line 606 of file constants.hpp.