Freeciv-3.2
Loading...
Searching...
No Matches
helpdata.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__HELPDATA_H
14#define FC__HELPDATA_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20#include <stddef.h> /* size_t */
21
22/* client */
23#include "helpdlg_g.h" /* enum help_page_type */
24
25struct help_item {
26 char *topic, *text;
28};
29
30void helpdata_init(void);
31void helpdata_done(void);
32
33void boot_help_texts(void);
34void free_help_texts(void);
35
36int num_help_items(void);
37const struct help_item *get_help_item(int pos);
38const struct help_item *get_help_item_spec(const char *name,
40 int *pos);
41void help_iter_start(void);
42const struct help_item *help_iter_next(void);
43
44char *helptext_building(char *buf, size_t bufsz, struct player *pplayer,
45 const char *user_text, const struct impr_type *pimprove);
46char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
47 const char *user_text, const struct unit_type *utype,
48 bool class_help);
49void helptext_unitclass(struct unit_class *pclass, char *buf, size_t bufsz);
50void helptext_advance(char *buf, size_t bufsz, struct player *pplayer,
51 const char *user_text, int i);
52void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer,
53 const char *user_text, struct terrain *pterrain);
54void helptext_extra(char *buf, size_t bufsz, struct player *pplayer,
55 const char *user_text, struct extra_type *pextra);
56void helptext_goods(char *buf, size_t bufsz, struct player *pplayer,
57 const char *user_text, struct goods_type *pgood);
58void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer,
59 const char *user_text, struct specialist *pspec);
60void helptext_government(char *buf, size_t bufsz, struct player *pplayer,
61 const char *user_text, struct government *gov);
62void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation,
63 const char *user_text);
64
66const char *helptext_road_bonus_str(const struct terrain *pterrain,
67 const struct road_type *proad);
68const char *helptext_extra_for_terrain_str(struct extra_type *pextra,
69 struct terrain *pterrain,
70 enum unit_activity act);
71
72#define help_items_iterate(pitem) { \
73 const struct help_item *pitem; \
74 help_iter_start(); \
75 while ((pitem = help_iter_next())) {
76#define help_items_iterate_end }}
77
79
80#ifdef __cplusplus
81}
82#endif /* __cplusplus */
83
84#endif /* FC__HELPDATA_H */
char * incite_cost
Definition comments.c:75
static struct tile * pos
Definition finddlg.c:53
static const int bufsz
Definition helpdlg.c:70
void help_iter_start(void)
Definition helpdata.c:1340
void free_help_texts(void)
Definition helpdata.c:125
void boot_help_texts(void)
Definition helpdata.c:710
void helptext_government(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct government *gov)
Definition helpdata.c:4340
void helptext_advance(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, int i)
Definition helpdata.c:3299
char * helptext_unit_upkeep_str(const struct unit_type *punittype)
Definition helpdata.c:5002
enum help_page_type help_type_by_requirement(const struct requirement *req)
Definition helpdata.c:5205
char * helptext_unit(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct unit_type *utype, bool class_help)
Definition helpdata.c:1932
void helptext_extra(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct extra_type *pextra)
Definition helpdata.c:3794
void helptext_unitclass(struct unit_class *pclass, char *buf, size_t bufsz)
Definition helpdata.c:1866
void helpdata_init(void)
Definition helpdata.c:95
const struct help_item * get_help_item(int pos)
Definition helpdata.c:1265
int num_help_items(void)
Definition helpdata.c:1254
void helptext_goods(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct goods_type *pgood)
Definition helpdata.c:4259
const char * helptext_road_bonus_str(const struct terrain *pterrain, const struct road_type *proad)
Definition helpdata.c:3630
const char * helptext_extra_for_terrain_str(struct extra_type *pextra, struct terrain *pterrain, enum unit_activity act)
Definition helpdata.c:3760
void helpdata_done(void)
Definition helpdata.c:103
void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct specialist *pspec)
Definition helpdata.c:4305
const struct help_item * get_help_item_spec(const char *name, enum help_page_type htype, int *pos)
Definition helpdata.c:1288
const struct help_item * help_iter_next(void)
Definition helpdata.c:1350
char * helptext_building(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct impr_type *pimprove)
Definition helpdata.c:1381
void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct terrain *pterrain)
Definition helpdata.c:3520
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
Definition helpdata.c:5039
help_page_type
Definition helpdlg_g.h:20
const char * name
Definition inputfile.c:127
char * topic
Definition helpdata.h:26
enum help_page_type type
Definition helpdata.h:27
char * text
Definition helpdata.h:26