Freeciv-3.2
|
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fcintl.h"
#include "log.h"
#include "support.h"
#include "city.h"
#include "culture.h"
#include "game.h"
#include "map.h"
#include "nation.h"
#include "specialist.h"
#include "unitlist.h"
#include "cma_fec.h"
#include "citydlg_common.h"
#include "options.h"
#include "cityrepdata.h"
#include "specvec.h"
Go to the source code of this file.
Data Structures | |
struct | datum |
Macros | |
#define | FUNC_TAG(var) cr_entry_##var, #var |
#define | SPECVEC_TAG datum |
Variables | |
static const struct city_report_spec | base_city_report_specs [] |
struct city_report_spec * | city_report_specs |
static int | num_creport_cols |
Definition at line 970 of file cityrepdata.c.
Same as can_city_sell_building(), but with universal argument.
Definition at line 1150 of file cityrepdata.c.
Referenced by city_widget::display_list_menu(), recreate_sell_menu(), and recreate_sell_menu().
Simple wrapper for city_report_specs.show
Definition at line 858 of file cityrepdata.c.
Referenced by options_dialogs_set(), and options_dialogs_update().
Simple wrapper for city_report_specs.tagname
Definition at line 866 of file cityrepdata.c.
Referenced by options_dialogs_set(), and options_dialogs_update().
The real function: split the two strings, and compare them.
Definition at line 1123 of file cityrepdata.c.
Referenced by cityrep_sort_func(), and city_sort_model::lessThan().
Returns number of angry citizens written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 234 of file cityrepdata.c.
Returns string with best attack values of units in city. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 278 of file cityrepdata.c.
Returns cost of buying current production and turns to completion written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 630 of file cityrepdata.c.
Returns number of build slots written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 581 of file cityrepdata.c.
Returns name of current production. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 596 of file cityrepdata.c.
cr_entry = return an entry (one column for one city) for the city report These return ptrs to filled in static strings. Note the returned string may not be exactly the right length; that is handled later.
Definition at line 53 of file cityrepdata.c.
Returns city cma description. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 728 of file cityrepdata.c.
Returns number of content citizens written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 203 of file cityrepdata.c.
Returns number of continent
Definition at line 713 of file cityrepdata.c.
Returns corruption amount written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 665 of file cityrepdata.c.
Returns city total culture written to string
Definition at line 153 of file cityrepdata.c.
Returns string with best defend values of units in city. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 316 of file cityrepdata.c.
Returns food surplus written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 404 of file cityrepdata.c.
Returns gold surplus written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 466 of file cityrepdata.c.
Returns number of turns before city grows written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 515 of file cityrepdata.c.
Returns number of happy citizens written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 140 of file cityrepdata.c.
Returns city history culture value written to string
Definition at line 165 of file cityrepdata.c.
Returns concise city happiness state written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 89 of file cityrepdata.c.
Returns verbose city happiness state written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 105 of file cityrepdata.c.
Returns luxury output written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 485 of file cityrepdata.c.
Translated name of nation who owns this city.
Definition at line 65 of file cityrepdata.c.
Returns string describing resource output. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 449 of file cityrepdata.c.
Returns city performance culture value written to string
Definition at line 183 of file cityrepdata.c.
Returns risk percentage of plague written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 695 of file cityrepdata.c.
Returns pollution output written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 541 of file cityrepdata.c.
Returns number of present units written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 370 of file cityrepdata.c.
Returns production surplus written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 419 of file cityrepdata.c.
Returns string listing amounts of resources. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 386 of file cityrepdata.c.
Returns science output written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 500 of file cityrepdata.c.
Returns city size written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 75 of file cityrepdata.c.
Returns number of specialists of type given as data written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 261 of file cityrepdata.c.
Referenced by init_city_report_game_data().
Returns list of specialists written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 250 of file cityrepdata.c.
Referenced by init_city_report_game_data().
Returns number of supported units written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 354 of file cityrepdata.c.
Returns number and output of trade routes written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 556 of file cityrepdata.c.
Returns trade surplus written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 434 of file cityrepdata.c.
Returns number of unhappy citizens written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 218 of file cityrepdata.c.
Returns waste amount written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 680 of file cityrepdata.c.
Returns number of citizens of each happiness state written to string. Returned string is statically allocated and its contents change when this function is called again.
Definition at line 122 of file cityrepdata.c.
|
static |
Compare two strings of data lexicographically.
Definition at line 1042 of file cityrepdata.c.
Referenced by cityrepfield_compare().
Compare two data items as described above:
Definition at line 1014 of file cityrepdata.c.
Referenced by data_compare().
|
static |
Free every datum in the vector.
Definition at line 1110 of file cityrepdata.c.
Referenced by cityrepfield_compare().
Free the data associated with a datum – that is, free the string if it was allocated.
Definition at line 1001 of file cityrepdata.c.
Referenced by free_data().
Initialize city report data. This deals with ruleset-dependent columns and pre-translates the fields (to make things easier on the GUI writers). Should be called before the GUI starts up.
Definition at line 876 of file cityrepdata.c.
Referenced by set_client_state().
Init a datum from a number (a float because we happen to use strtof).
Definition at line 991 of file cityrepdata.c.
Referenced by split_string().
Init a datum from a substring.
Definition at line 976 of file cityrepdata.c.
Referenced by split_string().
Simple wrapper for num_creport_cols()
Definition at line 850 of file cityrepdata.c.
Referenced by options_dialogs_set(), and options_dialogs_update().
Split a string into a vector of datum.
Definition at line 1065 of file cityrepdata.c.
Referenced by cityrepfield_compare().
|
static |
Definition at line 743 of file cityrepdata.c.
Referenced by init_city_report_game_data().
struct city_report_spec* city_report_specs |
Definition at line 844 of file cityrepdata.c.
Referenced by city_model_set(), city_report_spec_show_ptr(), city_report_spec_tagname(), create_city_report_dialog(), create_display_menu(), create_display_menu_item(), city_item::data(), city_widget::display_header_menu(), get_city_table_header(), city_model::headerData(), city_model::hide_data(), init_city_report_game_data(), city_model::menu_data(), city_item_delegate::paint(), toggle_view(), and update_view_menu().
|
static |
Definition at line 845 of file cityrepdata.c.
Referenced by init_city_report_game_data(), and num_city_report_spec().