Freeciv-3.2
|
Go to the source code of this file.
Functions | |
void | idex_init (struct world *iworld) |
void | idex_free (struct world *iworld) |
void | idex_register_city (struct world *iworld, struct city *pcity) |
void | idex_register_unit (struct world *iworld, struct unit *punit) |
void | idex_unregister_city (struct world *iworld, struct city *pcity) |
void | idex_unregister_unit (struct world *iworld, struct unit *punit) |
struct city * | idex_lookup_city (struct world *iworld, int id) |
struct unit * | idex_lookup_unit (struct world *iworld, int id) |
Free the hashes.
Definition at line 54 of file idex.c.
Referenced by game_free(), game_reset(), and texai_world_close().
Initialize. Should call this at the start before use.
Definition at line 45 of file idex.c.
Referenced by game_init(), game_reset(), and texai_world_init().
Lookup city with given id. Returns NULL if the city is not registered (which is not an error).
Definition at line 133 of file idex.c.
Referenced by api_find_city(), game_city_by_number(), player_city_by_number(), texai_city_destruction_recv(), texai_city_info_recv(), and texai_map_city().
Lookup unit with given id. Returns NULL if the unit is not registered (which is not an error).
Definition at line 146 of file idex.c.
Referenced by api_find_unit(), game_unit_by_number(), player_unit_by_number(), texai_unit_destruction_recv(), texai_unit_info_recv(), and texai_unit_moved_recv().
Register a city into idex, with current pcity->id. Call this when pcity created.
Definition at line 67 of file idex.c.
Referenced by create_city(), handle_city_info(), handle_city_short_info(), handle_tile_info(), sg_load_player_cities(), sg_load_player_cities(), and texai_city_info_recv().
Register a unit into idex, with current punit->id. Call this when punit created.
Definition at line 82 of file idex.c.
Referenced by handle_unit_packet_common(), place_unit(), sg_load_player_units(), sg_load_player_units(), and texai_unit_info_recv().
Remove a city from idex, with current pcity->id. Call this when pcity deleted.
Definition at line 97 of file idex.c.
Referenced by game_remove_city(), packhand_free(), and texai_city_destruction_recv().
Remove a unit from idex, with current punit->id. Call this when punit deleted.
Definition at line 115 of file idex.c.
Referenced by game_remove_unit(), and texai_unit_destruction_recv().