Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/repodlgs_common.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
repodlgs_common.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
14#ifndef FC__REPODLGS_COMMON_H
15#define FC__REPODLGS_COMMON_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21#include "fc_types.h"
22#include "improvement.h"
23#include "unittype.h"
24
25#include "citydlg_common.h" /* for city request functions */
26
27 struct improvement_entry
28{
29 struct impr_type *type;
30 int count, redundant, cost, total_cost;
31};
32
33 struct unit_entry
34{
35 struct unit_type *type;
36 int count, cost, total_cost;
37};
38
39void get_economy_report_data(struct improvement_entry *entries,
40 int *num_entries_used, int *total_cost,
41 int *total_income);
42/* This function returns an array with the gold upkeeped units.
43 * FIXME: Many clients doesn't yet use this function and show also only the
44 * buildings in the economy reports
45 * I think that there should be only one function which returns an array of
46 * char* arrays like some other common functions but that means updating all
47 * client simultaneously and I simply can't */
48void get_economy_report_units_data(struct unit_entry *entries,
49 int *num_entries_used, int *total_cost);
50
51void sell_all_improvements(const struct impr_type *pimprove, bool redundant_only,
52 char *message, size_t message_sz);
53void disband_all_units(const struct unit_type *punittype, bool in_cities_only,
54 char *message, size_t message_sz);
55
56#ifdef __cplusplus
57}
58#endif /* __cplusplus */
59
60#endif /* FC__REPODLGS_COMMON_H */
entries
struct @126::my_agent entries[MAX_AGENTS]
citydlg_common.h
incite_cost
char * incite_cost
Definition comments.c:74
fc_types.h
improvement.h
get_economy_report_units_data
void get_economy_report_units_data(struct unit_entry *entries, int *num_entries_used, int *total_cost)
Definition repodlgs_common.c:105
get_economy_report_data
void get_economy_report_data(struct improvement_entry *entries, int *num_entries_used, int *total_cost, int *total_income)
Definition repodlgs_common.c:46
sell_all_improvements
void sell_all_improvements(const struct impr_type *pimprove, bool redundant_only, char *message, size_t message_sz)
Definition repodlgs_common.c:160
disband_all_units
void disband_all_units(const struct unit_type *punittype, bool in_cities_only, char *message, size_t message_sz)
Definition repodlgs_common.c:200
impr_type
Definition improvement.h:50
improvement_entry
Definition repodlgs_common.h:28
improvement_entry::cost
int cost
Definition repodlgs_common.h:30
improvement_entry::type
struct impr_type * type
Definition repodlgs_common.h:29
improvement_entry::total_cost
int total_cost
Definition repodlgs_common.h:30
improvement_entry::count
int count
Definition repodlgs_common.h:30
improvement_entry::redundant
int redundant
Definition repodlgs_common.h:30
message
Definition messagewin_common.h:29
unit_entry
Definition repodlgs_common.h:34
unit_entry::total_cost
int total_cost
Definition repodlgs_common.h:36
unit_entry::type
struct unit_type * type
Definition repodlgs_common.h:35
unit_entry::count
int count
Definition repodlgs_common.h:36
unit_entry::cost
int cost
Definition repodlgs_common.h:36
unit_type
Definition unittype.h:500
unittype.h