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

Holds important data about the game world, state, and other data regarding windowing, audio, and more. More...

#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 log_player_nations ()
 
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 const &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::nation_id crisis_attacker
 
dcon::nation_id crisis_defender
 
dcon::state_instance_id crisis_state_instance
 
crisis_type current_crisis = crisis_type::none
 
std::vector< crisis_member_defcrisis_participants
 
std::vector< sys::full_wgcrisis_attacker_wargoals
 
std::vector< sys::full_wgcrisis_defender_wargoals
 
float crisis_temperature = 0
 
dcon::nation_id primary_crisis_attacker
 
dcon::nation_id primary_crisis_defender
 
crisis_state current_crisis_state = crisis_state::inactive
 
uint32_t crisis_last_checked_gp = 0
 
dcon::war_id crisis_war
 
sys::date last_crisis_end_date {0}
 
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
 
host_settings_s host_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::regiment_id > selected_regiments
 
std::vector< dcon::navy_id > selected_navies
 
std::vector< dcon::ship_id > selected_ships
 
dcon::commodity_id selected_trade_good
 
dcon::factory_type_id selected_factory_type
 
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
 
ogl::animation ui_animation
 
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
 
std::atomic< bool > update_trade_flow = 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
 
map::map_state map_state
 
iui::iui_state iui_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

Holds important data about the game world, state, and other data regarding windowing, audio, and more.

Definition at line 480 of file system_state.hpp.

Constructor & Destructor Documentation

◆ state()

sys::state::state ( )
inline

Definition at line 750 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 4691 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 1335 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 1338 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 1312 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 1315 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 1378 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 1381 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 1355 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 1358 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 4697 of file system_state.cpp.

◆ add_unit_name()

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

Definition at line 1392 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 4617 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 4844 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 5066 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 4961 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 5330 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 4997 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 const &  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 5574 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 1469 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 1435 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 4550 of file system_state.cpp.

Here is the caller graph for this function:

◆ debug_save_oos_dump()

void sys::state::debug_save_oos_dump ( )

Definition at line 4463 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 4482 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 4713 of file system_state.cpp.

◆ deselect() [1/2]

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

Definition at line 789 of file system_state.hpp.

◆ deselect() [2/2]

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

Definition at line 799 of file system_state.hpp.

◆ deselect_army_group()

void sys::state::deselect_army_group ( )

Definition at line 4782 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 5469 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 4788 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 3640 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 5546 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 4882 of file system_state.cpp.

Here is the call graph for this function:

◆ game_loop()

void sys::state::game_loop ( )

Definition at line 4501 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 5048 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 4449 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 771 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 774 of file system_state.hpp.

◆ key_is_localized() [1/2]

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

Definition at line 1296 of file system_state.cpp.

◆ key_is_localized() [2/2]

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

Definition at line 1302 of file system_state.cpp.

◆ load_locale_strings()

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

Definition at line 1239 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 1767 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 1563 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 1221 of file system_state.cpp.

◆ log_player_nations()

void sys::state::log_player_nations ( )

◆ lookup_key()

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

Definition at line 1305 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 4943 of file system_state.cpp.

◆ new_army_group()

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

Definition at line 4554 of file system_state.cpp.

◆ on_create()

void sys::state::on_create ( )

Definition at line 1114 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 383 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 432 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 441 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 340 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 351 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 334 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 348 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 375 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 354 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 402 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 330 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 347 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 389 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 3334 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 461 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 1755 of file system_state.cpp.

Here is the call graph for this function:

◆ preload()

void sys::state::preload ( )

Definition at line 3290 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 4875 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 4685 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 4655 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 4679 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 4666 of file system_state.cpp.

◆ render()

void sys::state::render ( )

Definition at line 468 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 1233 of file system_state.cpp.

◆ save_user_settings()

void sys::state::save_user_settings ( ) const

Definition at line 1503 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 777 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 783 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 4776 of file system_state.cpp.

◆ single_game_tick()

void sys::state::single_game_tick ( )

Definition at line 3878 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 4762 of file system_state.cpp.

◆ start_state_selection()

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

