Project Alice
Loading...
Searching...
No Matches
sys::state Struct Reference

#include <system_state.hpp>

Collaboration diagram for sys::state:

Public Member Functions

void on_create ()
 
void on_rbutton_down (int32_t x, int32_t y, key_modifiers mod)
 
void on_mbutton_down (int32_t x, int32_t y, key_modifiers mod)
 
void on_lbutton_down (int32_t x, int32_t y, key_modifiers mod)
 
void on_rbutton_up (int32_t x, int32_t y, key_modifiers mod)
 
void on_mbutton_up (int32_t x, int32_t y, key_modifiers mod)
 
void on_lbutton_up (int32_t x, int32_t y, key_modifiers mod)
 
void on_mouse_move (int32_t x, int32_t y, key_modifiers mod)
 
void on_mouse_drag (int32_t x, int32_t y, key_modifiers mod)
 
void on_drag_finished (int32_t x, int32_t y, key_modifiers mod)
 
void on_resize (int32_t x, int32_t y, window::window_state win_state)
 
void on_mouse_wheel (int32_t x, int32_t y, key_modifiers mod, float amount)
 
void on_key_down (virtual_key keycode, key_modifiers mod)
 
void on_key_up (virtual_key keycode, key_modifiers mod)
 
void on_text (char32_t c)
 
void render ()
 
void single_game_tick ()
 
void game_loop ()
 
sys::checksum_key get_save_checksum ()
 
void debug_save_oos_dump ()
 
void debug_scenario_oos_dump ()
 
void start_state_selection (state_selection_data &data)
 
void state_select (dcon::state_definition_id sdef)
 
std::string_view to_string_view (dcon::text_key tag) const
 
std::string_view locale_string_view (uint32_t tag) const
 
bool key_is_localized (dcon::text_key tag) const
 
bool key_is_localized (std::string_view key) const
 
dcon::text_key lookup_key (std::string_view text) const
 
void reset_locale_pool ()
 
void load_locale_strings (std::string_view locale_name)
 
dcon::text_key add_key_win1252 (std::string const &text)
 
dcon::text_key add_key_win1252 (std::string_view text)
 
dcon::text_key add_key_utf8 (std::string const &text)
 
dcon::text_key add_key_utf8 (std::string_view text)
 
uint32_t add_locale_data_win1252 (std::string const &text)
 
uint32_t add_locale_data_win1252 (std::string_view text)
 
uint32_t add_locale_data_utf8 (std::string const &text)
 
uint32_t add_locale_data_utf8 (std::string_view text)
 
dcon::unit_name_id add_unit_name (std::string_view text)
 
std::string_view to_string_view (dcon::unit_name_id tag) const
 
dcon::trigger_key commit_trigger_data (std::vector< uint16_t > data)
 
dcon::effect_key commit_effect_data (std::vector< uint16_t > data)
 
 state ()
 
 ~state ()=default
 
void save_user_settings () const
 
void load_user_settings ()
 
void update_ui_scale (float new_scale)
 
void load_scenario_data (parsers::error_handler &err, sys::year_month_day bookmark_date)
 
void fill_unsaved_data ()
 
void on_scenario_load ()
 
void preload ()
 
void console_log (std::string_view message)
 
void open_diplomacy (dcon::nation_id target)
 
bool is_selected (dcon::army_id a)
 
bool is_selected (dcon::navy_id a)
 
void select (dcon::army_id a)
 
void select (dcon::navy_id a)
 
void deselect (dcon::army_id a)
 
void deselect (dcon::navy_id a)
 
void new_army_group (dcon::province_id hq)
 
void delete_army_group (dcon::automated_army_group_id group)
 
void toggle_designated_port (dcon::automated_army_group_id group, dcon::province_id position)
 
void toggle_defensive_position (dcon::automated_army_group_id group, dcon::province_id position)
 
void toggle_enforce_control_position (dcon::automated_army_group_id group, dcon::province_id position)
 
void update_armies_and_fleets (dcon::automated_army_group_id group)
 
void regiment_reset_order (dcon::regiment_automation_data_id regiment)
 
bool army_group_recalculate_distribution (dcon::automated_army_group_id group, std::vector< float > &regiments_distribution)
 
void army_group_update_tasks (dcon::automated_army_group_id group)
 
dcon::province_id get_port_for_landing (dcon::automated_army_group_id group, dcon::province_id target)
 
void army_group_distribute_tasks (dcon::automated_army_group_id group)
 
float army_group_available_supply (dcon::automated_army_group_id group, dcon::province_id province)
 
dcon::province_id find_available_ferry_origin (dcon::automated_army_group_id group, dcon::regiment_automation_data_id regiment)
 
bool move_to_available_port (dcon::automated_army_group_id group, dcon::regiment_automation_data_id regiment)
 
void remove_navy_from_army_group (dcon::automated_army_group_id selected_group, dcon::navy_id navy_to_delete)
 
void army_group_update_regiment_status (dcon::automated_army_group_id group)
 
void army_group_add_regiment (dcon::automated_army_group_id group, dcon::regiment_id id)
 
void remove_regiment_from_army_group (dcon::automated_army_group_id selected_group, dcon::regiment_id selected_regiment)
 
void remove_regiment_from_all_army_groups (dcon::regiment_id regiment_to_delete)
 
void remove_army_army_group_clean (dcon::automated_army_group_id group, dcon::army_id army_to_delete)
 
