Freeciv-3.2
|
#include <stdio.h>
#include <string.h>
#include "bitvector.h"
#include "fciconv.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "rand.h"
#include "support.h"
#include "achievements.h"
#include "calendar.h"
#include "connection.h"
#include "events.h"
#include "game.h"
#include "government.h"
#include "nation.h"
#include "packets.h"
#include "player.h"
#include "research.h"
#include "specialist.h"
#include "unitlist.h"
#include "version.h"
#include "citytools.h"
#include "plrhand.h"
#include "score.h"
#include "srv_main.h"
#include "report.h"
Go to the source code of this file.
Data Structures | |
struct | plrdata_slot |
struct | logging_civ_score |
struct | player_score_entry |
struct | city_score_entry |
struct | dem_row |
struct | dem_col |
Macros | |
#define | HISTORIAN_FIRST HISTORIAN_RICHEST |
#define | HISTORIAN_LAST HISTORIAN_LARGEST |
#define | MAX_SCORELOG_LINE_LEN (119 + 1) |
#define | GOOD_PLAYER(p) ((p)->is_alive && !is_barbarian(p)) |
Enumerations | |
enum | historian_type { HISTORIAN_RICHEST = 0 , HISTORIAN_ADVANCED = 1 , HISTORIAN_MILITARY = 2 , HISTORIAN_HAPPIEST = 3 , HISTORIAN_LARGEST = 4 } |
enum | dem_flag { DEM_COL_QUANTITY , DEM_COL_RANK , DEM_COL_BEST , DEM_COL_LAST } |
Variables | |
struct history_report | latest_history_report = { -2 } |
static struct logging_civ_score * | score_log = NULL |
static const char * | historian_message [] |
static const char * | historian_name [] |
static const char | scorelog_magic [] = "#FREECIV SCORELOG2 " |
static struct dem_row | rowtable [] |
static struct dem_col | coltable [] = {{'q'}, {'r'}, {'b'}} |
static const char * | ranking [] |
#define GOOD_PLAYER | ( | p | ) | ((p)->is_alive && !is_barbarian(p)) |
#define HISTORIAN_FIRST HISTORIAN_RICHEST |
#define HISTORIAN_LAST HISTORIAN_LARGEST |
BV_DEFINE | ( | bv_cols | , |
DEM_COL_LAST | |||
) |
|
static |
Construct one demographics line.
Definition at line 1014 of file report.c.
Referenced by report_demographics().
Number of cities
Definition at line 682 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of content citizens
Definition at line 855 of file report.c.
Referenced by log_civ_score_now().
Culture score
Definition at line 915 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
BNP of player
Definition at line 658 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of happy citizens
Definition at line 847 of file report.c.
Referenced by log_civ_score_now().
Land area controlled by player
Definition at line 626 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Literacy score calculated one way. See also get_literacy() to see alternative way.
Definition at line 751 of file report.c.
Referenced by log_civ_score_now().
Military service length
Definition at line 674 of file report.c.
Referenced by report_final_scores().
Number of military units
Definition at line 698 of file report.c.
Referenced by log_civ_score_now().
Number of citizen units of player
Definition at line 610 of file report.c.
Referenced by get_real_pop(), and log_civ_score_now().
Production of player
Definition at line 650 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of citizens of player
Definition at line 618 of file report.c.
Referenced by report_final_scores().
Number of rioting cities
Definition at line 831 of file report.c.
Referenced by log_civ_score_now().
Area settled.
Definition at line 634 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of city building units.
Definition at line 715 of file report.c.
Referenced by log_civ_score_now().
Spaceship score
Definition at line 759 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of techs
Definition at line 690 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of unhappy citizens
Definition at line 863 of file report.c.
Referenced by log_civ_score_now().
Number of units built
Definition at line 767 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of units killed
Definition at line 775 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of units lost
Definition at line 783 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Number of units used
Definition at line 791 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
Wonder score
Definition at line 734 of file report.c.
Referenced by log_civ_score_now(), and report_final_scores().
|
static |
Construct Historian Report
Definition at line 242 of file report.c.
Referenced by make_history_report().
struct history_report * history_report_get | ( | void | ) |
Return current history report
Definition at line 1824 of file report.c.
Referenced by sg_load_history(), sg_load_history(), and sg_save_history().
Verify that a given demography string is valid. See game.demography. If the string is not valid the index of the first invalid character is return as 'error'.
Other settings callback functions are in settings.c, but this one uses static values from this file so it's done separately.
Definition at line 1078 of file report.c.
Referenced by demography_callback().
Free resources allocated for score logging system
Definition at line 1434 of file report.c.
Referenced by log_civ_score_now(), scorelog_action(), and server_game_free().
Initialize score logging system
Definition at line 1411 of file report.c.
Referenced by scorelog_action().
Create a log file of the civilizations so you can see what was happening.
Definition at line 1464 of file report.c.
Referenced by begin_turn(), and srv_scores().
Produce random history report if it's time for one.
Definition at line 1667 of file report.c.
Referenced by end_turn().
Returns the number of wonders the given city has.
Definition at line 315 of file report.c.
Referenced by report_top_cities().
|
static |
This function pops up a non-modal message dialog on the player's desktop
Definition at line 1769 of file report.c.
Referenced by report_achievements(), report_demographics(), report_top_cities(), report_wonders_of_the_world(), and report_wonders_of_the_world_long().
|
static |
This function pops up a non-modal message dialog on the player's desktop
event == E_REPORT: message should not be ignored by clients watching AI players with ai_popup_windows off. Example: Server Options, Demographics Report, etc.
event == E_BROADCAST_REPORT: message can safely be ignored by clients watching AI players with ai_popup_windows off. For example: Herodot's report... and similar messages.
Definition at line 1786 of file report.c.
Referenced by page_conn(), and send_current_history_report().
|
static |
Free resources allocated for plrdata slot.
Definition at line 1242 of file report.c.
Referenced by log_civ_score_now(), and scan_score_log().
Allocate and initialize plrdata slot.
Definition at line 1219 of file report.c.
Referenced by log_civ_score_now(), and scan_score_log().
Replace plrdata slot with new one named according to input parameter.
Definition at line 1231 of file report.c.
Referenced by log_civ_score_now(), and plrdata_slot_init().
void report_achievements | ( | struct connection * | pconn | ) |
void report_demographics | ( | struct connection * | pconn | ) |
Send demographics report; what gets reported depends on value of demographics server option.
Definition at line 1125 of file report.c.
Referenced by handle_report_req().
Inform clients about player scores and statistics when the game ends. Called only from server/srv_main.c srv_scores()
Definition at line 1689 of file report.c.
Referenced by connection_attach_real(), and srv_scores().
Send report listing the "best" cities in the world.
Definition at line 331 of file report.c.
Referenced by handle_report_req().
Send report listing all built and destroyed wonders, and wonders currently being built.
Definition at line 525 of file report.c.
Referenced by handle_report_req().
Send report listing all built and destroyed wonders, and wonders currently being built.
Definition at line 414 of file report.c.
Referenced by handle_report_req().
Reads the whole file denoted by fp. Sets last_turn and id to the values contained in the file. Returns the player_names indexed by player_no at the end of the log file.
Returns TRUE iff the file had read successfully.
Definition at line 1257 of file report.c.
Referenced by log_civ_score_now().
Compare two player score entries. Used as callback for qsort.
Definition at line 233 of file report.c.
Referenced by historian_generic(), report_final_scores(), and report_top_cities().
Send history report of this turn.
Definition at line 302 of file report.c.
Referenced by establish_new_connection(), and make_history_report().
Construct string containing value and its unit.
Definition at line 923 of file report.c.
Referenced by area_to_text(), culture_to_text(), economics_to_text(), mil_service_to_text(), percent_to_text(), pollution_to_text(), production_to_text(), and science_to_text().
Referenced by is_valid_demography(), and report_demographics().
Definition at line 93 of file report.c.
Referenced by historian_generic().
struct history_report latest_history_report = { -2 } |
Definition at line 67 of file report.c.
Referenced by history_report_get(), log_civ_score_init(), make_history_report(), and send_current_history_report().
Definition at line 197 of file report.c.
Referenced by historian_generic().
Referenced by is_valid_demography(), and report_demographics().
|
static |
Definition at line 69 of file report.c.
Referenced by log_civ_score_free(), log_civ_score_init(), log_civ_score_now(), and scan_score_log().
Definition at line 128 of file report.c.
Referenced by log_civ_score_now(), and scan_score_log().