Rulesave saves trade.type and trade.bonus correctly.
[freeciv.git] / client / helpdata.h
blobefdb8256a423ebc701dd75968e829dfeba49deeb
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.
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__HELPDATA_H
14 #define FC__HELPDATA_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 #include <stddef.h> /* size_t */
22 #include "improvement.h" /* Impr_type_id */
24 #include "helpdlg_g.h" /* enum help_page_type */
26 struct help_item {
27 char *topic, *text;
28 enum help_page_type type;
31 void helpdata_init(void);
32 void helpdata_done(void);
34 void boot_help_texts(void);
35 void free_help_texts(void);
37 int num_help_items(void);
38 const struct help_item *get_help_item(int pos);
39 const struct help_item *get_help_item_spec(const char *name,
40 enum help_page_type htype,
41 int *pos);
42 void help_iter_start(void);
43 const struct help_item *help_iter_next(void);
45 char *helptext_building(char *buf, size_t bufsz, struct player *pplayer,
46 const char *user_text, struct impr_type *pimprove);
47 char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
48 const char *user_text, struct unit_type *utype);
49 void helptext_advance(char *buf, size_t bufsz, struct player *pplayer,
50 const char *user_text, int i);
51 void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer,
52 const char *user_text, struct terrain *pterrain);
53 void helptext_extra(char *buf, size_t bufsz, struct player *pplayer,
54 const char *user_text, struct extra_type *pextra);
55 void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer,
56 const char *user_text, struct specialist *pspec);
57 void helptext_government(char *buf, size_t bufsz, struct player *pplayer,
58 const char *user_text, struct government *gov);
59 void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation,
60 const char *user_text);
62 char *helptext_unit_upkeep_str(struct unit_type *punittype);
63 const char *helptext_road_bonus_str(const struct terrain *pterrain,
64 const struct road_type *proad);
66 #define help_items_iterate(pitem) { \
67 const struct help_item *pitem; \
68 help_iter_start(); \
69 while((pitem=help_iter_next())) {
70 #define help_items_iterate_end }}
72 #ifdef __cplusplus
74 #endif /* __cplusplus */
76 #endif /* FC__HELPDATA_H */