void add_army_to_army_group (dcon::automated_army_group_id selected_group, dcon::army_id selected_army)
 
void add_navy_to_army_group (dcon::automated_army_group_id selected_group, dcon::navy_id selected_navy)
 
void smart_select_army_group (dcon::automated_army_group_id selected_group)
 
void select_army_group (dcon::automated_army_group_id selected_group)
 
void deselect_army_group ()
 
dcon::regiment_automation_data_id fill_province_up_to_supply_limit (dcon::automated_army_group_id group_id, dcon::province_id target, std::vector< float > &regiments_distribution, float overestimate_supply_limit, bool ignore_enemy_regiments_in_supply_calculations)
 
dcon::regiment_automation_data_id fill_province (dcon::automated_army_group_id group_id, dcon::province_id target, std::vector< float > &regiments_expectation_ideal)
 
void fill_vector_of_connected_provinces (dcon::province_id p1, bool is_land, std::vector< dcon::province_id > &provinces)
 
void build_up_to_template_land (macro_builder_template &target_template, dcon::province_id target_province, std::vector< dcon::province_id > &available_provinces, std::array< uint8_t, sys::macro_builder_template::max_types > &current_distribution)
 

Public Attributes

dcon::data_container world
 
parsing::defines defines
 
economy::global_economy_state economy_definitions
 
culture::global_cultural_state culture_definitions
 
military::global_military_state military_definitions
 
nations::global_national_state national_definitions
 
province::global_provincial_state province_definitions
 
absolute_time_point start_date
 
absolute_time_point end_date
 
std::vector< uint16_t > trigger_data
 
std::vector< int32_t > trigger_data_indices
 
std::vector< uint16_t > effect_data
 
std::vector< int32_t > effect_data_indices
 
std::vector< value_modifier_segmentvalue_modifier_segments
 
tagged_vector< value_modifier_description, dcon::value_modifier_key > value_modifiers
 
std::vector< char > key_data
 
std::vector< char > locale_text_data
 
ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_equntrans_key_to_text_sequence
 
ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eqlocale_key_to_text_sequence
 
bool adjacency_data_out_of_date = true
 
bool national_cached_values_out_of_date = false
 
bool diplomatic_cached_values_out_of_date = false
 
std::vector< dcon::nation_id > nations_by_rank
 
std::vector< dcon::nation_id > nations_by_industrial_score
 
std::vector< dcon::nation_id > nations_by_military_score
 
std::vector< dcon::nation_id > nations_by_prestige_score
 
std::vector< great_nationgreat_nations
 
uint64_t scenario_time_stamp = 0
 
uint32_t scenario_counter = 0
 
int32_t autosave_counter = 0
 
sys::checksum_key scenario_checksum
 
sys::checksum_key session_host_checksum
 
native_string loaded_scenario_file
 
native_string loaded_save_file
 
dcon::state_instance_id crisis_state
 
std::vector< crisis_member_defcrisis_participants
 
crisis_type current_crisis = crisis_type::none
 
float crisis_temperature = 0
 
dcon::nation_id primary_crisis_attacker
 
dcon::nation_id primary_crisis_defender
 
crisis_mode current_crisis_mode = crisis_mode::inactive
 
uint32_t crisis_last_checked_gp = 0
 
dcon::war_id crisis_war
 
sys::date last_crisis_end_date {0}
 
dcon::national_identity_id crisis_liberation_tag
 
dcon::state_definition_id crisis_colony
 
std::array< diplomatic_message::message, 128 > pending_messages = {}
 
std::vector< event::pending_human_n_eventpending_n_event
 
std::vector< event::pending_human_f_n_eventpending_f_n_event
 
std::vector< event::pending_human_p_eventpending_p_event
 
std::vector< event::pending_human_f_p_eventpending_f_p_event
 
std::vector< event::pending_human_n_eventfuture_n_event
 
std::vector< event::pending_human_p_eventfuture_p_event
 
std::vector< int32_t > unit_names_indices
 
std::vector< char > unit_names
 
ui::definitions ui_defs
 
std::vector< uint8_tflag_type_map
 
std::vector< culture::flag_typeflag_types
 
user_settings_s user_settings
 
network_mode_type network_mode = network_mode_type::single_player
 
dcon::nation_id local_player_nation
 
sys::date current_date = sys::date{0}
 
sys::date ui_date = sys::date{0}
 
uint32_t game_seed = 0
 
float inflation = 1.0f
 
player_data player_data_cache
 
std::vector< dcon::army_id > selected_armies
 
std::vector< dcon::navy_id > selected_navies
 
std::mutex ugly_ui_game_interaction_hack
 
std::array< std::vector< dcon::army_id >, 10 > ctrl_armies
 
std::array< std::vector< dcon::navy_id >, 10 > ctrl_navies
 
dcon::automated_army_group_id selected_army_group {}
 
army_group_order selected_army_group_order = army_group_order::none
 
game_scene::scene_properties current_scene
 
std::optional< state_selection_datastate_selection
 
map_mode::mode stored_map_mode = map_mode::mode::political
 
simple_fs::file_system common_fs
 
std::unique_ptr< window::window_data_implwin_ptr = nullptr
 
std::unique_ptr< sound::sound_implsound_ptr = nullptr
 
ui::state ui_state
 
text::font_manager font_collection
 
std::atomic< bool > game_state_updated = false
 
std::atomic< bool > province_ownership_changed = true
 
std::atomic< bool > save_list_updated = false
 
