46 iworld->
cities = city_hash_new();
47 iworld->
units = unit_hash_new();
55 city_hash_destroy(iworld->
cities);
58 unit_hash_destroy(iworld->
units);
70 city_hash_replace_full(iworld->
cities, pcity->
id, pcity, NULL, &old);
72 "IDEX: city collision: new %d %p %s, old %d %p %s",
87 "IDEX: unit collision: new %d %p %s, old %d %p %s",
100 city_hash_remove_full(iworld->
cities, pcity->
id, NULL, &old);
102 "IDEX: city unreg missing: %d %p %s",
105 "unreg %d %p %s, old %d %p %s",
118 unit_hash_remove_full(iworld->
units,
punit->
id, NULL, &old);
120 "IDEX: unit unreg missing: %d %p %s",
123 "unreg %d %p %s, old %d %p %s",
136 city_hash_lookup(iworld->
cities,
id, &pcity);
const char * city_name_get(const struct city *pcity)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
void idex_free(struct world *iworld)
void idex_register_unit(struct world *iworld, struct unit *punit)
struct city * idex_lookup_city(struct world *iworld, int id)
void idex_unregister_city(struct world *iworld, struct city *pcity)
void idex_init(struct world *iworld)
struct unit * idex_lookup_unit(struct world *iworld, int id)
void idex_unregister_unit(struct world *iworld, struct unit *punit)
void idex_register_city(struct world *iworld, struct city *pcity)
#define fc_assert_ret_msg(condition, message,...)
struct city_hash * cities
const char * unit_rule_name(const struct unit *punit)