Definition at line 294 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 307 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 1207 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 1421 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 4574 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 4600 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 4587 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 4734 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 1718 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 636 of file system_state.hpp.

◆ adjacency_data_out_of_date

bool sys::state::adjacency_data_out_of_date = true

Definition at line 508 of file system_state.hpp.

◆ autosave_counter

int32_t sys::state::autosave_counter = 0

Definition at line 519 of file system_state.hpp.

◆ cheat_data

cheat_data_s sys::state::cheat_data

Definition at line 680 of file system_state.hpp.

◆ common_fs

simple_fs::file_system sys::state::common_fs

Definition at line 624 of file system_state.hpp.

◆ console_command_error

std::string sys::state::console_command_error

Definition at line 689 of file system_state.hpp.

◆ console_command_pending

std::string sys::state::console_command_pending

Definition at line 687 of file system_state.hpp.

◆ console_command_result

std::string sys::state::console_command_result

Definition at line 688 of file system_state.hpp.

◆ crisis_attacker

dcon::nation_id sys::state::crisis_attacker

Definition at line 533 of file system_state.hpp.

◆ crisis_attacker_wargoals

std::vector<sys::full_wg> sys::state::crisis_attacker_wargoals

Definition at line 540 of file system_state.hpp.

◆ crisis_defender

dcon::nation_id sys::state::crisis_defender

Definition at line 534 of file system_state.hpp.

◆ crisis_defender_wargoals

std::vector<sys::full_wg> sys::state::crisis_defender_wargoals

Definition at line 541 of file system_state.hpp.

◆ crisis_last_checked_gp

uint32_t sys::state::crisis_last_checked_gp = 0

Definition at line 546 of file system_state.hpp.

◆ crisis_participants

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

Definition at line 539 of file system_state.hpp.

◆ crisis_state_instance

dcon::state_instance_id sys::state::crisis_state_instance

Definition at line 536 of file system_state.hpp.

◆ crisis_temperature

float sys::state::crisis_temperature = 0

Definition at line 542 of file system_state.hpp.

◆ crisis_war

dcon::war_id sys::state::crisis_war

Definition at line 547 of file system_state.hpp.

◆ ctrl_armies

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

Definition at line 610 of file system_state.hpp.

◆ ctrl_navies

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

Definition at line 611 of file system_state.hpp.

◆ culture_definitions

culture::global_cultural_state sys::state::culture_definitions

Definition at line 488 of file system_state.hpp.

◆ current_crisis

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

Definition at line 538 of file system_state.hpp.

◆ current_crisis_state

crisis_state sys::state::current_crisis_state = crisis_state::inactive

Definition at line 545 of file system_state.hpp.

◆ current_date

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

Definition at line 594 of file system_state.hpp.

◆ current_scene

game_scene::scene_properties sys::state::current_scene

Definition at line 619 of file system_state.hpp.

◆ defines

parsing::defines sys::state::defines

Definition at line 485 of file system_state.hpp.

◆ diplomatic_cached_values_out_of_date

bool sys::state::diplomatic_cached_values_out_of_date = false

Definition at line 510 of file system_state.hpp.

◆ drag_selecting

bool sys::state::drag_selecting = false

Definition at line 659 of file system_state.hpp.

◆ economy_definitions

economy::global_economy_state sys::state::economy_definitions

Definition at line 487 of file system_state.hpp.

◆ effect_data

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

Definition at line 498 of file system_state.hpp.

◆ effect_data_indices

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

Definition at line 499 of file system_state.hpp.

◆ end_date

absolute_time_point sys::state::end_date

Definition at line 494 of file system_state.hpp.

◆ fif_environment

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

Definition at line 690 of file system_state.hpp.

◆ flag_type_map

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

Definition at line 577 of file system_state.hpp.

◆ flag_types

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

Definition at line 578 of file system_state.hpp.

◆ font_collection

text::font_manager sys::state::font_collection

Definition at line 629 of file system_state.hpp.

◆ future_n_event

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

Definition at line 565 of file system_state.hpp.

◆ future_p_event

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

Definition at line 566 of file system_state.hpp.

◆ game_seed

uint32_t sys::state::game_seed = 0

Definition at line 596 of file system_state.hpp.

◆ game_state_updated

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