std::atomic< bool > quit_signaled = false
 
std::atomic< int32_t > actual_game_speed = 0
 
rigtorp::SPSCQueue< command::payloadincoming_commands
 
std::atomic< bool > ui_pause = false
 
std::atomic< bool > railroad_built = true
 
rigtorp::SPSCQueue< event::pending_human_n_eventnew_n_event
 
rigtorp::SPSCQueue< event::pending_human_f_n_eventnew_f_n_event
 
rigtorp::SPSCQueue< event::pending_human_p_eventnew_p_event
 
rigtorp::SPSCQueue< event::pending_human_f_p_eventnew_f_p_event
 
rigtorp::SPSCQueue< diplomatic_message::messagenew_requests
 
rigtorp::SPSCQueue< notification::messagenew_messages
 
rigtorp::SPSCQueue< military::naval_battle_reportnaval_battle_reports
 
rigtorp::SPSCQueue< military::land_battle_reportland_battle_reports
 
std::chrono::time_point< std::chrono::steady_clock > last_update = std::chrono::steady_clock::now()
 
bool internally_paused = false
 
int32_t x_size = 0
 
int32_t y_size = 0
 
bool drag_selecting = false
 
int32_t mouse_x_position = 0
 
int32_t mouse_y_position = 0
 
bool is_dragging = false
 
int32_t x_drag_start = 0
 
int32_t y_drag_start = 0
 
std::chrono::time_point< std::chrono::steady_clock > tooltip_timer = std::chrono::steady_clock::now()
 
map::map_state map_state
 
ogl::data open_gl
 
cheat_data_s cheat_data
 
network::network_state network_state
 
std::mutex lock_console_strings
 
std::string console_command_pending
 
std::string console_command_result
 
std::string console_command_error
 
std::unique_ptr< fif::environmentfif_environment
 
int32_t type_text_key = -1
 
int32_t type_localized_key = -1
 

Detailed Description

Definition at line 472 of file system_state.hpp.

Constructor & Destructor Documentation

◆ state()

sys::state::state ( )
inline

Definition at line 727 of file system_state.hpp.

◆ ~state()

sys::state::~state ( )
default

Member Function Documentation

◆ add_army_to_army_group()

void sys::state::add_army_to_army_group ( dcon::automated_army_group_id  selected_group,
dcon::army_id  selected_army 
)

Definition at line 4626 of file system_state.cpp.

◆ add_key_utf8() [1/2]

dcon::text_key sys::state::add_key_utf8 ( std::string const &  text)

Definition at line 1324 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_key_utf8() [2/2]

dcon::text_key sys::state::add_key_utf8 ( std::string_view  text)

Definition at line 1327 of file system_state.cpp.

Here is the call graph for this function:

◆ add_key_win1252() [1/2]

dcon::text_key sys::state::add_key_win1252 ( std::string const &  text)

Definition at line 1301 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_key_win1252() [2/2]

dcon::text_key sys::state::add_key_win1252 ( std::string_view  text)

Definition at line 1304 of file system_state.cpp.

Here is the call graph for this function:

◆ add_locale_data_utf8() [1/2]

uint32_t sys::state::add_locale_data_utf8 ( std::string const &  text)

Definition at line 1367 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_locale_data_utf8() [2/2]

uint32_t sys::state::add_locale_data_utf8 ( std::string_view  text)

Definition at line 1370 of file system_state.cpp.

◆ add_locale_data_win1252() [1/2]

uint32_t sys::state::add_locale_data_win1252 ( std::string const &  text)

Definition at line 1344 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_locale_data_win1252() [2/2]

uint32_t sys::state::add_locale_data_win1252 ( std::string_view  text)

Definition at line 1347 of file system_state.cpp.

Here is the call graph for this function:

◆ add_navy_to_army_group()

void sys::state::add_navy_to_army_group ( dcon::automated_army_group_id  selected_group,
dcon::navy_id  selected_navy 
)

Definition at line 4632 of file system_state.cpp.

◆ add_unit_name()

dcon::unit_name_id sys::state::add_unit_name ( std::string_view  text)

Definition at line 1381 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ army_group_add_regiment()

void sys::state::army_group_add_regiment ( dcon::automated_army_group_id  group,
dcon::regiment_id  id 
)

Definition at line 4552 of file system_state.cpp.

Here is the call graph for this function:

◆ army_group_available_supply()

float sys::state::army_group_available_supply ( dcon::automated_army_group_id  group,
dcon::province_id  province 
)

Definition at line 4779 of file system_state.cpp.

Here is the call graph for this function:

◆ army_group_distribute_tasks()

void sys::state::army_group_distribute_tasks ( dcon::automated_army_group_id  group)

Definition at line 5001 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ army_group_recalculate_distribution()

bool sys::state::army_group_recalculate_distribution ( dcon::automated_army_group_id  group,
std::vector< float > &  regiments_distribution 
)

Definition at line 4896 of file system_state.cpp.

Here is the call graph for this function:

◆ army_group_update_regiment_status()

void sys::state::army_group_update_regiment_status ( dcon::automated_army_group_id  group)

Definition at line 5265 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ army_group_update_tasks()

void sys::state::army_group_update_tasks ( dcon::automated_army_group_id  group)

Definition at line 4932 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_up_to_template_land()

void sys::state::build_up_to_template_land ( macro_builder_template target_template,
dcon::province_id  target_province,
std::vector< dcon::province_id > &  available_provinces,
std::array< uint8_t, sys::macro_builder_template::max_types > &  current_distribution 
)

