50#define SANITY_FAIL(format, ...) \
51 fc_assert_fail(file, function, line, NULL, format, ## __VA_ARGS__)
53#define SANITY_CHECK(check) \
54 fc_assert_full(file, function, line, check, , NOLOGMSG, NOLOGMSG)
56#define SANITY_CITY(_city, check) \
57 fc_assert_full(file, function, line, check, , \
58 "(%4d, %4d) in \"%s\"[%d]", TILE_XY((_city)->tile), \
59 city_name_get(_city), city_size_get(_city))
61#define SANITY_TERRAIN(_tile, check) \
62 fc_assert_full(file, function, line, check, , \
63 "(%4d, %4d) at \"%s\"", TILE_XY(_tile), \
64 terrain_rule_name(tile_terrain(_tile)))
66#define SANITY_TILE(_tile, check) \
68 struct city *_tile##_city = tile_city(_tile); \
69 if (NULL != _tile##_city) { \
70 SANITY_CITY(_tile##_city, check); \
72 SANITY_TERRAIN(_tile, check); \
150 int nplayers = 0,
nbarbs = 0;
234 SANITY_FAIL(
"(----,----) city has no tile (skipping remaining tests), "
235 "at %s \"%s\"[%d]%s",
249 SANITY_FAIL(
"(%4d,%4d) tile owned by %s, at %s \"%s\"[%d]%s",
274 if (partner !=
NULL) {
278 if (
pback->partner == pcity->
id) {
309 SANITY_FAIL(
"(%4d,%4d) Bad worker task %d in \"%s\", removing...",
345 SANITY_FAIL(
"(%4d,%4d) %d citizens not equal [size], "
440 "but it can't continue at %s",
577 SANITY_FAIL(
"%s government is anarchy, but does not finish!",
593 SANITY_CHECK(!pnation->player || pnation->player->nation == pnation);
610 memset(count, 0,
sizeof(count));
#define BV_ISSET(bv, bit)
const char * city_name_get(const struct city *pcity)
void city_refresh_from_main_map(const struct civ_map *nmap, struct city *pcity, bool *workers_map)
int city_map_radius_sq_get(const struct city *pcity)
void citylog_map_workers(enum log_level level, struct city *pcity)
citizens city_specialists(const struct city *pcity)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
static citizens city_size_get(const struct city *pcity)
#define city_tile_iterate_skip_free_worked(_nmap, _radius_sq, _city_tile, _tile, _index, _x, _y)
#define city_owner(_pcity_)
#define city_tile_iterate_skip_free_worked_end
#define city_list_iterate_end
#define city_built_iterate(_pcity, _p)
#define city_built_iterate_end
void city_repair_size(struct city *pcity, int change)
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
enum diplstate_type valid_dst_closest(struct player_diplstate *dst)
#define IDENTITY_NUMBER_ZERO
struct city * game_city_by_number(int id)
#define GAME_TRANSPORT_MAX_RECURSIVE
struct government * government_by_number(const Government_type_id gov)
struct government * government_of_player(const struct player *pplayer)
bool is_great_wonder(const struct impr_type *pimprove)
struct city * city_from_small_wonder(const struct player *pplayer, const struct impr_type *pimprove)
struct city * city_from_great_wonder(const struct impr_type *pimprove)
bool is_small_wonder(const struct impr_type *pimprove)
#define log_debug(message,...)
#define fc_assert_exit(condition)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
#define CHECK_INDEX(mindex)
#define adjc_iterate(nmap, center_tile, itr_tile)
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
bool really_gives_vision(struct player *me, struct player *them)
struct player_tile * map_get_player_tile(const struct tile *ptile, const struct player *pplayer)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
const char * nation_rule_name(const struct nation_type *pnation)
struct nation_type * nation_of_player(const struct player *pplayer)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
bool player_slot_is_used(const struct player_slot *pslot)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
bool players_on_same_team(const struct player *pplayer1, const struct player *pplayer2)
int player_slot_count(void)
enum dipl_reason pplayer_can_make_treaty(const struct player *p1, const struct player *p2, enum diplstate_type treaty)
bool player_has_flag(const struct player *pplayer, enum plr_flag_id flag)
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
struct player * player_slot_get_player(const struct player_slot *pslot)
#define players_iterate_end
@ DIPL_ALLIANCE_PROBLEM_THEM
@ DIPL_ALLIANCE_PROBLEM_US
#define players_iterate(_pplayer)
#define player_list_iterate(playerlist, pplayer)
static bool is_barbarian(const struct player *pplayer)
#define player_slots_iterate(_pslot)
#define player_list_iterate_end
#define player_slots_iterate_end
int normal_player_count(void)
int recalculate_techs_researched(const struct research *presearch)
#define researches_iterate(_presearch)
#define researches_iterate_end
struct setting_list * level[OLEVELS_NUM]
bool game_was_started(void)
enum server_states server_state(void)
struct worker_task_list * task_reqs
enum capital_type capital
enum city_needs_arrange needs_arrange
citizens feel[CITIZEN_LAST][FEELING_LAST]
struct city::@17::@19 server
struct unit_list * units_supported
struct conn_list * est_connections
struct packet_game_info info
struct conn_list * web_client_connections
struct conn_list * all_connections
struct civ_game::@31::@35 server
struct government * government_during_revolution
enum borders_mode borders
Government_type_id government_during_revolution_id
struct city_list * cities
struct nation_type * nation
struct player::@70::@72 server
enum unit_activity activity
struct extra_type * activity_target
int team_index(const struct team *pteam)
struct team * team_slot_get_team(const struct team_slot *tslot)
int team_slot_index(const struct team_slot *tslot)
const struct player_list * team_members(const struct team *pteam)
bool team_slot_is_used(const struct team_slot *tslot)
#define team_slots_iterate_end
#define team_slots_iterate(_tslot)
#define teams_iterate_end
#define teams_iterate(_pteam)
#define MAX_NUM_TEAM_SLOTS
bool is_future_tech(Tech_type_id tech)
struct advance * valid_advance_by_number(const Tech_type_id id)
Terrain_type_id terrain_count(void)
Terrain_type_id terrain_index(const struct terrain *pterrain)
#define is_ocean_tile(ptile)
#define terrain_has_flag(terr, flag)
const char * tile_get_info_text(const struct tile *ptile, bool include_nuisances, int linebreaks)
struct city * tile_city(const struct tile *ptile)
#define tile_worked(_tile)
#define tile_terrain(_tile)
#define tile_continent(_tile)
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
#define trade_routes_iterate_end
#define trade_routes_iterate(c, proute)
int get_transporter_occupancy(const struct unit *ptrans)
bool unit_transport_check(const struct unit *pcargo, const struct unit *ptrans)
struct unit * unit_transport_get(const struct unit *pcargo)
bool can_unit_continue_current_activity(const struct civ_map *nmap, struct unit *punit)
const char * get_activity_text(enum unit_activity activity)
int get_transporter_capacity(const struct unit *punit)
bool unit_transported(const struct unit *pcargo)
struct unit_list * unit_transport_cargo(const struct unit *ptrans)
bool activity_requires_target(enum unit_activity activity)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const char * unit_rule_name(const struct unit *punit)
#define vision_layer_iterate(v)
#define vision_layer_iterate_end
bool worker_task_is_sane(struct worker_task *ptask)
#define worker_task_list_iterate(tasklist, ptask)
#define worker_task_list_iterate_end