Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/helpdata.h Source File

Freeciv-3.1

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
25 struct help_item {
26 char *topic, *text;
27 enum help_page_type type;
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,
39 enum help_page_type htype,
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);
48void helptext_advance(char *buf, size_t bufsz, struct player *pplayer,
49 const char *user_text, int i);
50void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer,
51 const char *user_text, struct terrain *pterrain);
52void helptext_extra(char *buf, size_t bufsz, struct player *pplayer,
53 const char *user_text, struct extra_type *pextra);
54void helptext_goods(char *buf, size_t bufsz, struct player *pplayer,
55 const char *user_text, struct goods_type *pgood);
56void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer,
57 const char *user_text, struct specialist *pspec);
58void helptext_government(char *buf, size_t bufsz, struct player *pplayer,
59 const char *user_text, struct government *gov);
60void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation,
61 const char *user_text);
62
63char *helptext_unit_upkeep_str(const struct unit_type *punittype);
64const char *helptext_road_bonus_str(const struct terrain *pterrain,
65 const struct road_type *proad);
66const char *helptext_extra_for_terrain_str(struct extra_type *pextra,
67 struct terrain *pterrain,
68 enum unit_activity act);
69
70#define help_items_iterate(pitem) { \
71 const struct help_item *pitem; \
72 help_iter_start(); \
73 while ((pitem = help_iter_next())) {
74#define help_items_iterate_end }}
75
76enum help_page_type help_type_by_requirement(const struct requirement *req);
77
78#ifdef __cplusplus
79}
80#endif /* __cplusplus */
81
82#endif /* FC__HELPDATA_H */
pos
static struct tile * pos
Definition finddlg.c:53
bufsz
static const int bufsz
Definition helpdlg.c:70
help_iter_start
void help_iter_start(void)
Definition helpdata.c:1275
free_help_texts
void free_help_texts(void)
Definition helpdata.c:117
boot_help_texts
void boot_help_texts(void)
Definition helpdata.c:741
helptext_government
void helptext_government(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct government *gov)
Definition helpdata.c:4175
helptext_advance
void helptext_advance(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, int i)
Definition helpdata.c:3115
helptext_unit_upkeep_str
char * helptext_unit_upkeep_str(const struct unit_type *punittype)
Definition helpdata.c:4834
help_type_by_requirement
enum help_page_type help_type_by_requirement(const struct requirement *req)
Definition helpdata.c:5037
helptext_extra
void helptext_extra(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct extra_type *pextra)
Definition helpdata.c:3619
helpdata_init
void helpdata_init(void)
Definition helpdata.c:87
get_help_item
const struct help_item * get_help_item(int pos)
Definition helpdata.c:1200
num_help_items
int num_help_items(void)
Definition helpdata.c:1189
helptext_goods
void helptext_goods(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct goods_type *pgood)
Definition helpdata.c:4094
helptext_road_bonus_str
const char * helptext_road_bonus_str(const struct terrain *pterrain, const struct road_type *proad)
Definition helpdata.c:3455
helptext_extra_for_terrain_str
const char * helptext_extra_for_terrain_str(struct extra_type *pextra, struct terrain *pterrain, enum unit_activity act)
Definition helpdata.c:3585
helpdata_done
void helpdata_done(void)
Definition helpdata.c:95
helptext_specialist
void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct specialist *pspec)
Definition helpdata.c:4140
get_help_item_spec
const struct help_item * get_help_item_spec(const char *name, enum help_page_type htype, int *pos)
Definition helpdata.c:1223
help_iter_next
const struct help_item * help_iter_next(void)
Definition helpdata.c:1285
helptext_building
char * helptext_building(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct impr_type *pimprove)
Definition helpdata.c:1316
helptext_terrain
void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct terrain *pterrain)
Definition helpdata.c:3338
helptext_unit
char * helptext_unit(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct unit_type *utype)
Definition helpdata.c:1763
helptext_nation
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
Definition helpdata.c:4871
helpdlg_g.h
help_page_type
help_page_type
Definition helpdlg_g.h:20
name
const char * name
Definition inputfile.c:127
extra_type
Definition extras.h:85
goods_type
Definition traderoutes.h:180
government
Definition government.h:52
help_item
Definition helpdata.h:25
help_item::topic
char * topic
Definition helpdata.h:26
help_item::type
enum help_page_type type
Definition helpdata.h:27
help_item::text
char * text
Definition helpdata.h:26
impr_type
Definition improvement.h:68
nation_type
Definition nation.h:97
player
Definition player.h:249
requirement
Definition requirements.h:80
road_type
Definition road.h:75
specialist
Definition specialist.h:29
terrain
Definition terrain.h:176
unit_type
Definition unittype.h:481