Freeciv-3.3
|
#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 971 of file cityrepdata.c.
Same as can_city_sell_building(), but with universal argument.
Definition at line 1151 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 859 of file cityrepdata.c.
Referenced by options_dialogs_set(), and options_dialogs_update().
Simple wrapper for city_report_specs.tagname
Definition at line 867 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 1124 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 631 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 729 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 714 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 666 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 696 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 681 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 1043 of file cityrepdata.c.
Referenced by cityrepfield_compare().
Compare two data items as described above:
Definition at line 1015 of file cityrepdata.c.
Referenced by data_compare().
|
static |
Free every datum in the vector.
Definition at line 1111 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 1002 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 877 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 992 of file cityrepdata.c.
Referenced by split_string().
Init a datum from a substring.
Definition at line 977 of file cityrepdata.c.
Referenced by split_string().
Simple wrapper for num_creport_cols()
Definition at line 851 of file cityrepdata.c.
Referenced by options_dialogs_set(), and options_dialogs_update().
Split a string into a vector of datum.
Definition at line 1066 of file cityrepdata.c.
Referenced by cityrepfield_compare().
|
static |
Definition at line 744 of file cityrepdata.c.
Referenced by init_city_report_game_data().
struct city_report_spec* city_report_specs |
Definition at line 845 of file cityrepdata.c.
Referenced by city_model_set(), city_model_set_depr(), city_report_spec_show_ptr(), city_report_spec_tagname(), city_store_set(), 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 846 of file cityrepdata.c.
Referenced by init_city_report_game_data(), and num_city_report_spec().