75 ptile->
owner = pplayer;
145 "At (%d, %d), the terrain \"%s\" (nb %d) doesn't "
146 "support cities, whereas \"%s\" (nb %d) is built there.",
168 static bool empty_cleared =
FALSE;
170 if (!empty_cleared) {
172 empty_cleared =
TRUE;
239 int natural_bonus = 0;
240 int fortification_bonus = 0;
246 natural_bonus += pextra->defense_bonus;
253 fortification_bonus += pextra->defense_bonus;
257 total_bonus = (100 + natural_bonus) * (100 + fortification_bonus) / 100 - 100;
279 return const_incr + incr *
tile_terrain(ptile)->road_output_incr_pct[o] / 100;
352 if (presource != NULL) {
361#ifndef tile_continent
387 const struct player *pplayer)
402 const struct player *pow_player)
422 case ACTIVITY_POLLUTION:
423 case ACTIVITY_FALLOUT:
424 case ACTIVITY_PILLAGE:
426 case ACTIVITY_TRANSFORM:
428 case ACTIVITY_CULTIVATE:
432 case ACTIVITY_IRRIGATE:
435 case ACTIVITY_GEN_ROAD:
529 if (pdep == pextra) {
668 case ACTIVITY_IRRIGATE:
672 case ACTIVITY_TRANSFORM:
676 case ACTIVITY_CULTIVATE:
684 case ACTIVITY_OLD_ROAD:
685 case ACTIVITY_OLD_RAILROAD:
686 case ACTIVITY_FORTRESS:
687 case ACTIVITY_AIRBASE:
691 case ACTIVITY_PILLAGE:
693 case ACTIVITY_GEN_ROAD:
694 case ACTIVITY_POLLUTION:
695 case ACTIVITY_FALLOUT:
700 case ACTIVITY_FORTIFIED:
701 case ACTIVITY_SENTRY:
703 case ACTIVITY_EXPLORE:
704 case ACTIVITY_CONVERT:
705 case ACTIVITY_UNKNOWN:
706 case ACTIVITY_FORTIFYING:
707 case ACTIVITY_PATROL_UNUSED:
722 const struct tile *ptile,
724 bool prevp,
bool linebreak)
757 bool include_nuisances,
int linebreaks)
762 int bufsz =
sizeof(s);
771 if (pextra->category == ECAT_NATURAL
802 if (include_nuisances) {
805 if (pextra->category == ECAT_NUISANCE) {
942 if (pextra != NULL) {
952 if (pextra != NULL) {
979 vtile->
units = unit_list_new();
1032 unit_list_destroy(vtile->
units);
1033 vtile->
units = NULL;
1061 return (vtile == nmap->
tiles + tindex);
1082 bool changed =
FALSE;
1085 if (label != NULL && label[0] ==
'\0') {
1089 if (ptile->
label != NULL) {
1090 if (label == NULL) {
1092 }
else if (strcmp(ptile->
label, label)) {
1096 ptile->
label = NULL;
1097 }
else if (label != NULL) {
1101 if (label != NULL) {
1103 log_error(
"Overlong map label '%s'", label);
1116 return ptile->
placing != NULL;
struct extra_type * base_extra_get(const struct base_type *pbase)
bool territory_claiming_base(const struct base_type *pbase)
bool dbv_isset(const struct dbv *pdbv, int bit)
#define BV_ISSET(bv, bit)
bool city_is_virtual(const struct city *pcity)
const char * city_name_get(const struct city *pcity)
void destroy_city_virtual(struct city *pcity)
static bool is_city_center(const struct city *pcity, const struct tile *ptile)
struct unit struct city struct unit struct tile * target_tile
const struct functions * fc_funcs
static bool is_server(void)
enum unit_activity Activity_type_id
#define EC_NATURAL_DEFENSIVE
#define EC_NOT_AGGRESSIVE
#define MAX_LEN_MAP_LABEL
signed short Continent_id
#define fc_assert_msg(condition, message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
#define fc_calloc(n, esz)
struct extra_type * road_extra_get(const struct road_type *proad)
bool road_has_flag(const struct road_type *proad, enum road_flag_id flag)
struct packet_game_info info
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
void(* destroy_extra)(struct tile *ptile, struct extra_type *pextra)
void(* create_extra)(struct tile *ptile, struct extra_type *pextra, struct player *pplayer)
enum borders_mode borders
int tile_incr_const[O_LAST]
struct terrain * cultivate_result
struct terrain * plant_result
struct terrain * transform_result
struct extra_type * resource
struct player * extras_owner
struct extra_type * placing
struct unit_class::@85 cache
struct extra_type_list * refuel_extras
size_t fc_strlcat(char *dest, const char *src, size_t n)
int cat_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
#define sz_strlcat(dest, src)
int terrain_extra_removal_time(const struct terrain *pterrain, enum unit_activity activity, const struct extra_type *tgt)
const char * terrain_name_translation(const struct terrain *pterrain)
const char * terrain_rule_name(const struct terrain *pterrain)
bool terrain_has_resource(const struct terrain *pterrain, const struct extra_type *presource)
int terrain_extra_build_time(const struct terrain *pterrain, enum unit_activity activity, const struct extra_type *tgt)
Terrain_type_id terrain_number(const struct terrain *pterrain)
#define terrain_has_flag(terr, flag)
int tile_extras_class_defense_bonus(const struct tile *ptile, const struct unit_class *pclass)
static bool tile_info_pollution(char *buf, int bufsz, const struct tile *ptile, struct extra_type *pextra, bool prevp, bool linebreak)
static void tile_cultivate(struct tile *ptile)
void tile_add_extra(struct tile *ptile, const struct extra_type *pextra)
int tile_roads_output_bonus(const struct tile *ptile, enum output_type_id o)
bool tile_has_extra_flag(const struct tile *ptile, enum extra_flag_id flag)
bool tile_has_not_aggressive_extra_for_unit(const struct tile *ptile, const struct unit_type *punittype)
bool tile_has_claimable_base(const struct tile *ptile, const struct unit_type *punittype)
void tile_set_terrain(struct tile *ptile, struct terrain *pterrain)
void tile_virtual_destroy(struct tile *vtile)
bool tile_extra_apply(struct tile *ptile, struct extra_type *tgt)
static void tile_irrigate(struct tile *ptile, struct extra_type *tgt)
bool tile_has_river(const struct tile *ptile)
static void tile_destroy_extra(struct tile *ptile, struct extra_type *pextra)
bool tile_is_placing(const struct tile *ptile)
const bv_extras * tile_extras_null(void)
bool tile_apply_activity(struct tile *ptile, Activity_type_id act, struct extra_type *tgt)
bool tile_map_check(struct civ_map *nmap, struct tile *vtile)
static void tile_transform(struct tile *ptile)
bool tile_has_base(const struct tile *ptile, const struct base_type *pbase)
void tile_remove_extra(struct tile *ptile, const struct extra_type *pextra)
void tile_change_terrain(struct tile *ptile, struct terrain *pterrain)
bool tile_has_visible_extra(const struct tile *ptile, const struct extra_type *pextra)
bool tile_has_refuel_extra(const struct tile *ptile, const struct unit_class *uclass)
int tile_extras_defense_bonus(const struct tile *ptile, const struct unit_type *punittype)
static void tile_mine(struct tile *ptile, struct extra_type *tgt)
bool tile_has_road(const struct tile *ptile, const struct road_type *proad)
bool tile_has_conflicting_extra(const struct tile *ptile, const struct extra_type *pextra)
static void tile_plant(struct tile *ptile)
static void tile_create_extra(struct tile *ptile, struct extra_type *pextra)
void tile_set_owner(struct tile *ptile, struct player *pplayer, struct tile *claimer)
bool tile_is_seen(const struct tile *target_tile, const struct player *pow_player)
static bool add_recursive_extras(struct tile *ptile, struct extra_type *pextra, int rec)
int tile_activity_time(enum unit_activity activity, const struct tile *ptile, const struct extra_type *tgt)
struct tile * tile_virtual_new(const struct tile *ptile)
bool tile_has_native_base(const struct tile *ptile, const struct unit_type *punittype)
int tile_roads_output_incr(const struct tile *ptile, enum output_type_id o)
void * tile_hash_key(const struct tile *ptile)
bool tile_extra_rm_apply(struct tile *ptile, struct extra_type *tgt)
bool tile_set_label(struct tile *ptile, const char *label)
static bool rm_recursive_extras(struct tile *ptile, struct extra_type *pextra, int rec)
void tile_set_resource(struct tile *ptile, struct extra_type *presource)
enum known_type tile_get_known(const struct tile *ptile, const struct player *pplayer)
const bv_extras * tile_extras_safe(const struct tile *ptile)
const char * tile_get_info_text(const struct tile *ptile, bool include_nuisances, int linebreaks)
bool tile_has_road_flag(const struct tile *ptile, enum road_flag_id flag)
static bv_extras empty_extras
struct city * tile_city(const struct tile *ptile)
bool tile_has_cause_extra(const struct tile *ptile, enum extra_cause cause)
void tile_set_worked(struct tile *ptile, struct city *pcity)
void tile_set_continent(struct tile *ptile, Continent_id val)
#define TILE_LB_RIVER_RESOURCE
#define tile_claimer(_tile)
#define TILE_LB_RESOURCE_POLL
static bool tile_resource_is_valid(const struct tile *ptile)
#define tile_worked(_tile)
#define tile_resource(_tile)
#define TILE_LB_TERRAIN_RIVER
#define tile_terrain(_tile)
#define tile_continent(_tile)
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
void unit_virtual_destroy(struct unit *punit)
bool unit_is_virtual(const struct unit *punit)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end