void idex_free(struct world *iworld)
Free the hashs.
void idex_register_unit(struct world *iworld, struct unit *punit)
Register a unit into idex, with current punit->id.
struct unit * idex_lookup_unit(struct world *iworld, int id)
Lookup unit with given id.
void idex_unregister_city(struct world *iworld, struct city *pcity)
Remove a city from idex, with current pcity->id.
void idex_init(struct world *iworld)
idex = ident index: a lookup table for quick mapping of unit and city id values to unit and city poin...
struct city * idex_lookup_city(struct world *iworld, int id)
Lookup city with given id.
void idex_unregister_unit(struct world *iworld, struct unit *punit)
Remove a unit from idex, with current punit->id.
void idex_register_city(struct world *iworld, struct city *pcity)
Register a city into idex, with current pcity->id.