Definition at line 5509 of file system_state.cpp.

Here is the call graph for this function:

◆ commit_effect_data()

dcon::effect_key sys::state::commit_effect_data ( std::vector< uint16_t >  data)

Definition at line 1458 of file system_state.cpp.

Here is the caller graph for this function:

◆ commit_trigger_data()

dcon::trigger_key sys::state::commit_trigger_data ( std::vector< uint16_t >  data)

Definition at line 1424 of file system_state.cpp.

Here is the caller graph for this function:

◆ console_log()

void sys::state::console_log ( std::string_view  message)

Definition at line 4485 of file system_state.cpp.

◆ debug_save_oos_dump()

void sys::state::debug_save_oos_dump ( )

Definition at line 4398 of file system_state.cpp.

Here is the call graph for this function:

◆ debug_scenario_oos_dump()

void sys::state::debug_scenario_oos_dump ( )

Definition at line 4417 of file system_state.cpp.

Here is the call graph for this function:

◆ delete_army_group()

void sys::state::delete_army_group ( dcon::automated_army_group_id  group)

Definition at line 4648 of file system_state.cpp.

◆ deselect() [1/2]

void sys::state::deselect ( dcon::army_id  a)
inline

Definition at line 765 of file system_state.hpp.

◆ deselect() [2/2]

void sys::state::deselect ( dcon::navy_id  a)
inline

Definition at line 775 of file system_state.hpp.

◆ deselect_army_group()

void sys::state::deselect_army_group ( )

Definition at line 4717 of file system_state.cpp.

◆ fill_province()

dcon::regiment_automation_data_id sys::state::fill_province ( dcon::automated_army_group_id  group_id,
dcon::province_id  target,
std::vector< float > &  regiments_expectation_ideal 
)

Definition at line 5404 of file system_state.cpp.

Here is the call graph for this function:

◆ fill_province_up_to_supply_limit()

dcon::regiment_automation_data_id sys::state::fill_province_up_to_supply_limit ( dcon::automated_army_group_id  group_id,
dcon::province_id  target,
std::vector< float > &  regiments_distribution,
float  overestimate_supply_limit,
bool  ignore_enemy_regiments_in_supply_calculations 
)

Definition at line 4723 of file system_state.cpp.

Here is the call graph for this function:

◆ fill_unsaved_data()

void sys::state::fill_unsaved_data ( )

Definition at line 3581 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_vector_of_connected_provinces()

void sys::state::fill_vector_of_connected_provinces ( dcon::province_id  p1,
bool  is_land,
std::vector< dcon::province_id > &  provinces 
)

Definition at line 5481 of file system_state.cpp.

◆ find_available_ferry_origin()

dcon::province_id sys::state::find_available_ferry_origin ( dcon::automated_army_group_id  group,
dcon::regiment_automation_data_id  regiment 
)

Definition at line 4817 of file system_state.cpp.

Here is the call graph for this function:

◆ game_loop()

void sys::state::game_loop ( )

Definition at line 4436 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_port_for_landing()

dcon::province_id sys::state::get_port_for_landing ( dcon::automated_army_group_id  group,
dcon::province_id  target 
)

Definition at line 4983 of file system_state.cpp.

Here is the call graph for this function:

◆ get_save_checksum()

sys::checksum_key sys::state::get_save_checksum ( )

Definition at line 4384 of file system_state.cpp.

Here is the call graph for this function:

◆ is_selected() [1/2]

bool sys::state::is_selected ( dcon::army_id  a)
inline

Definition at line 747 of file system_state.hpp.

Here is the caller graph for this function:

◆ is_selected() [2/2]

bool sys::state::is_selected ( dcon::navy_id  a)
inline

Definition at line 750 of file system_state.hpp.

◆ key_is_localized() [1/2]

bool sys::state::key_is_localized ( dcon::text_key  tag) const

Definition at line 1285 of file system_state.cpp.

◆ key_is_localized() [2/2]

bool sys::state::key_is_localized ( std::string_view  key) const

Definition at line 1291 of file system_state.cpp.

◆ load_locale_strings()

void sys::state::load_locale_strings ( std::string_view  locale_name)

Definition at line 1228 of file system_state.cpp.

Here is the call graph for this function:

◆ load_scenario_data()

void sys::state::load_scenario_data ( parsers::error_handler err,
sys::year_month_day  bookmark_date 
)

Definition at line 1756 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_user_settings()

void sys::state::load_user_settings ( )

Definition at line 1552 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ locale_string_view()

std::string_view sys::state::locale_string_view ( uint32_t  tag) const

Definition at line 1210 of file system_state.cpp.

◆ lookup_key()

dcon::text_key sys::state::lookup_key ( std::string_view  text) const

Definition at line 1294 of file system_state.cpp.

Here is the caller graph for this function:

◆ move_to_available_port()

bool sys::state::move_to_available_port ( dcon::automated_army_group_id  group,
dcon::regiment_automation_data_id  regiment 
)

Definition at line 4878 of file system_state.cpp.

◆ new_army_group()

void sys::state::new_army_group ( dcon::province_id  hq)

Definition at line 4489 of file system_state.cpp.

◆ on_create()

void sys::state::on_create ( )

Definition at line 1120 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_drag_finished()

void sys::state::on_drag_finished ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 375 of file system_state.cpp.

Here is the call graph for this function:

