55 const struct player *plr2);
57 const struct player *plr2);
59 const struct player *plr2);
79 qCritical(
"non-pact diplstate %d in cancel_pact_result", oldstate);
95 if (p1 == p2 || ds == DS_WAR || ds == DS_NO_CONTACT) {
130 if (pplayer != p1 && pplayer != p2
152 enum diplstate_type treaty)
164 if (treaty == DS_WAR || treaty == DS_NO_CONTACT || treaty == DS_ARMISTICE
165 || treaty == DS_TEAM || treaty == DS_LAST) {
168 if (treaty == DS_CEASEFIRE && existing != DS_WAR) {
171 if (treaty == DS_PEACE
172 && (existing != DS_WAR && existing != DS_CEASEFIRE)) {
175 if (treaty == DS_ALLIANCE) {
185 if (treaty == existing) {
196 const struct player *pplayer2)
207 const struct player *pplayer2)
217 const struct player *pplayer2)
229 return (pcity && pplayer &&
city_owner(pcity) == pplayer);
237 const struct tile *ptile)
241 return (!ptile_owner || ptile_owner == pplayer
250 const struct player *plr2)
263 *diplstate_slot = diplstate;
270 const struct player *plr2)
276 diplstate->
type = DS_NO_CONTACT;
289 const struct player *plr2)
306 const struct player *plr2)
314 if (*diplstate_slot !=
nullptr) {
318 *diplstate_slot =
nullptr;
404 return nullptr != pslot->
player;
448 if (
nullptr == pslot) {
459 }
else if (
nullptr != pslot->
player) {
466 pplayer->
slot = pslot;
475 *diplstate_slot =
nullptr;
484 if (aplayer != pplayer) {
517 pplayer->
team =
nullptr;
535 if (aplayer != pplayer) {
543 pplayer->
cities = city_list_new();
544 pplayer->
units = unit_list_new();
568 pplayer->
ai =
nullptr;
576 for (i = 0; i <
B_LAST; i++) {
581 pplayer->
rgb =
nullptr;
601 if (pplayer->
rgb !=
nullptr) {
603 pplayer->
rgb =
nullptr;
619 if (pplayer ==
nullptr) {
638 pcargo->client.transported_by = -1;
645 punit->client.transported_by = -1;
663 if (pplayer->
nation !=
nullptr) {
678 pplayer->
style =
nullptr;
690 pslot = pplayer->
slot;
697 pplayer->
client.tile_vision[v]->clear();
698 delete pplayer->
client.tile_vision[v];
706 unit_list_destroy(pplayer->
units);
708 city_list_destroy(pplayer->
cities);
718 if (aplayer != pplayer) {
782 if (pplayer->
nation != pnation) {
789 pnation->
player = pplayer;
791 pplayer->
nation = pnation;
821 return pplayer->
name;
890 const struct tile *ptile)
918 const struct tile *ptile)
940 if (unit_list_size(punit->transporting) > 0) {
960 const struct unit *punit,
961 const struct tile *ptile,
bool is_transported)
973 if (is_transported &&
unit_owner(punit) != pplayer
1017 const struct unit *punit)
1046 const struct city *pcity)
1061 const struct city *pcity)
1063 return (!pplayer || pplayer ==
city_owner(pcity));
1075 const struct city *target_city)
1122 if (!pplayer || (
city_owner(pcity) == pplayer)) {
1148 if (!pplayer || (
unit_owner(punit) == pplayer)) {
1160 const struct tile *ptile)
1166 if (pcity && (pplayer ==
nullptr ||
city_owner(pcity) == pplayer)
1182 enum tech_flag_id flag)
1202 income += pcity->surplus[
O_GOLD];
1211 switch (
game.
info.gold_upkeep_style) {
1212 case GOLD_UPKEEP_CITY:
1214 case GOLD_UPKEEP_NATION:
1218 case GOLD_UPKEEP_MIXED:
1226 income += pcity->shield_stock + pcity->surplus[
O_SHIELD];
1239 enum tech_flag_id flag)
1268 auto centers = std::vector<city *>();
1272 centers.push_back(gc);
1289 return Q_(
"?attitude:Genocidal");
1291 return Q_(
"?attitude:Belligerent");
1293 return Q_(
"?attitude:Hostile");
1295 return Q_(
"?attitude:Uncooperative");
1297 return Q_(
"?attitude:Uneasy");
1299 return Q_(
"?attitude:Neutral");
1301 return Q_(
"?attitude:Respectful");
1303 return Q_(
"?attitude:Helpful");
1305 return Q_(
"?attitude:Enthusiastic");
1307 return Q_(
"?attitude:Admiring");
1310 return Q_(
"?attitude:Worshipful");
1318 const struct player *pplayer2)
1320 enum diplstate_type ds;
1322 if (pplayer == pplayer2) {
1328 return ds == DS_WAR || ds == DS_NO_CONTACT;
1335 const struct player *pplayer2)
1337 enum diplstate_type ds;
1339 if (!pplayer || !pplayer2) {
1343 if (pplayer == pplayer2) {
1349 return (ds == DS_ALLIANCE || ds == DS_TEAM);
1356 const struct player *pplayer2)
1360 if (pplayer == pplayer2) {
1364 return (ds == DS_PEACE || ds == DS_ALLIANCE || ds == DS_ARMISTICE
1372 const struct player *pplayer2)
1374 if (pplayer1 == pplayer2 || !pplayer1 || !pplayer2) {
1389 const struct player *pplayer2)
1391 enum diplstate_type ds;
1393 if (pplayer == pplayer2) {
1399 return (ds == DS_PEACE || ds == DS_CEASEFIRE || ds == DS_ARMISTICE);
1406 const struct player *pplayer2)
1408 return pplayer1->
team == pplayer2->
team;
1423 const struct player *player2,
int diplrel)
1429 if (player1 == player2 && diplrel != DRO_FOREIGN) {
1433 if (diplrel < DS_LAST) {
1437 switch (
static_cast<diplrel_other
>(diplrel)) {
1438 case DRO_GIVES_SHARED_VISION:
1440 case DRO_RECEIVES_SHARED_VISION:
1442 case DRO_HOSTS_EMBASSY:
1444 case DRO_HAS_EMBASSY:
1446 case DRO_HOSTS_REAL_EMBASSY:
1448 case DRO_HAS_REAL_EMBASSY:
1450 case DRO_HAS_CASUS_BELLI:
1452 case DRO_PROVIDED_CASUS_BELLI:
1455 return player1 != player2;
1456 case DRO_HAS_CONTACT:
1462 fc_assert_msg(
false,
"diplrel_between(): invalid diplrel number %d.",
1477 if (oplayer == pplayer) {
1497 if (diplrel != diplrel_other_invalid()) {
1516 if (diplrel != diplstate_type_invalid()) {
1520 return diplrel_other_invalid();
1528 if (value < DS_LAST) {
1529 return diplstate_type_name(diplstate_type(value));
1531 return diplrel_other_name(diplrel_other(value));
1540 if (value < DS_LAST) {
1541 return diplstate_type_translated_name(diplstate_type(value));
1543 return _(diplrel_other_name(diplrel_other(value)));
1552 const struct player *tgt_plr,
1553 const enum effect_type outcome,
1554 const struct action *paction,
1555 const struct tile *tgt_tile)
1557 int casus_belli_amount;
1562 nullptr, offender, tgt_plr,
tile_city(tgt_tile),
nullptr, tgt_tile,
1563 nullptr,
nullptr,
nullptr,
nullptr, paction, outcome);
1568 return CBR_INTERNATIONAL_OUTRAGE;
1574 return CBR_VICTIM_ONLY;
1582 #define DIPLREL_MESS_SIZE (3 + (DRO_LAST * (5 + 4 + 3 + 2 + 1)))
1595 const enum req_range legal_ranges[] = {REQ_RANGE_LOCAL, REQ_RANGE_PLAYER,
1596 REQ_RANGE_ALLIANCE, REQ_RANGE_TEAM,
1639 REQ_RANGE_LOCAL,
true));
1649 REQ_RANGE_LOCAL,
true));
1651 REQ_RANGE_LOCAL,
false));
1656 for (rel = 0; rel < DRO_LAST; rel++) {
1660 for (i = 0; i < 5; i++) {
1661 for (j = i; j < 5; j++) {
1716 int diplrel_req_num;
1717 bv_diplrel_all_reqs *mess;
1718 bv_diplrel_all_reqs known;
1741 if (
BV_ISSET(mess[set], diplrel_req_num)) {
1751 BV_CLR(known, diplrel_req_num);
1762 const struct player *pplayer2)
1764 int in_territory = 0;
1785 return in_territory;
1805 Qt::CaseInsensitive)) {
1810 if (ch.isLetterOrNumber()) {
1813 if (ch ==
'#' || ch ==
'_') {
1827 if (
level == AI_LEVEL_AWAY) {
int ai_type_number(const struct ai_type *ai)
Returns id of the given ai_type.
#define BV_SET_ALL_FROM(vec_to, vec_from)
bool BV_ISSET(const BV &bv, int bit)
struct player * city_owner(const struct city *pcity)
Return the owner of the city.
struct tile * city_tile(const struct city *pcity)
Return the tile location of the city.
bool city_production_has_flag(const struct city *pcity, enum impr_flag_id flag)
Return TRUE when the current production has this flag.
bool city_is_occupied(const struct city *pcity)
Returns TRUE iff the city is occupied.
int city_map_radius_sq_get(const struct city *pcity)
Returns the current squared radius of the city.
bool is_gov_center(const struct city *pcity)
Return TRUE iff this city is governmental center.
int city_total_unit_gold_upkeep(const struct city *pcity)
Get the total amount of gold needed to pay upkeep costs for all supported units of the city.
int city_total_impr_gold_upkeep(const struct city *pcity)
Returns the total amount of gold needed to pay for all buildings in the city.
#define city_list_iterate(citylist, pcity)
#define city_tile_iterate(_radius_sq, _city_tile, _tile)
#define CITY_MAP_MAX_RADIUS_SQ
#define city_list_iterate_end
#define city_tile_iterate_end
int get_target_bonus_effects(struct effect_list *plist, const struct player *target_player, const struct player *other_player, const struct city *target_city, const struct impr_type *target_building, const struct tile *target_tile, const struct unit *target_unit, const struct unit_type *target_unittype, const struct output_type *target_output, const struct specialist *target_specialist, const struct action *target_action, enum effect_type effect_type, enum vision_layer vision_layer, enum national_intelligence nintel)
Returns the effect bonus of a given type for any target.
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
Returns the effect bonus for a player.
const struct functions * fc_funcs
#define CASUS_BELLI_OUTRAGE
#define MAX_NUM_PLAYER_SLOTS
#define CASUS_BELLI_VICTIM
bool is_server()
Is program type server?
void game_remove_unit(struct world *gworld, struct unit *punit)
In the server call wipe_unit(), and never this function directly.
void game_remove_city(struct world *gworld, struct city *pcity)
Remove city from game.
struct unit * idex_lookup_unit(struct world *iworld, int id)
Lookup unit with given id.
struct city * idex_lookup_city(struct world *iworld, int id)
Lookup city with given id.
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
int sq_map_distance(const struct tile *tile0, const struct tile *tile1)
Return squared distance between two tiles.
Multiplier_type_id multiplier_index(const struct multiplier *pmul)
Returns multiplier index.
#define NO_NATION_SELECTED
bool is_settable_ai_level(enum ai_level level)
Return is AI can be set to given level.
bool player_can_invade_tile(const struct player *pplayer, const struct tile *ptile)
Return TRUE iff the player can invade a particular tile (linked with borders and diplomatic states).
bool player_knows_techs_with_flag(const struct player *pplayer, enum tech_flag_id flag)
Returns TRUE iff the player knows at least one tech which has the given flag.
int player_multiplier_effect_value(const struct player *pplayer, const struct multiplier *pmul)
Return the multiplier value currently in effect for pplayer, scaled from display units to the units u...
static bv_diplrel_all_reqs * diplrel_mess_get()
Get the mutually exclusive requirement sets for DiplRel.
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
If the specified player owns the unit with the specified id, return pointer to the unit struct.
struct player_slot * player_slot_by_number(int player_id)
Return the possibly unused and uninitialized player slot.
bool player_slot_is_used(const struct player_slot *pslot)
Returns TRUE is this slot is "used" i.e.
bv_diplrel_all_reqs diplrel_req_contradicts(const struct requirement *req)
Get the DiplRel requirements that are known to contradict the specified DiplRel requirement.
struct player * player_by_name(const char *name)
Find player by given name.
int num_known_tech_with_flag(const struct player *pplayer, enum tech_flag_id flag)
Returns the number of techs the player has researched which has this flag.
bool is_valid_username(const char *name)
Returns whether this is a valid username.
static void player_diplstate_new(const struct player *plr1, const struct player *plr2)
Allocate new diplstate structure for tracking state between given two players.
int player_multiplier_target_value(const struct player *pplayer, const struct multiplier *pmul)
Return the player's target value for a multiplier (which may be different from the value currently in...
enum casus_belli_range casus_belli_range_for(const struct player *offender, const struct player *tgt_plr, const enum effect_type outcome, const struct action *paction, const struct tile *tgt_tile)
Return the Casus Belli range when offender performs paction to tgt_plr at tgt_tile and the outcome is...
static bv_diplrel_all_reqs * diplrel_mess
int diplrel_by_rule_name(const char *value)
Return the diplomatic relation that has the given (untranslated) rule name.
bool player_in_city_map(const struct player *pplayer, const struct tile *ptile)
Return true iff x,y is inside any of the player's city map.
bool players_on_same_team(const struct player *pplayer1, const struct player *pplayer2)
Return TRUE if players are in the same team.
bool player_slots_initialised()
Return whether player slots are already initialized.
bool can_player_see_unit_at(const struct player *pplayer, const struct unit *punit, const struct tile *ptile, bool is_transported)
Checks if a unit can be seen by pplayer at (x,y).
enum diplstate_type cancel_pact_result(enum diplstate_type oldstate)
Return the diplomatic state that cancelling a pact will end up in.
int player_multiplier_value(const struct player *pplayer, const struct multiplier *pmul)
Return the multiplier value currently in effect for pplayer (in display units).
void * player_ai_data(const struct player *pplayer, const struct ai_type *ai)
Return pointer to ai data of given player and ai type.
struct player * player_by_number(const int player_id)
Return struct player pointer for the given player index.
const char * diplrel_name_translation(int value)
Return the translated name of the given diplomatic relation.
int player_get_expected_income(const struct player *pplayer)
Return the expected net income of the player this turn.
int player_number(const struct player *pplayer)
Return the player index/number/id.
enum dipl_reason pplayer_can_make_treaty(const struct player *p1, const struct player *p2, enum diplstate_type treaty)
Returns true iff p1 can make given treaty with p2.
struct player * player_by_name_prefix(const char *name, enum m_pre_result *result)
Find player by its name prefix.
static void player_diplstate_defaults(const struct player *plr1, const struct player *plr2)
Set diplstate between given two players to default values.
static bv_diplrel_all_reqs * diplrel_mess_gen()
Generate and return an array of mutually exclusive requirement sets for the DiplRel requirement type.
bool is_diplrel_to_other(const struct player *pplayer, int diplrel)
Return TRUE iff pplayer has the diplomatic relation to any living player.
static bool is_valid_alliance(const struct player *p1, const struct player *p2)
Returns true iff p1 can be in alliance with p2.
bool can_player_see_unit(const struct player *pplayer, const struct unit *punit)
Checks if a unit can be seen by pplayer at its current location.
int player_count()
Return the number of players.
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
Returns true iff players can attack each other.
static const char * player_name_by_number(int i)
Find player by name, allowing unambigous prefix (ie abbreviation).
std::vector< city * > player_gov_centers(const struct player *pplayer)
Locate the player's government centers.
void player_set_ai_data(struct player *pplayer, const struct ai_type *ai, void *data)
Attach ai data to player.
const char * love_text(const int love)
Return a text describing an AI's love for you.
static void player_diplstate_destroy(const struct player *plr1, const struct player *plr2)
Free resources used by diplstate between given two players.
void player_ruleset_close(struct player *pplayer)
Clear the ruleset dependent pointers of the player structure.
void player_clear(struct player *pplayer, bool full)
Clear all player data.
int player_slot_index(const struct player_slot *pslot)
Returns the index of the player slot.
struct player_slot * player_slot_first()
Returns the first player slot.
bool player_has_flag(const struct player *pplayer, enum plr_flag_id flag)
Check if player has given flag.
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
Returns whether pplayer has a real embassy with pplayer2, established from a diplomat,...
void player_set_color(struct player *pplayer, const struct rgbcolor *prgbcolor)
Set the player's color.
int player_slot_max_used_number()
Return the highest used player slot index.
void player_slots_free()
Remove all player slots.
int player_index(const struct player *pplayer)
Return the player index.
void diplrel_mess_close()
Free diplrel_mess.
struct city * player_primary_capital(const struct player *pplayer)
Locate the player's primary capital city, (nullptr Otherwise)
int player_in_territory(const struct player *pplayer, const struct player *pplayer2)
Return the number of pplayer2's visible units in pplayer's territory, from the point of view of pplay...
struct city * player_city_by_number(const struct player *pplayer, int city_id)
If the specified player owns the city with the specified id, return pointer to the city struct.
bool is_diplrel_between(const struct player *player1, const struct player *player2, int diplrel)
Return TRUE iff player1 has the diplomatic relation to player2.
struct player_slot * pslots
static struct @64 player_slots
struct player * player_slot_get_player(const struct player_slot *pslot)
Returns the team corresponding to the slot.
bool player_set_nation(struct player *pplayer, struct nation_type *pnation)
Set the player's nation to the given nation (may be nullptr).
#define DIPLREL_MESS_SIZE
void player_slots_init()
Initialise all player slots (= pointer to player pointers).
bool player_can_see_city_externals(const struct player *pow_player, const struct city *target_city)
Returns TRUE iff pow_player can see externally visible features of target_city.
const char * player_name(const struct player *pplayer)
Return the leader name of the player.
int player_age(const struct player *pplayer)
"Age" of the player: number of turns spent alive since created.
enum dipl_reason pplayer_can_cancel_treaty(const struct player *p1, const struct player *p2)
The senate may not allow you to break the treaty.
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
Returns true iff players are allied.
static void player_defaults(struct player *pplayer)
Set player structure to its default values.
bool can_player_see_hypotetic_units_at(const struct player *pplayer, const struct tile *ptile)
Check if pplayer could see all units on ptile if it had units.
bool player_has_embassy_from_effect(const struct player *pplayer, const struct player *pplayer2)
Returns whether pplayer has got embassy with pplayer2 thanks to an effect (e.g.
bool players_non_invade(const struct player *pplayer1, const struct player *pplayer2)
Returns TRUE if players can't enter each others' territory.
bool pplayers_non_attack(const struct player *pplayer, const struct player *pplayer2)
Returns true iff players have peace, cease-fire, or armistice.
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
Return TRUE iff the player can see units in the city.
struct player_slot * player_slot_next(struct player_slot *pslot)
Returns the next slot.
bool can_player_see_city_internals(const struct player *pplayer, const struct city *pcity)
Return TRUE iff the player can see the city's internals.
bool player_can_trust_tile_has_no_units(const struct player *pplayer, const struct tile *ptile)
Returns TRUE iff pplayer can trust that ptile really has no units when it looks empty.
struct player * player_new(struct player_slot *pslot)
Creates a new player for the slot.
bool player_has_embassy(const struct player *pplayer, const struct player *pplayer2)
Check if pplayer has an embassy with pplayer2.
bool gives_shared_vision(const struct player *me, const struct player *them)
Return TRUE iff the player me gives shared vision to player them.
bool player_owns_city(const struct player *pplayer, const struct city *pcity)
Return TRUE iff the given player owns the city.
void player_destroy(struct player *pplayer)
Destroys and remove a player from the game.
const char * diplrel_rule_name(int value)
Return the (untranslated) rule name of the given diplomatic relation.
struct player * player_by_user(const char *name)
Find player by its user name (not player/leader name)
bool pplayers_in_peace(const struct player *pplayer, const struct player *pplayer2)
Returns true iff players are allied or at peace.
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Returns diplomatic state type between two players.
#define players_iterate_end
@ DIPL_ALLIANCE_PROBLEM_THEM
@ DIPL_ALLIANCE_PROBLEM_US
#define players_iterate(_pplayer)
static bool is_barbarian(const struct player *pplayer)
#define player_slots_iterate(_pslot)
#define PLAYER_DEFAULT_SCIENCE_RATE
#define set_as_human(plr)
#define players_iterate_alive_end
#define player_slots_iterate_end
#define PLAYER_DEFAULT_TAX_RATE
#define PLAYER_DEFAULT_LUXURY_RATE
#define players_iterate_alive(_pplayer)
#define requirement_diplrel_ereq(_id_, _range_, _present_)
struct research * research_get(const struct player *pplayer)
Returns the research structure associated with the player.
void rgbcolor_destroy(struct rgbcolor *prgbcolor)
Free rgbcolor structure.
struct rgbcolor * rgbcolor_copy(const struct rgbcolor *prgbcolor)
Allocate new rgbcolor structure and make it copy of one given as input.
struct setting_list * level[OLEVELS_NUM]
enum m_pre_result match_prefix(m_pre_accessor_fn_t accessor_fn, size_t n_names, size_t max_len_name, m_pre_strncmp_fn_t cmp_fn, m_strlen_fn_t len_fn, const char *prefix, int *ind_result)
See match_prefix_full().
void spaceship_init(struct player_spaceship *ship)
Initialize spaceship struct; could also be used to "cancel" a spaceship (eg, if/when capital-capture ...
enum capital_type capital
struct trade_route_list * routes
struct packet_game_info info
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
enum ai_level skill_level
std::vector< ai_trait > traits
enum barbarian_type barbarian_type
int love[MAX_NUM_PLAYER_SLOTS]
enum diplstate_type max_state
struct city_list * cities
QByteArray attribute_block
struct player_ai ai_common
struct player::@65::@68 client
const struct player_diplstate ** diplstates
struct government * target_government
char username[MAX_LEN_NAME]
struct player::@65::@67 server
struct government * government
struct connection * current_conn
char * savegame_ai_type_name
QByteArray attribute_block_buffer
const struct ai_type * ai
int wonder_build_turn[B_LAST]
char ranked_username[MAX_LEN_NAME]
struct conn_list * connections
struct player_economic economic
struct player_spaceship spaceship
bv_player gives_shared_vision
int multipliers[MAX_NUM_MULTIPLIERS]
struct nation_type * nation
struct nation_style * style
int multipliers_target[MAX_NUM_MULTIPLIERS]
struct player_slot * slot
int num_known_tech_with_flag[TF_COUNT]
struct player * extras_owner
int fc_strcasecmp(const char *str0, const char *str1)
Compare strings like strcmp(), but ignoring case.
int fc_strncasequotecmp(const char *str0, const char *str1, size_t n)
Compare strings like strncasecmp() but ignoring surrounding quotes in either string.
size_t effectivestrlenquote(const char *str)
Count length of string without possible surrounding quotes.
#define sz_strlcpy(dest, src)
void team_remove_player(struct player *pplayer)
Remove the player from the team.
bool tile_is_seen(const struct tile *target_tile, const struct player *pow_player)
Returns TRUE iff the target_tile is seen by pow_player.
enum known_type tile_get_known(const struct tile *ptile, const struct player *pplayer)
Return a known_type enumeration value for the tile.
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
#define trade_partners_iterate_end
#define trade_partners_iterate(c, p)
bool is_hiding_unit(const struct unit *punit)
Is the unit one that is invisible on the map.
bool unit_transport_unload(struct unit *pcargo)
Unload pcargo from ptrans.
struct unit_list * unit_transport_cargo(const struct unit *ptrans)
Returns the list of cargo units.
bool unit_transported(const struct unit *pcargo)
Returns TRUE iff the unit is transported.
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
Return the unit type for this unit.
#define vision_layer_iterate(v)
#define vision_layer_iterate_end