Definition at line 632 of file system_state.hpp.

◆ great_nations

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

Definition at line 515 of file system_state.hpp.

◆ host_settings

host_settings_s sys::state::host_settings

Definition at line 586 of file system_state.hpp.

◆ incoming_commands

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

Definition at line 637 of file system_state.hpp.

◆ inflation

float sys::state::inflation = 1.0f

Definition at line 597 of file system_state.hpp.

◆ internally_paused

bool sys::state::internally_paused = false

Definition at line 654 of file system_state.hpp.

◆ is_dragging

bool sys::state::is_dragging = false

Definition at line 662 of file system_state.hpp.

◆ iui_state

iui::iui_state sys::state::iui_state

Definition at line 670 of file system_state.hpp.

◆ key_data

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

Definition at line 503 of file system_state.hpp.

◆ land_battle_reports

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

Definition at line 650 of file system_state.hpp.

◆ last_crisis_end_date

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

Definition at line 548 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 653 of file system_state.hpp.

◆ loaded_save_file

native_string sys::state::loaded_save_file

Definition at line 523 of file system_state.hpp.

◆ loaded_scenario_file

native_string sys::state::loaded_scenario_file

Definition at line 522 of file system_state.hpp.

◆ local_player_nation

dcon::nation_id sys::state::local_player_nation

Definition at line 593 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 506 of file system_state.hpp.

◆ locale_text_data

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

Definition at line 504 of file system_state.hpp.

◆ lock_console_strings

std::mutex sys::state::lock_console_strings

Definition at line 686 of file system_state.hpp.

◆ map_state

map::map_state sys::state::map_state

Definition at line 667 of file system_state.hpp.

◆ military_definitions

military::global_military_state sys::state::military_definitions

Definition at line 489 of file system_state.hpp.

◆ mouse_x_position

int32_t sys::state::mouse_x_position = 0

Definition at line 660 of file system_state.hpp.

◆ mouse_y_position

int32_t sys::state::mouse_y_position = 0

Definition at line 661 of file system_state.hpp.

◆ national_cached_values_out_of_date

bool sys::state::national_cached_values_out_of_date = false

Definition at line 509 of file system_state.hpp.

◆ national_definitions

nations::global_national_state sys::state::national_definitions

Definition at line 490 of file system_state.hpp.

◆ nations_by_industrial_score

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

Definition at line 512 of file system_state.hpp.

◆ nations_by_military_score

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

Definition at line 513 of file system_state.hpp.

◆ nations_by_prestige_score

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

Definition at line 514 of file system_state.hpp.

◆ nations_by_rank

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

Definition at line 511 of file system_state.hpp.

◆ naval_battle_reports

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

Definition at line 649 of file system_state.hpp.

◆ network_mode

Definition at line 592 of file system_state.hpp.

◆ network_state

network::network_state sys::state::network_state

Definition at line 683 of file system_state.hpp.

◆ new_f_n_event

Definition at line 644 of file system_state.hpp.

◆ new_f_p_event

Definition at line 646 of file system_state.hpp.

◆ new_messages

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

Definition at line 648 of file system_state.hpp.

◆ new_n_event

Definition at line 643 of file system_state.hpp.

◆ new_p_event

Definition at line 645 of file system_state.hpp.

◆ new_requests

Definition at line 647 of file system_state.hpp.

◆ open_gl

ogl::data sys::state::open_gl

Definition at line 673 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 561 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 563 of file system_state.hpp.

◆ pending_messages

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

Definition at line 554 of file system_state.hpp.

◆ pending_n_event

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

Definition at line 560 of file system_state.hpp.

◆ pending_p_event

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

Definition at line 562 of file system_state.hpp.

◆ player_data_cache

player_data sys::state::player_data_cache

Definition at line 598 of file system_state.hpp.

◆ primary_crisis_attacker

dcon::nation_id sys::state::primary_crisis_attacker

Definition at line 543 of file system_state.hpp.

◆ primary_crisis_defender

dcon::nation_id sys::state::primary_crisis_defender

Definition at line 544 of file system_state.hpp.

◆ province_definitions

province::global_provincial_state sys::state::province_definitions