◆ on_key_down()

void sys::state::on_key_down ( virtual_key  keycode,
key_modifiers  mod 
)

Definition at line 424 of file system_state.cpp.

Here is the call graph for this function:

◆ on_key_up()

void sys::state::on_key_up ( virtual_key  keycode,
key_modifiers  mod 
)

Definition at line 433 of file system_state.cpp.

Here is the call graph for this function:

◆ on_lbutton_down()

void sys::state::on_lbutton_down ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 335 of file system_state.cpp.

Here is the call graph for this function:

◆ on_lbutton_up()

void sys::state::on_lbutton_up ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 343 of file system_state.cpp.

Here is the call graph for this function:

◆ on_mbutton_down()

void sys::state::on_mbutton_down ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 329 of file system_state.cpp.

Here is the call graph for this function:

◆ on_mbutton_up()

void sys::state::on_mbutton_up ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 340 of file system_state.cpp.

Here is the call graph for this function:

◆ on_mouse_drag()

void sys::state::on_mouse_drag ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 367 of file system_state.cpp.

Here is the call graph for this function:

◆ on_mouse_move()

void sys::state::on_mouse_move ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 346 of file system_state.cpp.

Here is the call graph for this function:

◆ on_mouse_wheel()

void sys::state::on_mouse_wheel ( int32_t  x,
int32_t  y,
key_modifiers  mod,
float  amount 
)

Definition at line 394 of file system_state.cpp.

Here is the call graph for this function:

◆ on_rbutton_down()

void sys::state::on_rbutton_down ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 325 of file system_state.cpp.

Here is the call graph for this function:

◆ on_rbutton_up()

void sys::state::on_rbutton_up ( int32_t  x,
int32_t  y,
key_modifiers  mod 
)

Definition at line 339 of file system_state.cpp.

◆ on_resize()

void sys::state::on_resize ( int32_t  x,
int32_t  y,
window::window_state  win_state 
)

Definition at line 381 of file system_state.cpp.

Here is the call graph for this function:

◆ on_scenario_load()

void sys::state::on_scenario_load ( )

Definition at line 3277 of file system_state.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_text()

void sys::state::on_text ( char32_t  c)

Definition at line 453 of file system_state.cpp.

Here is the call graph for this function:

◆ open_diplomacy()

void sys::state::open_diplomacy ( dcon::nation_id  target)

Definition at line 1744 of file system_state.cpp.

Here is the call graph for this function:

◆ preload()

void sys::state::preload ( )

Definition at line 3233 of file system_state.cpp.

Here is the call graph for this function:

◆ regiment_reset_order()

void sys::state::regiment_reset_order ( dcon::regiment_automation_data_id  regiment)

Definition at line 4810 of file system_state.cpp.

◆ remove_army_army_group_clean()

void sys::state::remove_army_army_group_clean ( dcon::automated_army_group_id  group,
dcon::army_id  army_to_delete 
)

Definition at line 4620 of file system_state.cpp.

◆ remove_navy_from_army_group()

void sys::state::remove_navy_from_army_group ( dcon::automated_army_group_id  selected_group,
dcon::navy_id  navy_to_delete 
)

Definition at line 4590 of file system_state.cpp.

◆ remove_regiment_from_all_army_groups()

void sys::state::remove_regiment_from_all_army_groups ( dcon::regiment_id  regiment_to_delete)

Definition at line 4614 of file system_state.cpp.

◆ remove_regiment_from_army_group()

void sys::state::remove_regiment_from_army_group ( dcon::automated_army_group_id  selected_group,
dcon::regiment_id  selected_regiment 
)

Definition at line 4601 of file system_state.cpp.

◆ render()

void sys::state::render ( )

Definition at line 460 of file system_state.cpp.

Here is the caller graph for this function:

◆ reset_locale_pool()

void sys::state::reset_locale_pool ( )

Definition at line 1222 of file system_state.cpp.

◆ save_user_settings()

void sys::state::save_user_settings ( ) const

Definition at line 1492 of file system_state.cpp.

Here is the call graph for this function:

◆ select() [1/2]

void sys::state::select ( dcon::army_id  a)
inline

Definition at line 753 of file system_state.hpp.

Here is the call graph for this function:

◆ select() [2/2]

void sys::state::select ( dcon::navy_id  a)
inline

Definition at line 759 of file system_state.hpp.

Here is the call graph for this function:

◆ select_army_group()

void sys::state::select_army_group ( dcon::automated_army_group_id  selected_group)

Definition at line 4711 of file system_state.cpp.

◆ single_game_tick()

void sys::state::single_game_tick ( )

Definition at line 3813 of file system_state.cpp.

◆ smart_select_army_group()

void sys::state::smart_select_army_group ( dcon::automated_army_group_id  selected_group)

Definition at line 4697 of file system_state.cpp.

◆ start_state_selection()

void sys::state::start_state_selection ( state_selection_data data)

Definition at line 289 of file system_state.cpp.

Here is the call graph for this function:

◆ state_select()

void sys::state::state_select ( dcon::state_definition_id  sdef)

Definition at line 302 of file system_state.cpp.

Here is the call graph for this function:

◆ to_string_view() [1/2]

std::string_view sys::state::to_string_view ( dcon::text_key  tag) const

Definition at line 1196 of file system_state.cpp.

Here is the caller graph for this function:

◆ to_string_view() [2/2]

std::string_view sys::state::to_string_view ( dcon::unit_name_id  tag) const

