13#ifndef FC__DIPTREATY_H
14#define FC__DIPTREATY_H
25#define SPECENUM_NAME clause_type
26#define SPECENUM_VALUE0 CLAUSE_ADVANCE
27#define SPECENUM_VALUE0NAME "Advance"
28#define SPECENUM_VALUE1 CLAUSE_GOLD
29#define SPECENUM_VALUE1NAME "Gold"
30#define SPECENUM_VALUE2 CLAUSE_MAP
31#define SPECENUM_VALUE2NAME "Map"
32#define SPECENUM_VALUE3 CLAUSE_SEAMAP
33#define SPECENUM_VALUE3NAME "Seamap"
34#define SPECENUM_VALUE4 CLAUSE_CITY
35#define SPECENUM_VALUE4NAME "City"
36#define SPECENUM_VALUE5 CLAUSE_CEASEFIRE
37#define SPECENUM_VALUE5NAME "Ceasefire"
38#define SPECENUM_VALUE6 CLAUSE_PEACE
39#define SPECENUM_VALUE6NAME "Peace"
40#define SPECENUM_VALUE7 CLAUSE_ALLIANCE
41#define SPECENUM_VALUE7NAME "Alliance"
42#define SPECENUM_VALUE8 CLAUSE_VISION
43#define SPECENUM_VALUE8NAME "Vision"
44#define SPECENUM_VALUE9 CLAUSE_EMBASSY
45#define SPECENUM_VALUE9NAME "Embassy"
46#define SPECENUM_VALUE10 CLAUSE_SHARED_TILES
47#define SPECENUM_VALUE10NAME "SharedTiles"
48#define SPECENUM_COUNT CLAUSE_COUNT
51#define is_pact_clause(x) \
52 ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE))
64#define SPECLIST_TAG clause
65#define SPECLIST_TYPE struct Clause
68#define clause_list_iterate(clauselist, pclause) \
69 TYPED_LIST_ITERATE(struct Clause, clauselist, pclause)
70#define clause_list_iterate_end LIST_ITERATE_END
106#define SPECLIST_TAG treaty
107#define SPECLIST_TYPE struct Treaty
110#define treaty_list_iterate(list, p) \
111 TYPED_LIST_ITERATE(struct Treaty, list, p)
112#define treaty_list_iterate_end LIST_ITERATE_END
void(* treaty_cb)(struct Treaty *, void *data)
void clause_infos_init(void)
void clause_infos_free(void)
void clear_treaty(struct Treaty *ptreaty)
void init_treaty(struct Treaty *ptreaty, struct player *plr0, struct player *plr1)
void treaties_iterate(treaty_cb cb, void *data)
bool add_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val, struct player *client_player)
bool clause_enabled(enum clause_type type)
void treaty_add(struct Treaty *ptreaty)
bool remove_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
void treaty_remove(struct Treaty *ptreaty)
bool could_intel_with_player(const struct player *pplayer, const struct player *aplayer)
struct Treaty * find_treaty(struct player *plr0, struct player *plr1)
struct clause_info * clause_info_get(enum clause_type type)
bool diplomacy_possible(const struct player *pplayer, const struct player *aplayer)
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
struct clause_list * clauses
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs