Some miscellaneous updates to main help, for new features and otherwise.
[freeciv.git] / client / unitselect_common.h
blob450377183cf4bb4f30cd51749b05f2a58d48c248
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)
6 any later version.
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 *****************************************************************************/
13 #ifndef FC__UNITSELECT_COMMON_H
14 #define FC__UNITSELECT_COMMON_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 struct unit_type;
21 struct unit_list;
22 struct tile;
24 struct usdata {
25 struct unit_type *utype;
26 struct unit_list *units[SELLOC_COUNT][ACTIVITY_LAST];
29 #define SPECHASH_TAG usdata
30 #define SPECHASH_KEY_TYPE int
31 #define SPECHASH_DATA_TYPE struct usdata *
32 #define SPECHASH_KEY_TO_PTR FC_INT_TO_PTR
33 #define SPECHASH_PTR_TO_KEY FC_PTR_TO_INT
34 #include "spechash.h"
36 #define usdata_hash_data_iterate(phash, data) \
37 TYPED_HASH_DATA_ITERATE(struct usdata *, phash, data)
38 #define usdata_hash_data_iterate_end \
39 HASH_DATA_ITERATE_END
41 struct usdata_hash *usdlg_data_new(const struct tile *ptile);
42 void usdlg_data_destroy(struct usdata_hash *ushash);
44 #ifdef __cplusplus
46 #endif /* __cplusplus */
48 #endif /* FC__UNITSELECT_COMMON_H */