/dports/games/freeciv/freeciv-2.6.6/common/ |
H A D | nation.c | 77 if (NULL == pnation) { in nation_check() 86 || &nations[nation_index(pnation)] != pnation) { in nation_check() 107 nations_iterate(pnation) { in nation_by_translated_plural() 109 return pnation; in nation_by_translated_plural() 126 return pnation; in nation_by_rule_name() 232 return pnation->leaders; in nation_leaders() 572 memset(pnation, 0, sizeof(*pnation)); in nation_init() 574 pnation->item_number = pnation - nations; in nation_init() 597 free(pnation->legend); in nation_free() 612 memset(pnation, 0, sizeof(*pnation)); in nation_free() [all …]
|
H A D | government.c | 188 const struct nation_type *pnation; member 198 return NULL != pnation ? nation_number(pnation) : nation_count(); in nation_hash_val() 220 pruler_title->pnation = pnation; in ruler_title_new() 243 if (NULL != pruler_title->pnation) { in ruler_title_check() 258 if (NULL != pruler_title->pnation) { in ruler_title_check() 273 if (NULL != pruler_title->pnation) { in ruler_title_check() 332 if (pnation != NULL) { in government_ruler_title_new() 345 if (NULL != pnation) { in government_ruler_title_new() 349 nation_rule_name(pnation), nation_number(pnation)); in government_ruler_title_new() 366 return pruler_title->pnation; in ruler_title_nation() [all …]
|
H A D | nation.h | 84 TYPED_LIST_ITERATE(struct nation_type, nationlist, pnation) 93 TYPED_HASH_KEYS_ITERATE(struct nation_type *, nationhash, pnation) 184 Nation_type_id nation_index(const struct nation_type *pnation); 185 Nation_type_id nation_number(const struct nation_type *pnation); 195 const char *nation_rule_name(const struct nation_type *pnation); 217 nation_leaders(const struct nation_type *pnation); 218 struct nation_leader *nation_leader_new(struct nation_type *pnation, 232 nation_cities(const struct nation_type *pnation); 233 struct nation_city *nation_city_new(struct nation_type *pnation, 267 bool nation_is_in_set(const struct nation_type *pnation, [all …]
|
H A D | map.c | 1461 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_allow() 1465 return nation_hash_insert(psp->nations, pnation, NULL); in startpos_allow() 1467 return nation_hash_remove(psp->nations, pnation); in startpos_allow() 1478 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_disallow() 1482 return nation_hash_remove(psp->nations, pnation); in startpos_disallow() 1484 return nation_hash_insert(psp->nations, pnation, NULL); in startpos_disallow() 1504 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_nation_allowed() 1531 nation_hash_iterate(psp->nations, pnation) { in startpos_pack() 1532 BV_SET(packet->nations, nation_number(pnation)); in startpos_pack() 1553 nations_iterate(pnation) { in startpos_unpack() [all …]
|
/dports/games/freeciv-nox11/freeciv-2.6.6/common/ |
H A D | nation.c | 77 if (NULL == pnation) { in nation_check() 86 || &nations[nation_index(pnation)] != pnation) { in nation_check() 107 nations_iterate(pnation) { in nation_by_translated_plural() 109 return pnation; in nation_by_translated_plural() 126 return pnation; in nation_by_rule_name() 232 return pnation->leaders; in nation_leaders() 572 memset(pnation, 0, sizeof(*pnation)); in nation_init() 574 pnation->item_number = pnation - nations; in nation_init() 597 free(pnation->legend); in nation_free() 612 memset(pnation, 0, sizeof(*pnation)); in nation_free() [all …]
|
H A D | government.c | 188 const struct nation_type *pnation; member 198 return NULL != pnation ? nation_number(pnation) : nation_count(); in nation_hash_val() 220 pruler_title->pnation = pnation; in ruler_title_new() 243 if (NULL != pruler_title->pnation) { in ruler_title_check() 258 if (NULL != pruler_title->pnation) { in ruler_title_check() 273 if (NULL != pruler_title->pnation) { in ruler_title_check() 332 if (pnation != NULL) { in government_ruler_title_new() 345 if (NULL != pnation) { in government_ruler_title_new() 349 nation_rule_name(pnation), nation_number(pnation)); in government_ruler_title_new() 366 return pruler_title->pnation; in ruler_title_nation() [all …]
|
H A D | nation.h | 84 TYPED_LIST_ITERATE(struct nation_type, nationlist, pnation) 93 TYPED_HASH_KEYS_ITERATE(struct nation_type *, nationhash, pnation) 184 Nation_type_id nation_index(const struct nation_type *pnation); 185 Nation_type_id nation_number(const struct nation_type *pnation); 195 const char *nation_rule_name(const struct nation_type *pnation); 217 nation_leaders(const struct nation_type *pnation); 218 struct nation_leader *nation_leader_new(struct nation_type *pnation, 232 nation_cities(const struct nation_type *pnation); 233 struct nation_city *nation_city_new(struct nation_type *pnation, 267 bool nation_is_in_set(const struct nation_type *pnation, [all …]
|
H A D | map.c | 1461 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_allow() 1465 return nation_hash_insert(psp->nations, pnation, NULL); in startpos_allow() 1467 return nation_hash_remove(psp->nations, pnation); in startpos_allow() 1478 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_disallow() 1482 return nation_hash_remove(psp->nations, pnation); in startpos_disallow() 1484 return nation_hash_insert(psp->nations, pnation, NULL); in startpos_disallow() 1504 fc_assert_ret_val(NULL != pnation, FALSE); in startpos_nation_allowed() 1531 nation_hash_iterate(psp->nations, pnation) { in startpos_pack() 1532 BV_SET(packet->nations, nation_number(pnation)); in startpos_pack() 1553 nations_iterate(pnation) { in startpos_unpack() [all …]
|
/dports/games/freeciv/freeciv-2.6.6/server/scripting/ |
H A D | api_server_game_methods.c | 90 int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_min() argument 96 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_min() 103 return pnation->server.traits[tr].min; in api_methods_nation_trait_min() 109 int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_max() argument 115 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_max() 122 return pnation->server.traits[tr].max; in api_methods_nation_trait_max() 128 int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_default() argument 134 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_default() 141 return pnation->server.traits[tr].fixed; in api_methods_nation_trait_default()
|
H A D | api_server_game_methods.h | 33 int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, 35 int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, 37 int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation,
|
/dports/games/freeciv-nox11/freeciv-2.6.6/server/scripting/ |
H A D | api_server_game_methods.c | 90 int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_min() argument 96 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_min() 103 return pnation->server.traits[tr].min; in api_methods_nation_trait_min() 109 int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_max() argument 115 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_max() 122 return pnation->server.traits[tr].max; in api_methods_nation_trait_max() 128 int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation, in api_methods_nation_trait_default() argument 134 LUASCRIPT_CHECK_SELF(L, pnation, -1); in api_methods_nation_trait_default() 141 return pnation->server.traits[tr].fixed; in api_methods_nation_trait_default()
|
H A D | api_server_game_methods.h | 33 int api_methods_nation_trait_min(lua_State *L, Nation_Type *pnation, 35 int api_methods_nation_trait_max(lua_State *L, Nation_Type *pnation, 37 int api_methods_nation_trait_default(lua_State *L, Nation_Type *pnation,
|
/dports/games/freeciv-nox11/freeciv-2.6.6/server/ |
H A D | rssanity.c | 57 static bool nation_has_initial_tech(struct nation_type *pnation, in nation_has_initial_tech() argument 72 i < MAX_NUM_TECH_LIST && pnation->init_techs[i] != A_LAST; in nation_has_initial_tech() 74 if (pnation->init_techs[i] == advance_number(tech)) { in nation_has_initial_tech() 608 nations_iterate(pnation) { in sanity_check_ruleset_data() 630 nation_rule_name(pnation)); in sanity_check_ruleset_data() 639 Tech_type_id tech = pnation->init_techs[techi]; in sanity_check_ruleset_data() 646 nation_rule_name(pnation)); in sanity_check_ruleset_data() 655 nation_rule_name(pnation)); in sanity_check_ruleset_data() 661 if (nation_barbarian_type(pnation) != NOT_A_BARBARIAN in sanity_check_ruleset_data() 662 && pnation->init_buildings[0] != B_LAST) { in sanity_check_ruleset_data() [all …]
|
H A D | srv_main.c | 2127 nations_iterate(pnation) { in update_nations_with_startpos() 2129 if (pnation->player->nation == pnation) { in update_nations_with_startpos() 2138 pnation->player = NULL; in update_nations_with_startpos() 2142 pnation->player = NULL; in update_nations_with_startpos() 2171 nations_iterate(pnation) { in update_nations_with_startpos() 2438 player_set_nation(pplayer, pnation); in player_nation_defaults() 2439 fc_assert(pnation == pplayer->nation); in player_nation_defaults() 2508 if (is_nation_playable(pnation) in generate_players() 2510 && NULL == pnation->player in generate_players() 2587 picked = pnation; in generate_players() [all …]
|
H A D | plrhand.c | 1830 } else if (NULL != pnation && other_player->nation == pnation) { in server_player_name_is_allowed() 1844 if (NULL == pnation) { in server_player_name_is_allowed() 1847 pnation = pplayer->nation; in server_player_name_is_allowed() 1851 if (NULL != pnation && NULL != nation_leader_by_name(pnation, name)) { in server_player_name_is_allowed() 2174 nations_iterate(pnation) { in pick_a_nation() 2178 || pnation->player in pick_a_nation() 2203 nation_rule_name(pnation), nation_number(pnation), in pick_a_nation() 2246 nations_iterate(pnation) { in pick_a_nation() 2252 return pnation; in pick_a_nation() 2338 nations_iterate(pnation) { in send_nation_availability_real() [all …]
|
H A D | plrhand.h | 50 const struct nation_type *pnation, 58 bool nation_is_in_current_set(const struct nation_type *pnation); 66 #define allowed_nations_iterate(pnation) \ argument 67 nations_iterate(pnation) { \ 68 if (nation_is_in_current_set(pnation)) {
|
H A D | edithand.c | 914 struct nation_type *pnation; in handle_edit_player_create() local 934 if (!pnation) { in handle_edit_player_create() 950 player_nation_defaults(pplayer, pnation, TRUE); in handle_edit_player_create() 1009 struct nation_type *pnation; in handle_edit_player() local 1041 pnation = nation_by_number(packet->nation); in handle_edit_player() 1042 if (nation_of_player(pplayer) != pnation) { in handle_edit_player() 1043 if (pnation == NULL) { in handle_edit_player() 1049 } else if (pnation->player != NULL) { in handle_edit_player() 1056 player_number(pnation->player), in handle_edit_player() 1057 player_name(pnation->player)); in handle_edit_player() [all …]
|
H A D | ruleset.c | 4166 nations_iterate(pnation) { in load_ruleset_nations() 4215 if (pnation == pconflict) { in load_ruleset_nations() 4332 int diff = pnation->server.traits[tr].max - pnation->server.traits[tr].min; in load_ruleset_nations() 4335 pnation->server.traits[tr].fixed = diff / 2 + pnation->server.traits[tr].min; in load_ruleset_nations() 4338 if (pnation->server.traits[tr].max < pnation->server.traits[tr].min) { in load_ruleset_nations() 4350 pnation->is_playable = in load_ruleset_nations() 4454 if (pnation->style == NULL) { in load_ruleset_nations() 4480 if (pconflict == pnation) { in load_ruleset_nations() 4565 pnation->player = NULL; in load_ruleset_nations() 4588 nations_iterate(pnation) { in load_ruleset_nations() [all …]
|
H A D | srv_main.h | 105 const char *pick_random_player_name(const struct nation_type *pnation); 106 void player_nation_defaults(struct player *pplayer, struct nation_type *pnation,
|
/dports/games/freeciv/freeciv-2.6.6/server/ |
H A D | rssanity.c | 57 static bool nation_has_initial_tech(struct nation_type *pnation, in nation_has_initial_tech() argument 72 i < MAX_NUM_TECH_LIST && pnation->init_techs[i] != A_LAST; in nation_has_initial_tech() 74 if (pnation->init_techs[i] == advance_number(tech)) { in nation_has_initial_tech() 608 nations_iterate(pnation) { in sanity_check_ruleset_data() 630 nation_rule_name(pnation)); in sanity_check_ruleset_data() 639 Tech_type_id tech = pnation->init_techs[techi]; in sanity_check_ruleset_data() 646 nation_rule_name(pnation)); in sanity_check_ruleset_data() 655 nation_rule_name(pnation)); in sanity_check_ruleset_data() 661 if (nation_barbarian_type(pnation) != NOT_A_BARBARIAN in sanity_check_ruleset_data() 662 && pnation->init_buildings[0] != B_LAST) { in sanity_check_ruleset_data() [all …]
|
H A D | srv_main.c | 2127 nations_iterate(pnation) { in update_nations_with_startpos() 2129 if (pnation->player->nation == pnation) { in update_nations_with_startpos() 2138 pnation->player = NULL; in update_nations_with_startpos() 2142 pnation->player = NULL; in update_nations_with_startpos() 2171 nations_iterate(pnation) { in update_nations_with_startpos() 2438 player_set_nation(pplayer, pnation); in player_nation_defaults() 2439 fc_assert(pnation == pplayer->nation); in player_nation_defaults() 2508 if (is_nation_playable(pnation) in generate_players() 2510 && NULL == pnation->player in generate_players() 2587 picked = pnation; in generate_players() [all …]
|
H A D | plrhand.c | 1830 } else if (NULL != pnation && other_player->nation == pnation) { in server_player_name_is_allowed() 1844 if (NULL == pnation) { in server_player_name_is_allowed() 1847 pnation = pplayer->nation; in server_player_name_is_allowed() 1851 if (NULL != pnation && NULL != nation_leader_by_name(pnation, name)) { in server_player_name_is_allowed() 2174 nations_iterate(pnation) { in pick_a_nation() 2178 || pnation->player in pick_a_nation() 2203 nation_rule_name(pnation), nation_number(pnation), in pick_a_nation() 2246 nations_iterate(pnation) { in pick_a_nation() 2252 return pnation; in pick_a_nation() 2338 nations_iterate(pnation) { in send_nation_availability_real() [all …]
|
H A D | plrhand.h | 50 const struct nation_type *pnation, 58 bool nation_is_in_current_set(const struct nation_type *pnation); 66 #define allowed_nations_iterate(pnation) \ argument 67 nations_iterate(pnation) { \ 68 if (nation_is_in_current_set(pnation)) {
|
H A D | edithand.c | 914 struct nation_type *pnation; in handle_edit_player_create() local 934 if (!pnation) { in handle_edit_player_create() 950 player_nation_defaults(pplayer, pnation, TRUE); in handle_edit_player_create() 1009 struct nation_type *pnation; in handle_edit_player() local 1041 pnation = nation_by_number(packet->nation); in handle_edit_player() 1042 if (nation_of_player(pplayer) != pnation) { in handle_edit_player() 1043 if (pnation == NULL) { in handle_edit_player() 1049 } else if (pnation->player != NULL) { in handle_edit_player() 1056 player_number(pnation->player), in handle_edit_player() 1057 player_name(pnation->player)); in handle_edit_player() [all …]
|
H A D | ruleset.c | 4166 nations_iterate(pnation) { in load_ruleset_nations() 4215 if (pnation == pconflict) { in load_ruleset_nations() 4332 int diff = pnation->server.traits[tr].max - pnation->server.traits[tr].min; in load_ruleset_nations() 4335 pnation->server.traits[tr].fixed = diff / 2 + pnation->server.traits[tr].min; in load_ruleset_nations() 4338 if (pnation->server.traits[tr].max < pnation->server.traits[tr].min) { in load_ruleset_nations() 4350 pnation->is_playable = in load_ruleset_nations() 4454 if (pnation->style == NULL) { in load_ruleset_nations() 4480 if (pconflict == pnation) { in load_ruleset_nations() 4565 pnation->player = NULL; in load_ruleset_nations() 4588 nations_iterate(pnation) { in load_ruleset_nations() [all …]
|