Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | counter |
Macros | |
#define | city_counters_iterate(pcount) |
#define | city_counters_iterate_end |
#define | counters_re_iterate(pcount) |
#define | counters_re_iterate_end |
Functions | |
void | counters_init (void) |
void | counters_free (void) |
struct counter * | counter_by_id (int id) |
int | counter_id (struct counter *pcount) |
struct counter * | counter_by_rule_name (const char *name) |
const char * | counter_rule_name (struct counter *pcount) |
const char * | counter_name_translation (const struct counter *counter) |
struct counter * | counter_by_translated_name (const char *name) |
int | counter_index (const struct counter *pcount) |
struct counter * | counter_by_index (int index, enum counter_target target) |
int | counters_get_city_counters_count (void) |
void | attach_city_counter (struct counter *counter) |
Definition at line 57 of file counters.h.
#define city_counters_iterate_end |
Definition at line 64 of file counters.h.
Definition at line 67 of file counters.h.
#define counters_re_iterate_end |
Definition at line 75 of file counters.h.
Attaching given counter type to array containing counter type related to cities. Counter must be present in array for each counter in game, but we do not check this.
Definition at line 94 of file counters.c.
Referenced by tab_counter::add_now(), handle_ruleset_counter(), and load_ruleset_game().
Return counter by given id
Definition at line 82 of file counters.c.
Referenced by tab_counter::add_now(), api_find_counter(), boot_help_texts(), handle_ruleset_counter(), load_game_names(), load_ruleset_game(), and universal_by_number().
struct counter * counter_by_index | ( | int | index, |
enum counter_target | target | ||
) |
Return counter by given index
Definition at line 183 of file counters.c.
Referenced by create_city_virtual(), sg_save_counters(), and universal_value_initial().
Search for counter by rule name (return matched counter if found or NULL)
Definition at line 115 of file counters.c.
Referenced by api_find_counter_by_name(), tab_counter::select_counter(), sg_load_counters(), and universal_value_from_str().
Search for counter by translated name (return matched counter if found or NULL)
Definition at line 136 of file counters.c.
Return id of a given counter
Definition at line 105 of file counters.c.
Referenced by api_find_counter(), tolua_game_find_counter01(), and universal_number().
Return index in global counter's array
Definition at line 174 of file counters.c.
Referenced by api_counter_increase(), api_counter_zero(), api_methods_counter_city_get(), city_dialog_update_counters(), is_counter_req_active(), tab_counter::refresh(), sg_load_counters(), and city_dialog::update_counters_table().
Returns translated name of given counter
Definition at line 157 of file counters.c.
Referenced by api_methods_counter_name_translation(), boot_help_texts(), counter_by_translated_name(), universal_name_translation(), and worklist_item_postpone_req_vec().
Return rule name of a given counter
Definition at line 165 of file counters.c.
Referenced by api_methods_counter_rule_name(), counter_by_rule_name(), tab_counter::delete_now(), tab_counter::edit_effects(), tab_counter::name_given(), tab_counter::refresh(), req_text_insert(), sg_save_counters(), universal_kind_values(), and universal_rule_name().
Free resources allocated by counters system
Definition at line 51 of file counters.c.
Referenced by game_ruleset_free().
Return number of city counters.
Definition at line 74 of file counters.c.
Referenced by tab_counter::add_now(), city_counters_refresh(), create_city_virtual(), handle_city_update_counters(), handle_ruleset_counter(), tab_counter::initialize_new_counter(), sg_save_counters(), and universal_value_initial().
Initialize counters system
Definition at line 40 of file counters.c.
Referenced by game_ruleset_init().