![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Include dependency graph for diptreaty.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | clause_info |
| struct | Clause |
| struct | Treaty |
Macros | |
| #define | SPECENUM_NAME clause_type |
| #define | SPECENUM_VALUE0 CLAUSE_ADVANCE |
| #define | SPECENUM_VALUE0NAME "Advance" |
| #define | SPECENUM_VALUE1 CLAUSE_GOLD |
| #define | SPECENUM_VALUE1NAME "Gold" |
| #define | SPECENUM_VALUE2 CLAUSE_MAP |
| #define | SPECENUM_VALUE2NAME "Map" |
| #define | SPECENUM_VALUE3 CLAUSE_SEAMAP |
| #define | SPECENUM_VALUE3NAME "Seamap" |
| #define | SPECENUM_VALUE4 CLAUSE_CITY |
| #define | SPECENUM_VALUE4NAME "City" |
| #define | SPECENUM_VALUE5 CLAUSE_CEASEFIRE |
| #define | SPECENUM_VALUE5NAME "Ceasefire" |
| #define | SPECENUM_VALUE6 CLAUSE_PEACE |
| #define | SPECENUM_VALUE6NAME "Peace" |
| #define | SPECENUM_VALUE7 CLAUSE_ALLIANCE |
| #define | SPECENUM_VALUE7NAME "Alliance" |
| #define | SPECENUM_VALUE8 CLAUSE_VISION |
| #define | SPECENUM_VALUE8NAME "Vision" |
| #define | SPECENUM_VALUE9 CLAUSE_EMBASSY |
| #define | SPECENUM_VALUE9NAME "Embassy" |
| #define | SPECENUM_COUNT CLAUSE_COUNT |
| #define | is_pact_clause(x) ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE)) |
| #define | SPECLIST_TAG clause |
| #define | SPECLIST_TYPE struct Clause |
| #define | clause_list_iterate(clauselist, pclause) TYPED_LIST_ITERATE(struct Clause, clauselist, pclause) |
| #define | clause_list_iterate_end LIST_ITERATE_END |
Functions | |
| bool | diplomacy_possible (const struct player *pplayer, const struct player *aplayer) |
| Returns TRUE iff pplayer could do diplomancy in the game at all. More... | |
| bool | could_meet_with_player (const struct player *pplayer, const struct player *aplayer) |
| Returns TRUE iff pplayer could do diplomatic meetings with aplayer. More... | |
| bool | could_intel_with_player (const struct player *pplayer, const struct player *aplayer) |
| Returns TRUE iff pplayer can get intelligence about aplayer. More... | |
| void | init_treaty (struct Treaty *ptreaty, struct player *plr0, struct player *plr1) |
| Initialize treaty structure between two players. More... | |
| bool | add_clause (struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val) |
| Add clause to treaty. More... | |
| bool | remove_clause (struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val) |
| Remove clause from treaty. More... | |
| void | clear_treaty (struct Treaty *ptreaty) |
| Free the clauses of a treaty. More... | |
| void | clause_infos_init () |
| Initialize clause info structures. More... | |
| void | clause_infos_free () |
| Free memory associated with clause infos. More... | |
| struct clause_info * | clause_info_get (enum clause_type type) |
| Free memory associated with clause infos. More... | |
| bool | clause_enabled (enum clause_type type, struct player *from, struct player *to) |
| Is clause enabled in this game? Currently this does not consider clause requirements that may change during the game, but returned value is constant for the given clause type thought the game. More... | |
| #define clause_list_iterate | ( | clauselist, | |
| pclause | |||
| ) | TYPED_LIST_ITERATE(struct Clause, clauselist, pclause) |
Definition at line 59 of file diptreaty.h.
| #define clause_list_iterate_end LIST_ITERATE_END |
Definition at line 61 of file diptreaty.h.
| #define is_pact_clause | ( | x | ) | ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE)) |
Definition at line 43 of file diptreaty.h.
| #define SPECENUM_COUNT CLAUSE_COUNT |
Definition at line 40 of file diptreaty.h.
| #define SPECENUM_NAME clause_type |
Definition at line 19 of file diptreaty.h.
| #define SPECENUM_VALUE0 CLAUSE_ADVANCE |
Definition at line 20 of file diptreaty.h.
| #define SPECENUM_VALUE0NAME "Advance" |
Definition at line 21 of file diptreaty.h.
| #define SPECENUM_VALUE1 CLAUSE_GOLD |
Definition at line 22 of file diptreaty.h.
| #define SPECENUM_VALUE1NAME "Gold" |
Definition at line 23 of file diptreaty.h.
| #define SPECENUM_VALUE2 CLAUSE_MAP |
Definition at line 24 of file diptreaty.h.
| #define SPECENUM_VALUE2NAME "Map" |
Definition at line 25 of file diptreaty.h.
| #define SPECENUM_VALUE3 CLAUSE_SEAMAP |
Definition at line 26 of file diptreaty.h.
| #define SPECENUM_VALUE3NAME "Seamap" |
Definition at line 27 of file diptreaty.h.
| #define SPECENUM_VALUE4 CLAUSE_CITY |
Definition at line 28 of file diptreaty.h.
| #define SPECENUM_VALUE4NAME "City" |
Definition at line 29 of file diptreaty.h.
| #define SPECENUM_VALUE5 CLAUSE_CEASEFIRE |
Definition at line 30 of file diptreaty.h.
| #define SPECENUM_VALUE5NAME "Ceasefire" |
Definition at line 31 of file diptreaty.h.
| #define SPECENUM_VALUE6 CLAUSE_PEACE |
Definition at line 32 of file diptreaty.h.
| #define SPECENUM_VALUE6NAME "Peace" |
Definition at line 33 of file diptreaty.h.
| #define SPECENUM_VALUE7 CLAUSE_ALLIANCE |
Definition at line 34 of file diptreaty.h.
| #define SPECENUM_VALUE7NAME "Alliance" |
Definition at line 35 of file diptreaty.h.
| #define SPECENUM_VALUE8 CLAUSE_VISION |
Definition at line 36 of file diptreaty.h.
| #define SPECENUM_VALUE8NAME "Vision" |
Definition at line 37 of file diptreaty.h.
| #define SPECENUM_VALUE9 CLAUSE_EMBASSY |
Definition at line 38 of file diptreaty.h.
| #define SPECENUM_VALUE9NAME "Embassy" |
Definition at line 39 of file diptreaty.h.
| #define SPECLIST_TAG clause |
Definition at line 55 of file diptreaty.h.
| #define SPECLIST_TYPE struct Clause |
Definition at line 56 of file diptreaty.h.
Add clause to treaty.
Definition at line 134 of file diptreaty.cpp.
Referenced by handle_diplomacy_create_clause(), handle_diplomacy_create_clause_req(), and sg_load_treaties().
Is clause enabled in this game? Currently this does not consider clause requirements that may change during the game, but returned value is constant for the given clause type thought the game.
Try not to rely on that, though, as the goal is to change this so that also non-constant requirements will be considered in the future.
Definition at line 272 of file diptreaty.cpp.
Referenced by add_clause().
| struct clause_info* clause_info_get | ( | enum clause_type | type | ) |
Free memory associated with clause infos.
Definition at line 257 of file diptreaty.cpp.
Referenced by handle_diplomacy_accept_treaty_req(), handle_ruleset_clause(), load_ruleset_game(), rscompat_postprocess(), save_game_ruleset(), and send_ruleset_clauses().
| void clause_infos_free | ( | ) |
Free memory associated with clause infos.
Definition at line 244 of file diptreaty.cpp.
Referenced by game_ruleset_free().
| void clause_infos_init | ( | ) |
Initialize clause info structures.
Definition at line 229 of file diptreaty.cpp.
Referenced by game_ruleset_init().
| void clear_treaty | ( | struct Treaty * | ptreaty | ) |
Free the clauses of a treaty.
Definition at line 100 of file diptreaty.cpp.
Referenced by free_treaties(), handle_diplomacy_accept_treaty_req(), and really_diplomacy_cancel_meeting().
Returns TRUE iff pplayer can get intelligence about aplayer.
Definition at line 74 of file diptreaty.cpp.
Referenced by is_req_knowable().
Returns TRUE iff pplayer could do diplomatic meetings with aplayer.
Definition at line 56 of file diptreaty.cpp.
Referenced by can_meet_with_player(), dai_diplomacy_actions(), dai_diplomacy_first_contact(), dai_diplomacy_suggest(), and handle_diplomacy_init_meeting_req().
Returns TRUE iff pplayer could do diplomancy in the game at all.
Definition at line 28 of file diptreaty.cpp.
Referenced by could_meet_with_player(), and dai_diplomacy_actions().
Initialize treaty structure between two players.
Definition at line 87 of file diptreaty.cpp.
Referenced by diplo_wdg::diplo_wdg(), handle_diplomacy_init_meeting_req(), and sg_load_treaties().
| bool remove_clause | ( | struct Treaty * | ptreaty, |
| struct player * | pfrom, | ||
| enum clause_type | type, | ||
| int | val | ||
| ) |
Remove clause from treaty.
Definition at line 110 of file diptreaty.cpp.
Referenced by handle_diplomacy_remove_clause(), and handle_diplomacy_remove_clause_req().