Freeciv-3.3
Loading...
Searching...
No Matches
cityrepdata.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__CITYREPDATA_H
14#define FC__CITYREPDATA_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "fc_types.h"
22#include "support.h" /* bool type */
23
24/* Number of city report columns: have to set this manually now... */
25#define NUM_CREPORT_COLS (num_city_report_spec())
26
28 bool show; /* Modify this to customize */
29 int width; /* 0 means variable; rightmost only */
30 const char *title1; /* Already translated or NULL */
31 const char *title2; /* Already translated or NULL */
32 const char *explanation; /* Already translated */
33 void *data;
34 const char *(*func)(const struct city *pcity, const void *data);
35 const char *tagname; /* For save_options */
36};
37
39
40/* Use tagname rather than index for load/save, because later
41 additions won't necessarily be at the end.
42*/
43
44/* Following are wanted to save/load options; use wrappers rather
45 than expose the grotty details of the city_report_spec:
46 (well, the details are exposed now too, but still keep
47 this "clean" interface...)
48*/
49int num_city_report_spec(void);
51const char *city_report_spec_tagname(int i);
52
54
55int cityrepfield_compare(const char *field1, const char *field2);
56
57bool can_city_sell_universal(const struct city *pcity,
58 const struct universal *target);
59
60#ifdef __cplusplus
61}
62#endif /* __cplusplus */
63
64#endif /* FC__CITYREPDATA_H */
int num_city_report_spec(void)
void init_city_report_game_data(void)
bool can_city_sell_universal(const struct city *pcity, const struct universal *target)
struct city_report_spec * city_report_specs
const char * city_report_spec_tagname(int i)
int cityrepfield_compare(const char *field1, const char *field2)
bool * city_report_spec_show_ptr(int i)
char * incite_cost
Definition comments.c:76
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
Definition dialogs_g.h:78
const char * tagname
Definition cityrepdata.h:35
const char * title2
Definition cityrepdata.h:31
const char * explanation
Definition cityrepdata.h:32
const char * title1
Definition cityrepdata.h:30
Definition city.h:317