Freeciv-3.1
|
#include <string.h>
#include "fcintl.h"
#include "log.h"
#include "support.h"
#include "connection.h"
#include "game.h"
#include "government.h"
#include "research.h"
#include "client_main.h"
#include "climisc.h"
#include "options.h"
#include "text.h"
#include "plrdlg_g.h"
#include "plrdlg_common.h"
Go to the source code of this file.
Functions | |
static const char * | col_name (const struct player *player) |
static int | cmp_name (const struct player *pplayer1, const struct player *pplayer2) |
static const char * | col_username (const struct player *player) |
static const char * | col_nation (const struct player *player) |
static const char * | col_team (const struct player *player) |
static bool | col_ai (const struct player *plr) |
static const char * | col_embassy (const struct player *player) |
static const char * | col_diplstate (const struct player *player) |
static int | diplstate_value (const struct player *plr) |
static int | cmp_diplstate (const struct player *player1, const struct player *player2) |
static const char * | col_love (const struct player *player) |
static int | cmp_love (const struct player *player1, const struct player *player2) |
static const char * | col_vision (const struct player *player) |
const char * | plrdlg_col_state (const struct player *plr) |
static const char * | col_host (const struct player *player) |
static const char * | col_idle (const struct player *plr) |
static int | cmp_score (const struct player *player1, const struct player *player2) |
static const char * | col_government (const struct player *them) |
static int | cmp_culture (const struct player *player1, const struct player *player2) |
static const char * | get_culture_info (const struct player *them) |
static const char * | col_culture (const struct player *pplayer) |
static int | cmp_gold (const struct player *player1, const struct player *player2) |
static const char * | get_gold_info (const struct player *them) |
static const char * | col_gold (const struct player *pplayer) |
static int | cmp_tax (const struct player *player1, const struct player *player2) |
static const char * | get_tax_info (const struct player *them) |
static const char * | col_tax (const struct player *pplayer) |
static int | cmp_science (const struct player *player1, const struct player *player2) |
static const char * | get_science_info (const struct player *them) |
static const char * | col_science (const struct player *pplayer) |
static int | cmp_luxury (const struct player *player1, const struct player *player2) |
static const char * | get_luxury_info (const struct player *them) |
static const char * | col_luxury (const struct player *pplayer) |
static const char * | get_researching_info (const struct player *them) |
static const char * | col_research (const struct player *pplayer) |
int | player_dlg_default_sort_column (void) |
void | init_player_dlg_common (void) |
const char * | player_addr_hack (const struct player *pplayer) |
Variables | |
struct player_dlg_column | player_dlg_columns [] |
const int | num_player_dlg_columns = ARRAY_SIZE(player_dlg_columns) |
Compare culture of two players in players dialog, needed to sort column
Definition at line 331 of file plrdlg_common.c.
Compares diplomatic status of two players in players dialog
Definition at line 170 of file plrdlg_common.c.
Compare gold of two players in players dialog, needed to sort column
Definition at line 371 of file plrdlg_common.c.
Compares ai's attitude toward the player
Definition at line 192 of file plrdlg_common.c.
Compare luxury of two players in players dialog, needed to sort column
Definition at line 492 of file plrdlg_common.c.
Compares the names of two players in players dialog.
Definition at line 54 of file plrdlg_common.c.
Compare science of two players in players dialog, needed to sort column
Definition at line 452 of file plrdlg_common.c.
Compare score of two players in players dialog
Definition at line 300 of file plrdlg_common.c.
Compare tax of two players in players dialog, needed to sort column
Definition at line 412 of file plrdlg_common.c.
TRUE if the player is AI-controlled.
Definition at line 87 of file plrdlg_common.c.
|
static |
Player's culture value
Definition at line 362 of file plrdlg_common.c.
|
static |
Returns a translated string giving the diplomatic status ("war" or "ceasefire (5)").
Definition at line 108 of file plrdlg_common.c.
|
static |
Returns a translated string giving the embassy status (none/with us/with them/both).
Definition at line 99 of file plrdlg_common.c.
|
static |
Player's gold
Definition at line 403 of file plrdlg_common.c.
|
static |
The name of the player's government
Definition at line 309 of file plrdlg_common.c.
|
static |
Returns a string telling the player's client's hostname (the machine from which they are connecting).
Definition at line 275 of file plrdlg_common.c.
|
static |
Returns a string telling how many turns the player has been idle.
Definition at line 283 of file plrdlg_common.c.
|
static |
Return a string displaying the AI's love (or not) for you...
Definition at line 179 of file plrdlg_common.c.
|
static |
Player's luxury rate
Definition at line 523 of file plrdlg_common.c.
|
static |
The player-name (aka nation leader) column of the plrdlg.
Definition at line 46 of file plrdlg_common.c.
|
static |
The name of the player's nation for the plrdlg.
Definition at line 71 of file plrdlg_common.c.
|
static |
Player's current research target
Definition at line 556 of file plrdlg_common.c.
|
static |
Player's science rate
Definition at line 483 of file plrdlg_common.c.
|
static |
Player's tax rate
Definition at line 443 of file plrdlg_common.c.
|
static |
The name of the player's team (or empty) for the plrdlg.
Definition at line 79 of file plrdlg_common.c.
|
static |
The username (connection name) column of the plrdlg.
Definition at line 63 of file plrdlg_common.c.
|
static |
Returns a translated string giving our shared-vision status.
Definition at line 219 of file plrdlg_common.c.
|
static |
Return a numerical value suitable for ordering players by their diplomatic status in the players dialog
A lower value stands for more friendly diplomatic status.
Definition at line 134 of file plrdlg_common.c.
Referenced by cmp_diplstate().
|
static |
Show others player's culture to me if I am allowed to know it.
Definition at line 340 of file plrdlg_common.c.
Referenced by col_culture().
|
static |
Show player's gold to me if I am allowed to know it
Definition at line 380 of file plrdlg_common.c.
Referenced by col_gold().
|
static |
Show player's luxury to me if I am allowed to know it
Definition at line 501 of file plrdlg_common.c.
Referenced by col_luxury().
|
static |
Show player's research to me if I am allowed to know it
Definition at line 531 of file plrdlg_common.c.
Referenced by col_research().
|
static |
Show player's science to me if I am allowed to know it
Definition at line 461 of file plrdlg_common.c.
Referenced by col_science().
|
static |
Show player's tax to me if I am allowed to know it.
Definition at line 421 of file plrdlg_common.c.
Referenced by col_tax().
void init_player_dlg_common | ( | void | ) |
const char * player_addr_hack | ( | const struct player * | pplayer | ) |
The only place where this is used is the player dialog. Eventually this should go the way of the dodo with everything here moved into col_host above.
This code in this function is only really needed so that the host is kept as a blank address if no one is controlling a player, but there are observers.
Definition at line 622 of file plrdlg_common.c.
Referenced by col_host().
int player_dlg_default_sort_column | ( | void | ) |
Return default player dlg sorting column.
Definition at line 596 of file plrdlg_common.c.
Referenced by create_players_dialog().
const char * plrdlg_col_state | ( | const struct player * | plr | ) |
Returns a translated string giving the player's "state".
FIXME: These terms aren't very intuitive for new players.
Definition at line 229 of file plrdlg_common.c.
const int num_player_dlg_columns = ARRAY_SIZE(player_dlg_columns) |
Definition at line 591 of file plrdlg_common.c.
Referenced by plr_item::columnCount(), plr_model::columnCount(), create_players_dialog(), create_show_menu(), create_show_menu(), fill_row(), plr_model::headerData(), init_player_dlg_common(), options_dialogs_set(), options_dialogs_update(), players_dialog_store_new(), real_players_dialog_update(), and update_views().
struct player_dlg_column player_dlg_columns[] |
Definition at line 564 of file plrdlg_common.c.
Referenced by create_players_dialog(), create_plrdlg_display_menu_item(), create_show_menu(), plr_item::data(), plr_widget::display_header_menu(), fill_row(), plr_model::headerData(), plr_model::hide_data(), init_player_dlg_common(), plr_sorter::lessThan(), options_dialogs_set(), options_dialogs_update(), plr_item_delegate::paint(), players_dialog_store_new(), plrdlg_sort_func(), real_players_dialog_update(), toggle_view(), and update_views().