Project Alice
|
Namespaces | |
namespace | national_mod_offsets |
namespace | provincial_mod_offsets |
Classes | |
class | absolute_time_point |
struct | build_queue_data |
struct | cheat_data_s |
struct | checksum_key |
struct | commodity_modifier |
struct | crisis_join_offer |
struct | crisis_member_def |
class | date |
struct | dated_modifier |
struct | event_option |
struct | global_scenario_data_s |
struct | great_nation |
struct | hsv |
struct | macro_builder_template |
struct | mod_identifier |
struct | modifier_hash |
struct | msg_setting_entry |
struct | national_modifier_definition |
struct | player_data |
struct | player_name |
struct | provincial_modifier_definition |
struct | rebel_org_modifier |
struct | save_header |
struct | scenario_header |
struct | scenario_size |
struct | state |
struct | state_selection_data |
struct | unit_modifier |
struct | unit_variable_stats |
struct | user_settings_s |
struct | value_modifier_description |
struct | value_modifier_segment |
struct | year_month_day |
Functions | |
float | red_from_int (uint32_t v) |
float | green_from_int (uint32_t v) |
float | blue_from_int (uint32_t v) |
uint32_t | pack_color (float r, float g, float b) |
int32_t | int_red_from_int (uint32_t v) |
int32_t | int_green_from_int (uint32_t v) |
int32_t | int_blue_from_int (uint32_t v) |
uint32_t | pack_color (int32_t r, int32_t g, int32_t b) |
hsv | rgb_to_hsv (uint32_t v) |
uint32_t | hsv_to_rgb (hsv v) |
constexpr int | days_from_civil (int y, unsigned m, unsigned d) noexcept |
constexpr year_month_day | civil_from_days (int64_t z) noexcept |
bool | is_playable_date (date d, absolute_time_point start, absolute_time_point end) |
int32_t | days_difference (year_month_day start, year_month_day end) |
bool | is_leap_year (int32_t year) |
void | apply_modifier_values_to_nation (sys::state &state, dcon::nation_id target_nation, dcon::modifier_id mod_id) |
void | apply_scaled_modifier_values_to_nation (sys::state &state, dcon::nation_id target_nation, dcon::modifier_id mod_id, float scale) |
void | apply_modifier_values_to_province (sys::state &state, dcon::province_id target_prov, dcon::modifier_id mod_id) |
void | add_modifier_to_nation (sys::state &state, dcon::nation_id target_nation, dcon::modifier_id mod_id, sys::date expiration) |
void | add_modifier_to_province (sys::state &state, dcon::province_id target_prov, dcon::modifier_id mod_id, sys::date expiration) |
void | remove_modifier_from_nation (sys::state &state, dcon::nation_id target_nation, dcon::modifier_id mod_id) |
void | remove_modifier_from_province (sys::state &state, dcon::province_id target_prov, dcon::modifier_id mod_id) |
void | toggle_modifier_from_province (sys::state &state, dcon::province_id target_prov, dcon::modifier_id mod_id, sys::date expiration) |
template<typename F > | |
void | bulk_apply_masked_modifier_to_nations (sys::state &state, dcon::modifier_id m, F const &mask_functor) |
template<typename F > | |
void | bulk_apply_scaled_modifier_to_nations (sys::state &state, dcon::modifier_id m, F const &scale_functor) |
template<typename F > | |
void | bulk_apply_masked_modifier_to_provinces (sys::state &state, dcon::modifier_id mod_id, F const &mask_functor) |
void | bulk_apply_modifier_to_provinces (sys::state &state, dcon::modifier_id mod_id) |
template<typename F > | |
void | bulk_apply_scaled_modifier_to_provinces (sys::state &state, dcon::modifier_id mod_id, F const &scale_functor) |
void | recreate_national_modifiers (sys::state &state) |
void | update_single_nation_modifiers (sys::state &state, dcon::nation_id n) |
void | recreate_province_modifiers (sys::state &state) |
void | repopulate_modifier_effects (sys::state &state) |
void | update_modifier_effects (sys::state &state) |
void | remove_expired_modifiers_from_nation (sys::state &state, dcon::nation_id target_nation) |
void | remove_expired_modifiers_from_province (sys::state &state, dcon::province_id target_prov) |
uint8_t const * | read_scenario_header (uint8_t const *ptr_in, scenario_header &header_out) |
uint8_t const * | read_save_header (uint8_t const *ptr_in, save_header &header_out) |
uint8_t * | write_scenario_header (uint8_t *ptr_in, scenario_header const &header_in) |
uint8_t * | write_save_header (uint8_t *ptr_in, save_header const &header_in) |
size_t | sizeof_scenario_header (scenario_header const &header_in) |
size_t | sizeof_save_header (save_header const &header_in) |
void | read_mod_path (uint8_t const *ptr_in, uint8_t const *lim, native_string &path_out) |
uint8_t const * | load_mod_path (uint8_t const *ptr_in, sys::state &state) |
uint8_t * | write_mod_path (uint8_t *ptr_in, native_string const &path_in) |
size_t | sizeof_mod_path (native_string const &path_in) |
mod_identifier | extract_mod_information (uint8_t const *ptr_in, uint64_t file_size) |
uint8_t * | write_compressed_section (uint8_t *ptr_out, uint8_t const *ptr_in, uint32_t uncompressed_size) |
template<typename T > | |
uint8_t const * | with_decompressed_section (uint8_t const *ptr_in, T const &function) |
uint8_t const * | read_scenario_section (uint8_t const *ptr_in, uint8_t const *section_end, sys::state &state) |
uint8_t * | write_scenario_section (uint8_t *ptr_in, sys::state &state) |
scenario_size | sizeof_scenario_section (sys::state &state) |
uint8_t const * | read_save_section (uint8_t const *ptr_in, uint8_t const *section_end, sys::state &state) |
uint8_t * | write_save_section (uint8_t *ptr_in, sys::state &state) |
size_t | sizeof_save_section (sys::state &state) |
void | write_scenario_file (sys::state &state, native_string_view name, uint32_t count) |
bool | try_read_scenario_file (sys::state &state, native_string_view name) |
bool | try_read_scenario_and_save_file (sys::state &state, native_string_view name) |
bool | try_read_scenario_as_save_file (sys::state &state, native_string_view name) |
std::string | make_time_string (uint64_t value) |
void | write_save_file (sys::state &state, save_type type, std::string const &name) |
bool | try_read_save_file (sys::state &state, native_string_view name) |
template<typename T > | |
size_t | serialize_size (std::vector< T > const &vec) |
template<typename T > | |
uint8_t * | serialize (uint8_t *ptr_in, std::vector< T > const &vec) |
template<typename T > | |
uint8_t const * | deserialize (uint8_t const *ptr_in, std::vector< T > &vec) |
template<typename T > | |
uint8_t * | memcpy_serialize (uint8_t *ptr_in, T const &obj) |
template<typename T > | |
uint8_t const * | memcpy_deserialize (uint8_t const *ptr_in, T &obj) |
template<typename T , typename tag_type > | |
size_t | serialize_size (tagged_vector< T, tag_type > const &vec) |
template<typename T , typename tag_type > | |
uint8_t * | serialize (uint8_t *ptr_in, tagged_vector< T, tag_type > const &vec) |
template<typename T , typename tag_type > | |
uint8_t const * | deserialize (uint8_t const *ptr_in, tagged_vector< T, tag_type > &vec) |
size_t | serialize_size (ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec) |
size_t | serialize_size (ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec) |
uint8_t * | serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec) |
uint8_t * | serialize (uint8_t *ptr_in, ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec) |
uint8_t const * | deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > &vec) |
uint8_t const * | deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > &vec) |
size_t | serialize_size (ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > const &vec) |
uint8_t * | serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > const &vec) |
uint8_t const * | deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > &vec) |
size_t | serialize_size (ankerl::unordered_dense::map< uint16_t, dcon::text_key > const &vec) |
uint8_t * | serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< uint16_t, dcon::text_key > const &vec) |
uint8_t const * | deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< uint16_t, dcon::text_key > &vec) |
void | list_pop_types (sys::state &state, parsers::scenario_building_context &context) |
Variables | |
constexpr float | ui_scales [] = {0.25f, 0.30f, 0.35f, 0.5f, 0.75f, 1.0f, 1.25f, 1.5f, 1.75f, 2.0f, 2.5f, 3.0f} |
constexpr uint32_t | ui_scales_count = 12 |
constexpr int32_t | max_autosaves = 16 |
constexpr msg_setting_entry | message_setting_map [size_t(message_base_type::count)] |
constexpr int32_t | max_event_options = 8 |
constexpr uint32_t | max_languages = 64 |
constexpr uint32_t | save_file_version = 42 |
constexpr uint32_t | scenario_file_version = 135 + save_file_version |
constexpr int32_t | tooltip_width = 400 |
|
strong |
Enumerator | |
---|---|
siege | |
defend | |
designate_port | |
none |
Definition at line 216 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
move_to_target | |
move_to_port | |
standby | |
await_transport | |
is_transported | |
disembark | |
embark |
Definition at line 199 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
idle | |
gather_at_hq | |
defend_position | |
siege |
Definition at line 209 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
none | |
yearly | |
monthly | |
daily |
Definition at line 169 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
none | |
protan | |
deutan | |
tritan | |
achroma |
Definition at line 554 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
military_goods | |
raw_material_goods | |
industrial_goods | |
consumer_goods | |
industrial_and_consumer_goods | |
count |
Definition at line 223 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
inactive | |
finding_attacker | |
finding_defender | |
heating_up |
Definition at line 438 of file system_state.hpp.
|
strong |
Enumerator | |
---|---|
none | |
claim | |
liberation | |
colonial | |
influence |
Definition at line 437 of file system_state.hpp.
|
strong |
Enumerator | |
---|---|
faithful | |
nouveau | |
dummycabooseval |
Definition at line 42 of file system_state.hpp.
|
strong |
Enumerator | |
---|---|
modifiers_none | |
modifiers_alt | |
modifiers_ctrl | |
modifiers_shift | |
modifiers_ctrl_shift | |
modifiers_ctrl_alt | |
modifiers_alt_shift | |
modifiers_all |
Definition at line 156 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
none | |
linear | |
quadratic | |
cubic |
Definition at line 178 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
inherit | |
same | |
none |
Definition at line 193 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
panning | |
inverted | |
centered | |
to_cursor | |
away_from_cursor |
Definition at line 185 of file constants.hpp.
|
strong |
Definition at line 333 of file constants.hpp.
|
strong |
Definition at line 225 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
single_player | |
client | |
host |
Definition at line 548 of file constants.hpp.
|
strong |
Enumerator | |
---|---|
globe_ortho | |
flat | |
globe_perpect | |
num_of_modes |
Definition at line 43 of file system_state.hpp.
enum sys::save_type : uint8_t |
Enumerator | |
---|---|
normal | |
autosave | |
bookmark |
Definition at line 565 of file constants.hpp.
|
strong |
Definition at line 5 of file constants.hpp.
void sys::add_modifier_to_nation | ( | sys::state & | state, |
dcon::nation_id | target_nation, | ||
dcon::modifier_id | mod_id, | ||
sys::date | expiration | ||
) |
void sys::add_modifier_to_province | ( | sys::state & | state, |
dcon::province_id | target_prov, | ||
dcon::modifier_id | mod_id, | ||
sys::date | expiration | ||
) |
void sys::apply_modifier_values_to_nation | ( | sys::state & | state, |
dcon::nation_id | target_nation, | ||
dcon::modifier_id | mod_id | ||
) |
void sys::apply_modifier_values_to_province | ( | sys::state & | state, |
dcon::province_id | target_prov, | ||
dcon::modifier_id | mod_id | ||
) |
Definition at line 39 of file modifiers.cpp.
void sys::apply_scaled_modifier_values_to_nation | ( | sys::state & | state, |
dcon::nation_id | target_nation, | ||
dcon::modifier_id | mod_id, | ||
float | scale | ||
) |
|
inline |
void sys::bulk_apply_masked_modifier_to_nations | ( | sys::state & | state, |
dcon::modifier_id | m, | ||
F const & | mask_functor | ||
) |
void sys::bulk_apply_masked_modifier_to_provinces | ( | sys::state & | state, |
dcon::modifier_id | mod_id, | ||
F const & | mask_functor | ||
) |
void sys::bulk_apply_modifier_to_provinces | ( | sys::state & | state, |
dcon::modifier_id | mod_id | ||
) |
void sys::bulk_apply_scaled_modifier_to_nations | ( | sys::state & | state, |
dcon::modifier_id | m, | ||
F const & | scale_functor | ||
) |
void sys::bulk_apply_scaled_modifier_to_provinces | ( | sys::state & | state, |
dcon::modifier_id | mod_id, | ||
F const & | scale_functor | ||
) |
|
constexprnoexcept |
int32_t sys::days_difference | ( | year_month_day | start, |
year_month_day | end | ||
) |
Definition at line 48 of file date_interface.cpp.
|
constexprnoexcept |
|
inline |
Definition at line 122 of file serialization.hpp.
|
inline |
Definition at line 88 of file serialization.hpp.
|
inline |
Definition at line 142 of file serialization.hpp.
|
inline |
Definition at line 100 of file serialization.hpp.
|
inline |
mod_identifier sys::extract_mod_information | ( | uint8_t const * | ptr_in, |
uint64_t | file_size | ||
) |
Definition at line 87 of file serialization.cpp.
|
inline |
Definition at line 68 of file container_types.hpp.
|
inline |
|
inline |
|
inline |
bool sys::is_leap_year | ( | int32_t | year | ) |
bool sys::is_playable_date | ( | date | d, |
absolute_time_point | start, | ||
absolute_time_point | end | ||
) |
Definition at line 44 of file date_interface.cpp.
void sys::list_pop_types | ( | sys::state & | state, |
parsers::scenario_building_context & | context | ||
) |
Definition at line 1716 of file system_state.cpp.
uint8_t const * sys::load_mod_path | ( | uint8_t const * | ptr_in, |
sys::state & | state | ||
) |
Definition at line 63 of file serialization.cpp.
std::string sys::make_time_string | ( | uint64_t | value | ) |
|
inline |
Definition at line 18 of file container_types.hpp.
|
inline |
Definition at line 31 of file container_types.hpp.
void sys::read_mod_path | ( | uint8_t const * | ptr_in, |
uint8_t const * | lim, | ||
native_string & | path_out | ||
) |
uint8_t const * sys::read_save_header | ( | uint8_t const * | ptr_in, |
save_header & | header_out | ||
) |
uint8_t const * sys::read_save_section | ( | uint8_t const * | ptr_in, |
uint8_t const * | section_end, | ||
sys::state & | state | ||
) |
Definition at line 680 of file serialization.cpp.
uint8_t const * sys::read_scenario_header | ( | uint8_t const * | ptr_in, |
scenario_header & | header_out | ||
) |
uint8_t const * sys::read_scenario_section | ( | uint8_t const * | ptr_in, |
uint8_t const * | section_end, | ||
sys::state & | state | ||
) |
Definition at line 137 of file serialization.cpp.
void sys::recreate_national_modifiers | ( | sys::state & | state | ) |
Definition at line 248 of file modifiers.cpp.
void sys::recreate_province_modifiers | ( | sys::state & | state | ) |
Definition at line 560 of file modifiers.cpp.
|
inline |
void sys::remove_expired_modifiers_from_nation | ( | sys::state & | state, |
dcon::nation_id | target_nation | ||
) |
void sys::remove_expired_modifiers_from_province | ( | sys::state & | state, |
dcon::province_id | target_prov | ||
) |
void sys::remove_modifier_from_nation | ( | sys::state & | state, |
dcon::nation_id | target_nation, | ||
dcon::modifier_id | mod_id | ||
) |
void sys::remove_modifier_from_province | ( | sys::state & | state, |
dcon::province_id | target_prov, | ||
dcon::modifier_id | mod_id | ||
) |
void sys::repopulate_modifier_effects | ( | sys::state & | state | ) |
Definition at line 653 of file modifiers.cpp.
Definition at line 41 of file container_types.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
size_t sys::sizeof_mod_path | ( | native_string const & | path_in | ) |
size_t sys::sizeof_save_header | ( | save_header const & | header_in | ) |
size_t sys::sizeof_save_section | ( | sys::state & | state | ) |
Definition at line 779 of file serialization.cpp.
size_t sys::sizeof_scenario_header | ( | scenario_header const & | header_in | ) |
scenario_size sys::sizeof_scenario_section | ( | sys::state & | state | ) |
Definition at line 501 of file serialization.cpp.
void sys::toggle_modifier_from_province | ( | sys::state & | state, |
dcon::province_id | target_prov, | ||
dcon::modifier_id | mod_id, | ||
sys::date | expiration | ||
) |
bool sys::try_read_save_file | ( | sys::state & | state, |
native_string_view | name | ||
) |
Definition at line 1095 of file serialization.cpp.
bool sys::try_read_scenario_and_save_file | ( | sys::state & | state, |
native_string_view | name | ||
) |
Definition at line 911 of file serialization.cpp.
bool sys::try_read_scenario_as_save_file | ( | sys::state & | state, |
native_string_view | name | ||
) |
Definition at line 954 of file serialization.cpp.
bool sys::try_read_scenario_file | ( | sys::state & | state, |
native_string_view | name | ||
) |
void sys::update_modifier_effects | ( | sys::state & | state | ) |
Definition at line 661 of file modifiers.cpp.
void sys::update_single_nation_modifiers | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
Definition at line 426 of file modifiers.cpp.
uint8_t const * sys::with_decompressed_section | ( | uint8_t const * | ptr_in, |
T const & | function | ||
) |
Definition at line 119 of file serialization.cpp.
uint8_t * sys::write_compressed_section | ( | uint8_t * | ptr_out, |
uint8_t const * | ptr_in, | ||
uint32_t | uncompressed_size | ||
) |
Definition at line 106 of file serialization.cpp.
uint8_t * sys::write_mod_path | ( | uint8_t * | ptr_in, |
native_string const & | path_in | ||
) |
void sys::write_save_file | ( | sys::state & | state, |
save_type | type, | ||
std::string const & | name | ||
) |
Definition at line 1005 of file serialization.cpp.
uint8_t * sys::write_save_header | ( | uint8_t * | ptr_in, |
save_header const & | header_in | ||
) |
Definition at line 35 of file serialization.cpp.
uint8_t * sys::write_save_section | ( | uint8_t * | ptr_in, |
sys::state & | state | ||
) |
Definition at line 734 of file serialization.cpp.
void sys::write_scenario_file | ( | sys::state & | state, |
native_string_view | name, | ||
uint32_t | count | ||
) |
Definition at line 827 of file serialization.cpp.
uint8_t * sys::write_scenario_header | ( | uint8_t * | ptr_in, |
scenario_header const & | header_in | ||
) |
Definition at line 29 of file serialization.cpp.
uint8_t * sys::write_scenario_section | ( | uint8_t * | ptr_in, |
sys::state & | state | ||
) |
Definition at line 320 of file serialization.cpp.
|
inlineconstexpr |
Definition at line 176 of file constants.hpp.
|
constexpr |
Definition at line 562 of file constants.hpp.
|
constexpr |
Definition at line 563 of file constants.hpp.
|
inlineconstexpr |
Definition at line 417 of file constants.hpp.
|
inlineconstexpr |
Definition at line 154 of file serialization.hpp.
|
inlineconstexpr |
Definition at line 155 of file serialization.hpp.
|
inlineconstexpr |
Definition at line 458 of file system_state.cpp.
|
inlineconstexpr |
Definition at line 166 of file constants.hpp.
|
inlineconstexpr |
Definition at line 167 of file constants.hpp.