33 const struct tile *ptile,
37 enum unit_activity act);
39 const struct tile *ptile,
40 enum unit_select_location_mode
loc);
50 enum unit_select_location_mode
loc;
51 enum unit_activity act;
57 for (
loc = unit_select_location_mode_begin();
58 loc != unit_select_location_mode_end();
59 loc = unit_select_location_mode_next(
loc)) {
60 for (act = 0; act < ACTIVITY_LAST; act++) {
62 data->
units[
loc][act] = unit_list_new();
75 enum unit_select_location_mode
loc;
76 enum unit_activity act;
78 for (
loc = unit_select_location_mode_begin();
79 loc != unit_select_location_mode_end();
80 loc = unit_select_location_mode_next(
loc)) {
81 for (act = 0; act < ACTIVITY_LAST; act++) {
83 unit_list_destroy(data->
units[
loc][act]);
96 struct usdata_hash *ushash = usdata_hash_new();
120 usdata_hash_lookup(ushash,
utype_index(ptype), &data);
125 usdata_hash_insert(ushash,
utype_index(ptype), data);
128 unit_list_append(data->
units[SELLOC_UNITS][ACTIVITY_IDLE],
punit);
143 usdata_hash_destroy(ushash);
150 const struct tile *ptile,
154 enum unit_activity act;
160 usdata_hash_lookup(ushash,
utype_index(ptype), &data);
165 usdata_hash_insert(ushash,
utype_index(ptype), data);
168 for (act = 0; act < ACTIVITY_LAST; act++) {
170 enum unit_select_location_mode
loc;
172 for (
loc = unit_select_location_mode_begin();
173 loc != unit_select_location_mode_end();
174 loc = unit_select_location_mode_next(
loc)) {
187 enum unit_activity act)
198 const struct tile *ptile,
199 enum unit_select_location_mode
loc)
215 if (utile == ptile) {
bool client_is_global_observer(void)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)
#define fc_calloc(n, esz)
#define players_iterate_end
#define players_iterate(_pplayer)
enum unit_activity activity
struct unit_list * units[SELLOC_COUNT][ACTIVITY_LAST]
const struct unit_type * utype
#define is_ocean(pterrain)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_continent(_tile)
bool unit_transported(const struct unit *pcargo)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
struct usdata_hash * usdlg_data_new(const struct tile *ptile)
static void usdlg_data_add_unit(struct usdata_hash *ushash, const struct tile *ptile, struct unit *punit)
static void usdata_destroy(struct usdata *data)
static bool usdlg_check_unit_location(const struct unit *punit, const struct tile *ptile, enum unit_select_location_mode loc)
void usdlg_data_destroy(struct usdata_hash *ushash)
static struct usdata * usdata_new(void)
static bool usdlg_check_unit_activity(const struct unit *punit, enum unit_activity act)
#define usdata_hash_data_iterate(phash, data)
#define usdata_hash_data_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
enum unit_move_type utype_move_type(const struct unit_type *punittype)
Unit_type_id utype_index(const struct unit_type *punittype)