Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
report.h File Reference
#include "support.h"

Go to the source code of this file.

Data Structures

struct  history_report
 

Macros

#define REPORT_TITLESIZE   1024
 
#define REPORT_BODYSIZE   (128 * MAX_NUM_PLAYER_SLOTS)
 

Functions

void log_civ_score_init (void)
 
void log_civ_score_free (void)
 
void log_civ_score_now (void)
 
void make_history_report (void)
 
void send_current_history_report (struct conn_list *dest)
 
void report_wonders_of_the_world (struct conn_list *dest)
 
void report_wonders_of_the_world_long (struct conn_list *dest)
 
void report_top_cities (struct conn_list *dest)
 
bool is_valid_demography (const char *demography, int *error)
 
void report_demographics (struct connection *pconn)
 
void report_achievements (struct connection *pconn)
 
void report_final_scores (struct conn_list *dest)
 
int get_tag_score (const char *tag, const struct player *pplayer)
 
struct history_reporthistory_report_get (void)
 

Macro Definition Documentation

◆ REPORT_BODYSIZE

#define REPORT_BODYSIZE   (128 * MAX_NUM_PLAYER_SLOTS)

Definition at line 23 of file report.h.

◆ REPORT_TITLESIZE

#define REPORT_TITLESIZE   1024

Definition at line 22 of file report.h.

Function Documentation

◆ get_tag_score()

int get_tag_score ( const char tag,
const struct player pplayer 
)

Return score of the type associated to the tag

Definition at line 1867 of file report.c.

Referenced by api_methods_tag_score().

◆ history_report_get()

struct history_report * history_report_get ( void  )

Return current history report

Definition at line 1859 of file report.c.

Referenced by sg_load_history(), sg_load_history(), and sg_save_history().

◆ is_valid_demography()

bool is_valid_demography ( const char demography,
int error 
)

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 1158 of file report.c.

Referenced by demography_callback().

◆ log_civ_score_free()

void log_civ_score_free ( void  )

Free resources allocated for score logging system

Definition at line 1514 of file report.c.

Referenced by log_civ_score_now(), scorelog_action(), and server_game_free().

◆ log_civ_score_init()

void log_civ_score_init ( void  )

Initialize score logging system

Definition at line 1491 of file report.c.

Referenced by scorelog_action().

◆ log_civ_score_now()

void log_civ_score_now ( void  )

Create a log file of the civilizations so you can see what was happening.

Definition at line 1544 of file report.c.

Referenced by begin_turn(), and srv_scores().

◆ make_history_report()

void make_history_report ( void  )

Produce random history report if it's time for one.

Definition at line 1702 of file report.c.

Referenced by end_turn().

◆ report_achievements()

void report_achievements ( struct connection pconn)

Send achievements list

Definition at line 1269 of file report.c.

Referenced by handle_report_req().

◆ report_demographics()

void report_demographics ( struct connection pconn)

Send demographics report; what gets reported depends on value of demographics server option.

Definition at line 1205 of file report.c.

Referenced by handle_report_req().

◆ report_final_scores()

void report_final_scores ( struct conn_list dest)

Inform clients about player scores and statistics when the game ends. Called only from server/srv_main.c srv_scores()

Definition at line 1724 of file report.c.

Referenced by connection_attach_real(), and srv_scores().

◆ report_top_cities()

void report_top_cities ( struct conn_list dest)

Send report listing the "best" cities in the world.

Definition at line 410 of file report.c.

Referenced by handle_report_req().

◆ report_wonders_of_the_world()

void report_wonders_of_the_world ( struct conn_list dest)

Send report listing all built and destroyed wonders, and wonders currently being built.

Definition at line 604 of file report.c.

Referenced by handle_report_req().

◆ report_wonders_of_the_world_long()

void report_wonders_of_the_world_long ( struct conn_list dest)

Send report listing all built and destroyed wonders, and wonders currently being built.

Definition at line 493 of file report.c.

Referenced by handle_report_req().

◆ send_current_history_report()

void send_current_history_report ( struct conn_list dest)

Send history report of this turn.

Definition at line 381 of file report.c.

Referenced by establish_new_connection(), and make_history_report().