Definition at line 1410 of file system_state.cpp.

◆ toggle_defensive_position()

void sys::state::toggle_defensive_position ( dcon::automated_army_group_id  group,
dcon::province_id  position 
)

Definition at line 4509 of file system_state.cpp.

◆ toggle_designated_port()

void sys::state::toggle_designated_port ( dcon::automated_army_group_id  group,
dcon::province_id  position 
)

Definition at line 4535 of file system_state.cpp.

◆ toggle_enforce_control_position()

void sys::state::toggle_enforce_control_position ( dcon::automated_army_group_id  group,
dcon::province_id  position 
)

Definition at line 4522 of file system_state.cpp.

◆ update_armies_and_fleets()

void sys::state::update_armies_and_fleets ( dcon::automated_army_group_id  group)

Definition at line 4669 of file system_state.cpp.

Here is the caller graph for this function:

◆ update_ui_scale()

void sys::state::update_ui_scale ( float  new_scale)

Definition at line 1707 of file system_state.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ actual_game_speed

std::atomic<int32_t> sys::state::actual_game_speed = 0

Definition at line 616 of file system_state.hpp.

◆ adjacency_data_out_of_date

bool sys::state::adjacency_data_out_of_date = true

Definition at line 500 of file system_state.hpp.

◆ autosave_counter

int32_t sys::state::autosave_counter = 0

Definition at line 511 of file system_state.hpp.

◆ cheat_data

cheat_data_s sys::state::cheat_data

Definition at line 657 of file system_state.hpp.

◆ common_fs

simple_fs::file_system sys::state::common_fs

Definition at line 605 of file system_state.hpp.

◆ console_command_error

std::string sys::state::console_command_error

Definition at line 666 of file system_state.hpp.

◆ console_command_pending

std::string sys::state::console_command_pending

Definition at line 664 of file system_state.hpp.

◆ console_command_result

std::string sys::state::console_command_result

Definition at line 665 of file system_state.hpp.

◆ crisis_colony

dcon::state_definition_id sys::state::crisis_colony

Definition at line 536 of file system_state.hpp.

◆ crisis_last_checked_gp

uint32_t sys::state::crisis_last_checked_gp = 0

Definition at line 532 of file system_state.hpp.

◆ crisis_liberation_tag

dcon::national_identity_id sys::state::crisis_liberation_tag

Definition at line 535 of file system_state.hpp.

◆ crisis_participants

std::vector<crisis_member_def> sys::state::crisis_participants

Definition at line 526 of file system_state.hpp.

◆ crisis_state

dcon::state_instance_id sys::state::crisis_state

Definition at line 525 of file system_state.hpp.

◆ crisis_temperature

float sys::state::crisis_temperature = 0

Definition at line 528 of file system_state.hpp.

◆ crisis_war

dcon::war_id sys::state::crisis_war

Definition at line 533 of file system_state.hpp.

◆ ctrl_armies

std::array<std::vector<dcon::army_id>, 10> sys::state::ctrl_armies

Definition at line 591 of file system_state.hpp.

◆ ctrl_navies

std::array<std::vector<dcon::navy_id>, 10> sys::state::ctrl_navies

Definition at line 592 of file system_state.hpp.

◆ culture_definitions

culture::global_cultural_state sys::state::culture_definitions

Definition at line 480 of file system_state.hpp.

◆ current_crisis

crisis_type sys::state::current_crisis = crisis_type::none

Definition at line 527 of file system_state.hpp.

◆ current_crisis_mode

crisis_mode sys::state::current_crisis_mode = crisis_mode::inactive

Definition at line 531 of file system_state.hpp.

◆ current_date

sys::date sys::state::current_date = sys::date{0}

Definition at line 581 of file system_state.hpp.

◆ current_scene

game_scene::scene_properties sys::state::current_scene

Definition at line 600 of file system_state.hpp.

◆ defines

parsing::defines sys::state::defines

Definition at line 477 of file system_state.hpp.

◆ diplomatic_cached_values_out_of_date

bool sys::state::diplomatic_cached_values_out_of_date = false

Definition at line 502 of file system_state.hpp.

◆ drag_selecting

bool sys::state::drag_selecting = false

Definition at line 638 of file system_state.hpp.

◆ economy_definitions

economy::global_economy_state sys::state::economy_definitions

Definition at line 479 of file system_state.hpp.

◆ effect_data

std::vector<uint16_t> sys::state::effect_data

Definition at line 490 of file system_state.hpp.

◆ effect_data_indices

std::vector<int32_t> sys::state::effect_data_indices

Definition at line 491 of file system_state.hpp.

◆ end_date

absolute_time_point sys::state::end_date

Definition at line 486 of file system_state.hpp.

◆ fif_environment

std::unique_ptr<fif::environment> sys::state::fif_environment

Definition at line 667 of file system_state.hpp.

◆ flag_type_map

std::vector<uint8_t> sys::state::flag_type_map

Definition at line 565 of file system_state.hpp.

◆ flag_types

std::vector<culture::flag_type> sys::state::flag_types

Definition at line 567 of file system_state.hpp.

◆ font_collection

text::font_manager sys::state::font_collection

Definition at line 609 of file system_state.hpp.

◆ future_n_event

std::vector<event::pending_human_n_event> sys::state::future_n_event

Definition at line 553 of file system_state.hpp.

◆ future_p_event

std::vector<event::pending_human_p_event> sys::state::future_p_event

