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)
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
18 #endif /* __cplusplus */
20 #include <stddef.h> /* size_t */
23 #include "improvement.h" /* Impr_type_id */
25 #include "helpdlg_g.h" /* enum help_page_type */
29 enum help_page_type type
;
32 void helpdata_init(void);
33 void helpdata_done(void);
35 void boot_help_texts(void);
36 void free_help_texts(void);
38 int num_help_items(void);
39 const struct help_item
*get_help_item(int pos
);
40 const struct help_item
*get_help_item_spec(const char *name
,
41 enum help_page_type htype
,
43 void help_iter_start(void);
44 const struct help_item
*help_iter_next(void);
46 char *helptext_building(char *buf
, size_t bufsz
, struct player
*pplayer
,
47 const char *user_text
, struct impr_type
*pimprove
);
48 char *helptext_unit(char *buf
, size_t bufsz
, struct player
*pplayer
,
49 const char *user_text
, struct unit_type
*utype
);
50 void helptext_advance(char *buf
, size_t bufsz
, struct player
*pplayer
,
51 const char *user_text
, int i
);
52 void helptext_terrain(char *buf
, size_t bufsz
, struct player
*pplayer
,
53 const char *user_text
, struct terrain
*pterrain
);
54 void helptext_extra(char *buf
, size_t bufsz
, struct player
*pplayer
,
55 const char *user_text
, struct extra_type
*pextra
);
56 void helptext_goods(char *buf
, size_t bufsz
, struct player
*pplayer
,
57 const char *user_text
, struct goods_type
*pgood
);
58 void helptext_specialist(char *buf
, size_t bufsz
, struct player
*pplayer
,
59 const char *user_text
, struct specialist
*pspec
);
60 void helptext_government(char *buf
, size_t bufsz
, struct player
*pplayer
,
61 const char *user_text
, struct government
*gov
);
62 void helptext_nation(char *buf
, size_t bufsz
, struct nation_type
*pnation
,
63 const char *user_text
);
65 char *helptext_unit_upkeep_str(struct unit_type
*punittype
);
66 const char *helptext_road_bonus_str(const struct terrain
*pterrain
,
67 const struct road_type
*proad
);
69 #define help_items_iterate(pitem) { \
70 const struct help_item *pitem; \
72 while ((pitem = help_iter_next())) {
73 #define help_items_iterate_end }}
77 #endif /* __cplusplus */
79 #endif /* FC__HELPDATA_H */