Freeciv-3.2
|
Go to the source code of this file.
Data Structures | |
struct | cm_parameter |
struct | cm_result |
bool cm_are_parameter_equal | ( | const struct cm_parameter *const | p1, |
const struct cm_parameter *const | p2 | ||
) |
Returns true if the two cm_parameters are equal.
Definition at line 2141 of file cm.c.
Referenced by append_cma_to_menu_item(), cmafec_preset_get_index_of_parameter(), create_governor_menu(), select_cma_callback(), select_governor_callback(), send_packet_web_city_info_addition_100(), and send_packet_web_cma_set_100().
Clear the cache for a city.
Definition at line 322 of file cm.c.
Referenced by apply_result_on_server(), auto_arrange_workers(), city_changed(), and dai_manage_taxes().
void cm_copy_parameter | ( | struct cm_parameter * | dest, |
const struct cm_parameter *const | src | ||
) |
Copy the parameter from the source to the destination field.
Definition at line 2174 of file cm.c.
Referenced by begin_search(), cmafec_get_fe_parameter(), cmafec_preset_add(), handle_web_cma_set(), ld_cma_callback(), package_city(), popup_load_del_presets_dialog(), and city_dialog::update_sliders().
Called at the end of a game to free any CM data.
Definition at line 330 of file cm.c.
Referenced by game_free().
Initialize the CM data at the start of each game. Note the citymap indices will not have been initialized yet (cm_init_citymap is called when they are).
Definition at line 293 of file cm.c.
Referenced by game_init().
Initialize the CM citymap data. This function is called when the city map indices are generated (basically when the topology is set, shortly after the start of the game).
Definition at line 314 of file cm.c.
Referenced by generate_city_map_indices().
void cm_init_emergency_parameter | ( | struct cm_parameter * | dest | ) |
Initialize the parameter to sane default values that will always produce a result.
Definition at line 2201 of file cm.c.
Referenced by auto_arrange_workers().
void cm_init_parameter | ( | struct cm_parameter * | dest | ) |
Initialize the parameter to sane default values.
Definition at line 2183 of file cm.c.
Referenced by auto_arrange_workers(), cma_get_parameter(), cmafec_get_fe_parameter(), and dai_manage_taxes().
Debugging routines. Print debugging information about one city.
Definition at line 2431 of file cm.c.
Referenced by apply_result_on_server(), and auto_arrange_workers().
Print debugging information about a full CM result.
Definition at line 2469 of file cm.c.
Referenced by apply_result_on_server(), and auto_arrange_workers().
void cm_query_result | ( | struct city * | pcity, |
const struct cm_parameter * | param, | ||
struct cm_result * | result, | ||
bool | negative_ok | ||
) |
Wrapper that actually runs the branch & bound, and returns the best solution.
Definition at line 2122 of file cm.c.
Referenced by auto_arrange_workers(), dai_manage_taxes(), handle_city(), and run_cma_once_callback().
Count the total number of citizens in the result.
Definition at line 2252 of file cm.c.
Referenced by apply_result_on_server().
Destroy a cm_result.
Definition at line 368 of file cm.c.
Referenced by apply_result_on_server(), auto_arrange_workers(), dai_manage_taxes(), handle_city(), refresh_cma_dialog(), run_cma_once_callback(), and update_city_cma_dialog().
Copy the city's current setup into the cm result structure. Wrapper for cm_result_main().
Definition at line 2261 of file cm.c.
Referenced by apply_result_on_server(), refresh_cma_dialog(), and update_city_cma_dialog().
Create a new cm_result.
Definition at line 345 of file cm.c.
Referenced by apply_result_on_server(), auto_arrange_workers(), dai_manage_taxes(), handle_city(), refresh_cma_dialog(), run_cma_once_callback(), and update_city_cma_dialog().
Count the total number of specialists in the result.
Definition at line 2238 of file cm.c.
Referenced by cm_result_citizens(), and cmafec_get_result_descr().
Count the total number of workers in the result.
Definition at line 2218 of file cm.c.
Referenced by cm_print_result(), and cm_result_citizens().