Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/plrdlg_common.c Source File

Freeciv-3.1

Loading...
Searching...
No Matches
plrdlg_common.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <string.h>
19
20/* utility */
21#include "fcintl.h"
22#include "log.h"
23#include "support.h"
24
25/* common */
26#include "connection.h"
27#include "game.h"
28#include "government.h"
29#include "research.h"
30
31/* client */
32#include "client_main.h"
33#include "climisc.h"
34#include "options.h"
35#include "text.h"
36
37/* client/include */
38#include "plrdlg_g.h"
39
40#include "plrdlg_common.h"
41
42
43/************************************************************************/
46 static const char *col_name(const struct player *player)
47{
48 return player_name(player);
49}
50
51/************************************************************************/
54 static int cmp_name(const struct player *pplayer1,
55 const struct player *pplayer2)
56{
57 return fc_stricoll(player_name(pplayer1), player_name(pplayer2));
58}
59
60/************************************************************************/
63 static const char *col_username(const struct player *player)
64{
65 return player->username;
66}
67
68/************************************************************************/
71 static const char *col_nation(const struct player *player)
72{
73 return nation_adjective_for_player(player);
74}
75
76/************************************************************************/
79 static const char *col_team(const struct player *player)
80{
81 return team_name_translation(player->team);
82}
83
84/************************************************************************/
87 static bool col_ai(const struct player *plr)
88{
89 /* TODO: Currently is_ai() is a macro so we can't have it
90 * directly as this callback, but once it's a function,
91 * do that. */
92 return is_ai(plr);
93}
94
95/************************************************************************/
99 static const char *col_embassy(const struct player *player)
100{
101 return get_embassy_status(client.conn.playing, player);
102}
103
104/************************************************************************/
108 static const char *col_diplstate(const struct player *player)
109{
110 static char buf[100];
111 const struct player_diplstate *pds;
112
113 if (NULL == client.conn.playing || player == client.conn.playing) {
114 return "-";
115 } else {
116 pds = player_diplstate_get(client.conn.playing, player);
117 if (pds->type == DS_CEASEFIRE || pds->type == DS_ARMISTICE) {
118 fc_snprintf(buf, sizeof(buf), "%s (%d)",
119 diplstate_type_translated_name(pds->type),
120 pds->turns_left);
121 return buf;
122 } else {
123 return diplstate_type_translated_name(pds->type);
124 }
125 }
126}
127
128/************************************************************************/
134 static int diplstate_value(const struct player *plr)
135{
136 /* these values are scaled so that adding/subtracting
137 the number of turns left makes sense */
138 static const int diplstate_cmp_lookup[DS_LAST] = {
139 [DS_TEAM] = 1 << 16,
140 [DS_ALLIANCE] = 2 << 16,
141 [DS_PEACE] = 3 << 16,
142 [DS_ARMISTICE] = 4 << 16,
143 [DS_CEASEFIRE] = 5 << 16,
144 [DS_WAR] = 6 << 16,
145 [DS_NO_CONTACT] = 7 << 16
146 };
147
148 const struct player_diplstate *pds;
149 int ds_value;
150
151 if (NULL == client.conn.playing || plr == client.conn.playing) {
152 /* current global player is as close as players get
153 -> return value smaller than for DS_TEAM */
154 return 0;
155 }
156
157 pds = player_diplstate_get(client.conn.playing, plr);
158 ds_value = diplstate_cmp_lookup[pds->type];
159
160 if (pds->type == DS_ARMISTICE || pds->type == DS_CEASEFIRE) {
161 ds_value += pds->turns_left;
162 }
163
164 return ds_value;
165}
166
167/************************************************************************/
170 static int cmp_diplstate(const struct player *player1,
171 const struct player *player2)
172{
173 return diplstate_value(player1) - diplstate_value(player2);
174}
175
176/************************************************************************/
179 static const char *col_love(const struct player *player)
180{
181 if (NULL == client.conn.playing || player == client.conn.playing
182 || is_human(player)) {
183 return "-";
184 } else {
185 return love_text(player->ai_common.love[player_index(client.conn.playing)]);
186 }
187}
188
189/************************************************************************/
192 static int cmp_love(const struct player *player1,
193 const struct player *player2)
194{
195 int love1, love2;
196
197 if (NULL == client.conn.playing) {
198 return player_number(player1) - player_number(player2);
199 }
200
201 if (player1 == client.conn.playing || is_human(player1)) {
202 love1 = MAX_AI_LOVE + 999;
203 } else {
204 love1 = player1->ai_common.love[player_index(client.conn.playing)];
205 }
206
207 if (player2 == client.conn.playing || is_human(player2)) {
208 love2 = MAX_AI_LOVE + 999;
209 } else {
210 love2 = player2->ai_common.love[player_index(client.conn.playing)];
211 }
212
213 return love1 - love2;
214}
215
216/************************************************************************/
219 static const char *col_vision(const struct player *player)
220{
221 return get_vision_status(client.conn.playing, player);
222}
223
224/************************************************************************/
229 const char *plrdlg_col_state(const struct player *plr)
230{
231 if (!plr->is_alive) {
232 /* TRANS: Dead -- Rest In Peace -- Reqia In Pace */
233 return _("R.I.P.");
234 } else if (!plr->is_connected) {
235 struct option *opt;
236 bool consider_tb = FALSE;
237
238 if (is_ai(plr)) {
239 return "";
240 }
241
242 opt = optset_option_by_name(server_optset, "turnblock");
243 if (opt != NULL) {
244 consider_tb = option_bool_get(opt);
245 }
246
247 if (!consider_tb) {
248 /* TRANS: No connection */
249 return _("noconn");
250 }
251
252 if (!is_player_phase(plr, game.info.phase)) {
253 return _("waiting");
254 } else if (plr->phase_done) {
255 return _("done");
256 } else {
257 /* TRANS: Turnblocking & player not connected */
258 return _("blocking");
259 }
260 } else {
261 if (!is_player_phase(plr, game.info.phase)) {
262 return _("waiting");
263 } else if (plr->phase_done) {
264 return _("done");
265 } else {
266 return _("moving");
267 }
268 }
269}
270
271/************************************************************************/
275 static const char *col_host(const struct player *player)
276{
277 return player_addr_hack(player);
278}
279
280/************************************************************************/
283 static const char *col_idle(const struct player *plr)
284{
285 int idle;
286 static char buf[100];
287
288 if (plr->nturns_idle > 3) {
289 idle = plr->nturns_idle - 1;
290 } else {
291 idle = 0;
292 }
293 fc_snprintf(buf, sizeof(buf), "%d", idle);
294 return buf;
295}
296
297/************************************************************************/
300 static int cmp_score(const struct player *player1,
301 const struct player *player2)
302{
303 return player1->score.game - player2->score.game;
304}
305
306/************************************************************************/
309 static const char *col_government(const struct player *them)
310{
311 static char buf[100];
312 const struct player *me = client_player();
313
314 /* 'contact' gives the knowledge of other's government */
315 if (me == them
316 || client_is_global_observer()
317 || team_has_embassy(me->team, them)
318 || player_diplstate_get(me, them)->contact_turns_left > 0 ) {
319 fc_snprintf(buf, sizeof(buf),"%s", government_name_for_player(them));
320 } else {
321 fc_snprintf(buf, sizeof(buf),"?");
322 }
323
324 return buf;
325}
326
327/************************************************************************/
331 static int cmp_culture(const struct player *player1,
332 const struct player *player2)
333{
334 return player1->client.culture - player2->client.culture;
335}
336
337/************************************************************************/
340 static const char *get_culture_info(const struct player *them)
341{
342 static char buf[10];
343 const struct player *me = client_player();
344 bool gobs = client_is_global_observer();
345
346 if (them == NULL || !them->is_alive) {
347 fc_snprintf(buf, sizeof(buf), "-");
348 } else if (gobs
349 || (me != NULL
350 && (me == them || team_has_embassy(me->team, them)))) {
351 fc_snprintf(buf, sizeof(buf), "%d", them->client.culture);
352 } else {
353 fc_snprintf(buf, sizeof(buf), "?");
354 }
355
356 return buf;
357}
358
359/************************************************************************/
362 static const char *col_culture(const struct player *pplayer)
363{
364 return get_culture_info(pplayer);
365}
366
367/************************************************************************/
371 static int cmp_gold(const struct player* player1,
372 const struct player* player2)
373{
374 return player1->economic.gold - player2->economic.gold;
375}
376
377/************************************************************************/
380 static const char *get_gold_info(const struct player *them)
381{
382 static char buf[10];
383 const struct player *me = client_player();
384 bool gobs = client_is_global_observer();
385
386 if (them == NULL || !them->is_alive) {
387 fc_snprintf(buf, sizeof(buf), "-");
388 } else if (gobs
389 || (me != NULL
390 && (me == them || team_has_embassy(me->team, them)
391 || player_diplstate_get(me, them)->contact_turns_left > 0))) {
392 fc_snprintf(buf, sizeof(buf), "%d", them->economic.gold);
393 } else {
394 fc_snprintf(buf, sizeof(buf), "?");
395 }
396
397 return buf;
398}
399
400/************************************************************************/
403 static const char *col_gold(const struct player *pplayer)
404{
405 return get_gold_info(pplayer);
406}
407
408/************************************************************************/
412 static int cmp_tax(const struct player* player1,
413 const struct player* player2)
414{
415 return player1->economic.tax - player2->economic.tax;
416}
417
418/************************************************************************/
421 static const char *get_tax_info(const struct player *them)
422{
423 static char buf[10];
424 const struct player *me = client_player();
425 bool gobs = client_is_global_observer();
426
427 if (them == NULL || !them->is_alive) {
428 fc_snprintf(buf, sizeof(buf), "-");
429 } else if (gobs
430 || (me != NULL
431 && (me == them || team_has_embassy(me->team, them)))) {
432 fc_snprintf(buf, sizeof(buf), "%d %%", them->economic.tax);
433 } else {
434 fc_snprintf(buf, sizeof(buf), "?");
435 }
436
437 return buf;
438}
439
440/************************************************************************/
443 static const char *col_tax(const struct player *pplayer)
444{
445 return get_tax_info(pplayer);
446}
447
448/************************************************************************/
452 static int cmp_science(const struct player* player1,
453 const struct player* player2)
454{
455 return player1->economic.science - player2->economic.science;
456}
457
458/************************************************************************/
461 static const char *get_science_info(const struct player *them)
462{
463 static char buf[10];
464 const struct player *me = client_player();
465 bool gobs = client_is_global_observer();
466
467 if (them == NULL || !them->is_alive) {
468 fc_snprintf(buf, sizeof(buf), "-");
469 } else if (gobs
470 || (me != NULL
471 && (me == them || team_has_embassy(me->team, them)))) {
472 fc_snprintf(buf, sizeof(buf), "%d %%", them->economic.science);
473 } else {
474 fc_snprintf(buf, sizeof(buf), "?");
475 }
476
477 return buf;
478}
479
480/************************************************************************/
483 static const char *col_science(const struct player *pplayer)
484{
485 return get_science_info(pplayer);
486}
487
488/************************************************************************/
492 static int cmp_luxury(const struct player* player1,
493 const struct player* player2)
494{
495 return player1->economic.luxury - player2->economic.luxury;
496}
497
498/************************************************************************/
501 static const char *get_luxury_info(const struct player *them)
502{
503 static char buf[10];
504 const struct player *me = client_player();
505 bool gobs = client_is_global_observer();
506
507 if (them == NULL || !them->is_alive) {
508 fc_snprintf(buf, sizeof(buf), "-");
509 } else if (gobs
510 || (me != NULL
511 && (me == them || team_has_embassy(me->team, them)))) {
512 fc_snprintf(buf, sizeof(buf), "%d %%", them->economic.luxury);
513 } else {
514 fc_snprintf(buf, sizeof(buf), "?");
515 }
516
517 return buf;
518}
519
520/************************************************************************/
523 static const char *col_luxury(const struct player *pplayer)
524{
525 return get_luxury_info(pplayer);
526}
527
528/************************************************************************/
531 static const char *get_researching_info(const struct player *them)
532{
533 static char buf[100];
534 const struct player *me = client_player();
535 bool gobs = client_is_global_observer();
536
537 if (them == NULL || !them->is_alive) {
538 fc_snprintf(buf, sizeof(buf), "-");
539 } else if (gobs
540 || (me != NULL
541 && (me == them || team_has_embassy(me->team, them)))) {
542 struct research *research = research_get(them);
543
544 fc_snprintf(buf, sizeof(buf), "%s",
545 research_advance_name_translation(research, research->researching));
546 } else {
547 fc_snprintf(buf, sizeof(buf), "?");
548 }
549
550 return buf;
551}
552
553/************************************************************************/
556 static const char *col_research(const struct player *pplayer)
557{
558 return get_researching_info(pplayer);
559}
560
561/****************************************************************************
562 ...
563****************************************************************************/
564 struct player_dlg_column player_dlg_columns[] = {
565 {TRUE, COL_TEXT, N_("?Player:Name"), col_name, NULL, cmp_name, "name"},
566 {FALSE, COL_TEXT, N_("Username"), col_username, NULL, NULL, "username"},
567 {TRUE, COL_FLAG, N_("Flag"), NULL, NULL, NULL, "flag"},
568 {TRUE, COL_TEXT, N_("Nation"), col_nation, NULL, NULL, "nation"},
569 {TRUE, COL_COLOR, N_("Border"), NULL, NULL, NULL, "border"},
570 {TRUE, COL_RIGHT_TEXT, N_("Score"), get_score_text, NULL, cmp_score, "score"},
571 {TRUE, COL_TEXT, N_("Team"), col_team, NULL, NULL, "team"},
572 {TRUE, COL_BOOLEAN, N_("AI"), NULL, col_ai, NULL, "ai"},
573 {TRUE, COL_TEXT, N_("Attitude"), col_love, NULL, cmp_love, "attitude"},
574 {TRUE, COL_TEXT, N_("Embassy"), col_embassy, NULL, NULL, "embassy"},
575 {TRUE, COL_TEXT, N_("Dipl.State"), col_diplstate, NULL, cmp_diplstate,
576 "diplstate"},
577 {TRUE, COL_TEXT, N_("Vision"), col_vision, NULL, NULL, "vision"},
578 {TRUE, COL_TEXT, N_("State"), plrdlg_col_state, NULL, NULL, "state"},
579 {FALSE, COL_TEXT, N_("?Player_dlg:Host"), col_host, NULL, NULL, "host"},
580 {FALSE, COL_RIGHT_TEXT, N_("?Player_dlg:Idle"), col_idle, NULL, NULL, "idle"},
581 {FALSE, COL_RIGHT_TEXT, N_("Ping"), get_ping_time_text, NULL, NULL, "ping"},
582 {TRUE, COL_TEXT, N_("Government"), col_government, NULL, NULL, "government"},
583 {TRUE, COL_RIGHT_TEXT, N_("Culture"), col_culture, NULL, cmp_culture, "culture"},
584 {TRUE, COL_RIGHT_TEXT, N_("Gold"), col_gold, NULL, cmp_gold, "gold"},
585 {TRUE, COL_RIGHT_TEXT, N_("Tax"), col_tax, NULL, cmp_tax, "tax"},
586 {TRUE, COL_RIGHT_TEXT, N_("Science"), col_science, NULL, cmp_science, "science"},
587 {TRUE, COL_RIGHT_TEXT, N_("Luxury"), col_luxury, NULL, cmp_luxury, "luxury"},
588 {TRUE, COL_TEXT, N_("Research"), col_research, NULL, NULL, "research"}
589};
590
591 const int num_player_dlg_columns = ARRAY_SIZE(player_dlg_columns);
592
593/************************************************************************/
596 int player_dlg_default_sort_column(void)
597{
598 return 3;
599}
600
601/************************************************************************/
604 void init_player_dlg_common(void)
605{
606 int i;
607
608 for (i = 0; i < num_player_dlg_columns; i++) {
609 player_dlg_columns[i].title = Q_(player_dlg_columns[i].title);
610 }
611}
612
613/************************************************************************/
622 const char *player_addr_hack(const struct player *pplayer)
623{
624 conn_list_iterate(pplayer->connections, pconn) {
625 if (!pconn->observer) {
626 return pconn->addr;
627 }
628 } conn_list_iterate_end;
629
630 return blank_addr_str;
631}
client_is_global_observer
bool client_is_global_observer(void)
Definition client_main.c:1346
client
struct civclient client
Definition client_main.c:149
client_main.h
client_player
#define client_player()
Definition client_main.h:106
get_embassy_status
const char * get_embassy_status(const struct player *me, const struct player *them)
Definition climisc.c:194
get_vision_status
const char * get_vision_status(const struct player *me, const struct player *them)
Definition climisc.c:222
climisc.h
blank_addr_str
const char blank_addr_str[]
Definition connection.c:55
connection.h
conn_list_iterate
#define conn_list_iterate(connlist, pconn)
Definition connection.h:113
conn_list_iterate_end
#define conn_list_iterate_end
Definition connection.h:115
fcintl.h
Q_
#define Q_(String)
Definition fcintl.h:70
_
#define _(String)
Definition fcintl.h:67
N_
#define N_(String)
Definition fcintl.h:69
game
struct civ_game game
Definition game.c:57
is_player_phase
bool is_player_phase(const struct player *pplayer, int phase)
Definition game.c:687
game.h
government_name_for_player
const char * government_name_for_player(const struct player *pplayer)
Definition government.c:153
government.h
title
const char * title
Definition repodlgs.c:1313
COL_TEXT
@ COL_TEXT
Definition unitselect.c:50
log.h
nation_adjective_for_player
const char * nation_adjective_for_player(const struct player *pplayer)
Definition nation.c:168
server_optset
const struct option_set * server_optset
Definition options.c:4009
option_bool_get
bool option_bool_get(const struct option *poption)
Definition options.c:772
optset_option_by_name
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
Definition options.c:406
options.h
player_number
int player_number(const struct player *pplayer)
Definition player.c:828
player_name
const char * player_name(const struct player *pplayer)
Definition player.c:886
team_has_embassy
bool team_has_embassy(const struct team *pteam, const struct player *tgt_player)
Definition player.c:214
player_index
int player_index(const struct player *pplayer)
Definition player.c:820
player_diplstate_get
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Definition player.c:317
love_text
const char * love_text(const int love)
Definition player.c:1330
MAX_AI_LOVE
#define MAX_AI_LOVE
Definition player.h:559
is_ai
#define is_ai(plr)
Definition player.h:234
is_human
#define is_human(plr)
Definition player.h:233
col_username
static const char * col_username(const struct player *player)
Definition plrdlg_common.c:63
cmp_name
static int cmp_name(const struct player *pplayer1, const struct player *pplayer2)
Definition plrdlg_common.c:54
col_gold
static const char * col_gold(const struct player *pplayer)
Definition plrdlg_common.c:403
player_dlg_default_sort_column
int player_dlg_default_sort_column(void)
Definition plrdlg_common.c:596
get_culture_info
static const char * get_culture_info(const struct player *them)
Definition plrdlg_common.c:340
col_ai
static bool col_ai(const struct player *plr)
Definition plrdlg_common.c:87
cmp_culture
static int cmp_culture(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:331
cmp_diplstate
static int cmp_diplstate(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:170
col_nation
static const char * col_nation(const struct player *player)
Definition plrdlg_common.c:71
get_science_info
static const char * get_science_info(const struct player *them)
Definition plrdlg_common.c:461
cmp_score
static int cmp_score(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:300
cmp_tax
static int cmp_tax(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:412
col_vision
static const char * col_vision(const struct player *player)
Definition plrdlg_common.c:219
col_embassy
static const char * col_embassy(const struct player *player)
Definition plrdlg_common.c:99
init_player_dlg_common
void init_player_dlg_common(void)
Definition plrdlg_common.c:604
plrdlg_col_state
const char * plrdlg_col_state(const struct player *plr)
Definition plrdlg_common.c:229
diplstate_value
static int diplstate_value(const struct player *plr)
Definition plrdlg_common.c:134
col_name
static const char * col_name(const struct player *player)
Definition plrdlg_common.c:46
col_team
static const char * col_team(const struct player *player)
Definition plrdlg_common.c:79
col_love
static const char * col_love(const struct player *player)
Definition plrdlg_common.c:179
cmp_luxury
static int cmp_luxury(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:492
get_luxury_info
static const char * get_luxury_info(const struct player *them)
Definition plrdlg_common.c:501
player_dlg_columns
struct player_dlg_column player_dlg_columns[]
Definition plrdlg_common.c:564
col_science
static const char * col_science(const struct player *pplayer)
Definition plrdlg_common.c:483
col_government
static const char * col_government(const struct player *them)
Definition plrdlg_common.c:309
col_idle
static const char * col_idle(const struct player *plr)
Definition plrdlg_common.c:283
cmp_gold
static int cmp_gold(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:371
col_diplstate
static const char * col_diplstate(const struct player *player)
Definition plrdlg_common.c:108
cmp_science
static int cmp_science(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:452
get_researching_info
static const char * get_researching_info(const struct player *them)
Definition plrdlg_common.c:531
get_gold_info
static const char * get_gold_info(const struct player *them)
Definition plrdlg_common.c:380
player_addr_hack
const char * player_addr_hack(const struct player *pplayer)
Definition plrdlg_common.c:622
col_luxury
static const char * col_luxury(const struct player *pplayer)
Definition plrdlg_common.c:523
col_host
static const char * col_host(const struct player *player)
Definition plrdlg_common.c:275
get_tax_info
static const char * get_tax_info(const struct player *them)
Definition plrdlg_common.c:421
col_research
static const char * col_research(const struct player *pplayer)
Definition plrdlg_common.c:556
cmp_love
static int cmp_love(const struct player *player1, const struct player *player2)
Definition plrdlg_common.c:192
col_tax
static const char * col_tax(const struct player *pplayer)
Definition plrdlg_common.c:443
num_player_dlg_columns
const int num_player_dlg_columns
Definition plrdlg_common.c:591
col_culture
static const char * col_culture(const struct player *pplayer)
Definition plrdlg_common.c:362
plrdlg_common.h
COL_BOOLEAN
@ COL_BOOLEAN
Definition plrdlg_common.h:31
COL_FLAG
@ COL_FLAG
Definition plrdlg_common.h:29
COL_RIGHT_TEXT
@ COL_RIGHT_TEXT
Definition plrdlg_common.h:33
COL_COLOR
@ COL_COLOR
Definition plrdlg_common.h:30
plrdlg_g.h
research_advance_name_translation
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
Definition research.c:271
research_get
struct research * research_get(const struct player *pplayer)
Definition research.c:126
research.h
ARRAY_SIZE
#define ARRAY_SIZE(x)
Definition shared.h:85
civ_game::info
struct packet_game_info info
Definition game.h:89
civclient::conn
struct connection conn
Definition client_main.h:96
connection::playing
struct player * playing
Definition connection.h:156
option
Definition options.c:454
packet_game_info::phase
int phase
Definition packets_gen.h:206
player_ai::love
int love[MAX_NUM_PLAYER_SLOTS]
Definition player.h:130
player_diplstate
Definition player.h:200
player_diplstate::turns_left
char turns_left
Definition player.h:204
player_diplstate::type
enum diplstate_type type
Definition player.h:201
player_dlg_column
Definition plrdlg_common.h:39
player_dlg_column::title
const char * title
Definition plrdlg_common.h:42
player_economic::luxury
int luxury
Definition player.h:73
player_economic::science
int science
Definition player.h:72
player_economic::tax
int tax
Definition player.h:71
player_economic::gold
int gold
Definition player.h:70
player_score::game
int game
Definition player.h:116
player
Definition player.h:249
player::ai_common
struct player_ai ai_common
Definition player.h:288
player::username
char username[MAX_LEN_NAME]
Definition player.h:252
player::is_connected
bool is_connected
Definition player.h:296
player::client
struct player::@69::@72 client
player::nturns_idle
int nturns_idle
Definition player.h:265
player::team
struct team * team
Definition player.h:261
player::connections
struct conn_list * connections
Definition player.h:298
player::is_alive
bool is_alive
Definition player.h:268
player::economic
struct player_economic economic
Definition player.h:284
player::culture
int culture
Definition player.h:367
player::score
struct player_score score
Definition player.h:283
player::phase_done
bool phase_done
Definition player.h:263
research
Definition research.h:39
research::researching
Tech_type_id researching
Definition research.h:52
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:969
fc_stricoll
int fc_stricoll(const char *str0, const char *str1)
Definition support.c:486
support.h
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
team_name_translation
const char * team_name_translation(const struct team *pteam)
Definition team.c:420
get_ping_time_text
const char * get_ping_time_text(const struct player *pplayer)
Definition text.c:1654
get_score_text
const char * get_score_text(const struct player *pplayer)
Definition text.c:1683
text.h