1 /***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
18 #endif /* __cplusplus */
20 /**************************************************************************
21 idex = ident index: a lookup table for quick mapping of unit and city
22 id values to unit and city pointers.
23 ***************************************************************************/
27 #include "world_object.h"
29 void idex_init(struct world
*iworld
);
30 void idex_free(struct world
*iworld
);
32 void idex_register_city(struct world
*iworld
, struct city
*pcity
);
33 void idex_register_unit(struct world
*iworld
, struct unit
*punit
);
35 void idex_unregister_city(struct world
*iworld
, struct city
*pcity
);
36 void idex_unregister_unit(struct world
*iworld
, struct unit
*punit
);
38 struct city
*idex_lookup_city(struct world
*iworld
, int id
);
39 struct unit
*idex_lookup_unit(struct world
*iworld
, int id
);
43 #endif /* __cplusplus */
45 #endif /* FC__IDEX_H */