Definition at line 554 of file system_state.hpp.

◆ game_seed

uint32_t sys::state::game_seed = 0

Definition at line 583 of file system_state.hpp.

◆ game_state_updated

std::atomic<bool> sys::state::game_state_updated = false

Definition at line 612 of file system_state.hpp.

◆ great_nations

std::vector<great_nation> sys::state::great_nations

Definition at line 507 of file system_state.hpp.

◆ incoming_commands

rigtorp::SPSCQueue<command::payload> sys::state::incoming_commands

Definition at line 617 of file system_state.hpp.

◆ inflation

float sys::state::inflation = 1.0f

Definition at line 584 of file system_state.hpp.

◆ internally_paused

bool sys::state::internally_paused = false

Definition at line 633 of file system_state.hpp.

◆ is_dragging

bool sys::state::is_dragging = false

Definition at line 641 of file system_state.hpp.

◆ key_data

std::vector<char> sys::state::key_data

Definition at line 495 of file system_state.hpp.

◆ land_battle_reports

rigtorp::SPSCQueue<military::land_battle_report> sys::state::land_battle_reports

Definition at line 629 of file system_state.hpp.

◆ last_crisis_end_date

sys::date sys::state::last_crisis_end_date {0}

Definition at line 534 of file system_state.hpp.

◆ last_update

std::chrono::time_point<std::chrono::steady_clock> sys::state::last_update = std::chrono::steady_clock::now()

Definition at line 632 of file system_state.hpp.

◆ loaded_save_file

native_string sys::state::loaded_save_file

Definition at line 515 of file system_state.hpp.

◆ loaded_scenario_file

native_string sys::state::loaded_scenario_file

Definition at line 514 of file system_state.hpp.

◆ local_player_nation

dcon::nation_id sys::state::local_player_nation

Definition at line 580 of file system_state.hpp.

◆ locale_key_to_text_sequence

ankerl::unordered_dense::map<dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq> sys::state::locale_key_to_text_sequence

Definition at line 498 of file system_state.hpp.

◆ locale_text_data

std::vector<char> sys::state::locale_text_data

Definition at line 496 of file system_state.hpp.

◆ lock_console_strings

std::mutex sys::state::lock_console_strings

Definition at line 663 of file system_state.hpp.

◆ map_state

map::map_state sys::state::map_state

Definition at line 647 of file system_state.hpp.

◆ military_definitions

military::global_military_state sys::state::military_definitions

Definition at line 481 of file system_state.hpp.

◆ mouse_x_position

int32_t sys::state::mouse_x_position = 0

Definition at line 639 of file system_state.hpp.

◆ mouse_y_position

int32_t sys::state::mouse_y_position = 0

Definition at line 640 of file system_state.hpp.

◆ national_cached_values_out_of_date

bool sys::state::national_cached_values_out_of_date = false

Definition at line 501 of file system_state.hpp.

◆ national_definitions

nations::global_national_state sys::state::national_definitions

Definition at line 482 of file system_state.hpp.

◆ nations_by_industrial_score

std::vector<dcon::nation_id> sys::state::nations_by_industrial_score

Definition at line 504 of file system_state.hpp.

◆ nations_by_military_score

std::vector<dcon::nation_id> sys::state::nations_by_military_score

Definition at line 505 of file system_state.hpp.

◆ nations_by_prestige_score

std::vector<dcon::nation_id> sys::state::nations_by_prestige_score

Definition at line 506 of file system_state.hpp.

◆ nations_by_rank

std::vector<dcon::nation_id> sys::state::nations_by_rank

Definition at line 503 of file system_state.hpp.

◆ naval_battle_reports

rigtorp::SPSCQueue<military::naval_battle_report> sys::state::naval_battle_reports

Definition at line 628 of file system_state.hpp.

◆ network_mode

Definition at line 579 of file system_state.hpp.

◆ network_state

network::network_state sys::state::network_state

Definition at line 660 of file system_state.hpp.

◆ new_f_n_event

Definition at line 623 of file system_state.hpp.

◆ new_f_p_event

Definition at line 625 of file system_state.hpp.

◆ new_messages

rigtorp::SPSCQueue<notification::message> sys::state::new_messages

Definition at line 627 of file system_state.hpp.

◆ new_n_event

Definition at line 622 of file system_state.hpp.

◆ new_p_event

Definition at line 624 of file system_state.hpp.

◆ new_requests

Definition at line 626 of file system_state.hpp.

◆ open_gl

ogl::data sys::state::open_gl

Definition at line 650 of file system_state.hpp.

◆ pending_f_n_event

std::vector<event::pending_human_f_n_event> sys::state::pending_f_n_event

Definition at line 549 of file system_state.hpp.

◆ pending_f_p_event

std::vector<event::pending_human_f_p_event> sys::state::pending_f_p_event

Definition at line 551 of file system_state.hpp.

◆ pending_messages

std::array<diplomatic_message::message, 128> sys::state::pending_messages = {}

Definition at line 542 of file system_state.hpp.

◆ pending_n_event

std::vector<event::pending_human_n_event> sys::state::pending_n_event

Definition at line 548 of file system_state.hpp.

◆ pending_p_event

std::vector<event::pending_human_p_event> sys::state::pending_p_event

Definition at line 550 of file system_state.hpp.

◆ player_data_cache

player_data sys::state::player_data_cache

Definition at line 585 of file system_state.hpp.

◆ primary_crisis_attacker

