Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/unitselect_common.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
unitselect_common.h
Go to the documentation of this file.
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.
7
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
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20struct unit_type;
21struct unit_list;
22struct tile;
23
24 struct usdata {
25 const struct unit_type *utype;
26 struct unit_list *units[SELLOC_COUNT][ACTIVITY_LAST];
27};
28
29#define SPECHASH_TAG usdata
30#define SPECHASH_INT_KEY_TYPE
31#define SPECHASH_IDATA_TYPE struct usdata *
32#include "spechash.h"
33
34#define usdata_hash_data_iterate(phash, data) \
35 TYPED_HASH_DATA_ITERATE(struct usdata *, phash, data)
36#define usdata_hash_data_iterate_end \
37 HASH_DATA_ITERATE_END
38
39struct usdata_hash *usdlg_data_new(const struct tile *ptile);
40void usdlg_data_destroy(struct usdata_hash *ushash);
41
42#ifdef __cplusplus
43}
44#endif /* __cplusplus */
45
46#endif /* FC__UNITSELECT_COMMON_H */
spechash.h
tile
Definition tile.h:49
unit_type
Definition unittype.h:481
usdata
Definition unitselect_common.h:24
usdata::units
struct unit_list * units[SELLOC_COUNT][ACTIVITY_LAST]
Definition unitselect_common.h:26
usdata::utype
const struct unit_type * utype
Definition unitselect_common.h:25
usdlg_data_new
struct usdata_hash * usdlg_data_new(const struct tile *ptile)
Definition unitselect_common.c:94
usdlg_data_destroy
void usdlg_data_destroy(struct usdata_hash *ushash)
Definition unitselect_common.c:138