Definition at line 491 of file system_state.hpp.

◆ province_ownership_changed

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

Definition at line 633 of file system_state.hpp.

◆ quit_signaled

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

Definition at line 635 of file system_state.hpp.

◆ railroad_built

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

Definition at line 639 of file system_state.hpp.

◆ save_list_updated

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

Definition at line 634 of file system_state.hpp.

◆ scenario_checksum

sys::checksum_key sys::state::scenario_checksum

Definition at line 520 of file system_state.hpp.

◆ scenario_counter

uint32_t sys::state::scenario_counter = 0

Definition at line 518 of file system_state.hpp.

◆ scenario_time_stamp

uint64_t sys::state::scenario_time_stamp = 0

Definition at line 517 of file system_state.hpp.

◆ selected_armies

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

Definition at line 599 of file system_state.hpp.

◆ selected_army_group

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

Definition at line 614 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 616 of file system_state.hpp.

◆ selected_factory_type

dcon::factory_type_id sys::state::selected_factory_type

Definition at line 606 of file system_state.hpp.

◆ selected_navies

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

Definition at line 602 of file system_state.hpp.

◆ selected_regiments

std::vector<dcon::regiment_id> sys::state::selected_regiments

Definition at line 600 of file system_state.hpp.

◆ selected_ships

std::vector<dcon::ship_id> sys::state::selected_ships

Definition at line 603 of file system_state.hpp.

◆ selected_trade_good

dcon::commodity_id sys::state::selected_trade_good

Definition at line 605 of file system_state.hpp.

◆ session_host_checksum

sys::checksum_key sys::state::session_host_checksum

Definition at line 521 of file system_state.hpp.

◆ sound_ptr

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

Definition at line 626 of file system_state.hpp.

◆ start_date

absolute_time_point sys::state::start_date

Definition at line 493 of file system_state.hpp.

◆ state_selection

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

Definition at line 621 of file system_state.hpp.

◆ stored_map_mode

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

Definition at line 622 of file system_state.hpp.

◆ trigger_data

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

Definition at line 496 of file system_state.hpp.

◆ trigger_data_indices

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

Definition at line 497 of file system_state.hpp.

◆ type_localized_key

int32_t sys::state::type_localized_key = -1

Definition at line 692 of file system_state.hpp.

◆ type_text_key

int32_t sys::state::type_text_key = -1

Definition at line 691 of file system_state.hpp.

◆ ugly_ui_game_interaction_hack

std::mutex sys::state::ugly_ui_game_interaction_hack

Definition at line 607 of file system_state.hpp.

◆ ui_animation

ogl::animation sys::state::ui_animation

Definition at line 628 of file system_state.hpp.

◆ ui_date

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

Definition at line 595 of file system_state.hpp.

◆ ui_defs

ui::definitions sys::state::ui_defs

Definition at line 575 of file system_state.hpp.

◆ ui_pause

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

Definition at line 638 of file system_state.hpp.

◆ ui_state

ui::state sys::state::ui_state

Definition at line 627 of file system_state.hpp.

◆ unit_names

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

Definition at line 569 of file system_state.hpp.

◆ unit_names_indices

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

Definition at line 568 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 505 of file system_state.hpp.

◆ update_trade_flow

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

Definition at line 640 of file system_state.hpp.

◆ user_settings

user_settings_s sys::state::user_settings

Definition at line 584 of file system_state.hpp.

◆ value_modifier_segments

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

Definition at line 500 of file system_state.hpp.

◆ value_modifiers

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

Definition at line 501 of file system_state.hpp.

◆ win_ptr

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

Definition at line 625 of file system_state.hpp.

◆ world

dcon::data_container sys::state::world

Definition at line 481 of file system_state.hpp.

◆ x_drag_start

int32_t sys::state::x_drag_start = 0

Definition at line 663 of file system_state.hpp.

◆ x_size

int32_t sys::state::x_size = 0

Definition at line 657 of file system_state.hpp.

◆ y_drag_start

int32_t sys::state::y_drag_start = 0

Definition at line 664 of file system_state.hpp.

◆ y_size

int32_t sys::state::y_size = 0

Definition at line 658 of file system_state.hpp.


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