dcon::nation_id sys::state::primary_crisis_attacker

Definition at line 529 of file system_state.hpp.

◆ primary_crisis_defender

dcon::nation_id sys::state::primary_crisis_defender

Definition at line 530 of file system_state.hpp.

◆ province_definitions

province::global_provincial_state sys::state::province_definitions

Definition at line 483 of file system_state.hpp.

◆ province_ownership_changed

std::atomic<bool> sys::state::province_ownership_changed = true

Definition at line 613 of file system_state.hpp.

◆ quit_signaled

std::atomic<bool> sys::state::quit_signaled = false

Definition at line 615 of file system_state.hpp.

◆ railroad_built

std::atomic<bool> sys::state::railroad_built = true

Definition at line 619 of file system_state.hpp.

◆ save_list_updated

std::atomic<bool> sys::state::save_list_updated = false

Definition at line 614 of file system_state.hpp.

◆ scenario_checksum

sys::checksum_key sys::state::scenario_checksum

Definition at line 512 of file system_state.hpp.

◆ scenario_counter

uint32_t sys::state::scenario_counter = 0

Definition at line 510 of file system_state.hpp.

◆ scenario_time_stamp

uint64_t sys::state::scenario_time_stamp = 0

Definition at line 509 of file system_state.hpp.

◆ selected_armies

std::vector<dcon::army_id> sys::state::selected_armies

Definition at line 586 of file system_state.hpp.

◆ selected_army_group

dcon::automated_army_group_id sys::state::selected_army_group {}

Definition at line 595 of file system_state.hpp.

◆ selected_army_group_order

army_group_order sys::state::selected_army_group_order = army_group_order::none

Definition at line 597 of file system_state.hpp.

◆ selected_navies

std::vector<dcon::navy_id> sys::state::selected_navies

Definition at line 587 of file system_state.hpp.

◆ session_host_checksum

sys::checksum_key sys::state::session_host_checksum

Definition at line 513 of file system_state.hpp.

◆ sound_ptr

std::unique_ptr<sound::sound_impl> sys::state::sound_ptr = nullptr

Definition at line 607 of file system_state.hpp.

◆ start_date

absolute_time_point sys::state::start_date

Definition at line 485 of file system_state.hpp.

◆ state_selection

std::optional<state_selection_data> sys::state::state_selection

Definition at line 602 of file system_state.hpp.

◆ stored_map_mode

map_mode::mode sys::state::stored_map_mode = map_mode::mode::political

Definition at line 603 of file system_state.hpp.

◆ tooltip_timer

std::chrono::time_point<std::chrono::steady_clock> sys::state::tooltip_timer = std::chrono::steady_clock::now()

Definition at line 644 of file system_state.hpp.

◆ trigger_data

std::vector<uint16_t> sys::state::trigger_data

Definition at line 488 of file system_state.hpp.

◆ trigger_data_indices

std::vector<int32_t> sys::state::trigger_data_indices

Definition at line 489 of file system_state.hpp.

◆ type_localized_key

int32_t sys::state::type_localized_key = -1

Definition at line 669 of file system_state.hpp.

◆ type_text_key

int32_t sys::state::type_text_key = -1

Definition at line 668 of file system_state.hpp.

◆ ugly_ui_game_interaction_hack

std::mutex sys::state::ugly_ui_game_interaction_hack

Definition at line 588 of file system_state.hpp.

◆ ui_date

sys::date sys::state::ui_date = sys::date{0}

Definition at line 582 of file system_state.hpp.

◆ ui_defs

ui::definitions sys::state::ui_defs

Definition at line 563 of file system_state.hpp.

◆ ui_pause

std::atomic<bool> sys::state::ui_pause = false

Definition at line 618 of file system_state.hpp.

◆ ui_state

ui::state sys::state::ui_state

Definition at line 608 of file system_state.hpp.

◆ unit_names

std::vector<char> sys::state::unit_names

Definition at line 557 of file system_state.hpp.

◆ unit_names_indices

std::vector<int32_t> sys::state::unit_names_indices

Definition at line 556 of file system_state.hpp.

◆ untrans_key_to_text_sequence

ankerl::unordered_dense::set<dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq> sys::state::untrans_key_to_text_sequence

Definition at line 497 of file system_state.hpp.

◆ user_settings

user_settings_s sys::state::user_settings

Definition at line 573 of file system_state.hpp.

◆ value_modifier_segments

std::vector<value_modifier_segment> sys::state::value_modifier_segments

Definition at line 492 of file system_state.hpp.

◆ value_modifiers

tagged_vector<value_modifier_description, dcon::value_modifier_key> sys::state::value_modifiers

Definition at line 493 of file system_state.hpp.

◆ win_ptr

std::unique_ptr<window::window_data_impl> sys::state::win_ptr = nullptr

Definition at line 606 of file system_state.hpp.

◆ world

dcon::data_container sys::state::world

Definition at line 473 of file system_state.hpp.

◆ x_drag_start

int32_t sys::state::x_drag_start = 0

Definition at line 642 of file system_state.hpp.

◆ x_size

int32_t sys::state::x_size = 0

Definition at line 636 of file system_state.hpp.

◆ y_drag_start

int32_t sys::state::y_drag_start = 0

Definition at line 643 of file system_state.hpp.

◆ y_size

int32_t sys::state::y_size = 0

Definition at line 637 of file system_state.hpp.


The documentation for this struct was generated from the following files: