Stop sharing requirement_unit_state_ereq().
[freeciv.git] / common / style.h
blobd5e2403e238e0f84198346be5f16df86ea7d12ea
1 /***********************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
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 ***********************************************************************/
14 #ifndef FC__STYLE_H
15 #define FC__STYLE_H
17 #ifdef __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
21 struct nation_style
23 int id;
24 struct name_translation name;
25 bool disabled;
28 struct music_style
30 int id;
31 char music_peaceful[MAX_LEN_NAME];
32 char music_combat[MAX_LEN_NAME];
33 struct requirement_vector reqs;
36 void styles_alloc(int count);
37 void styles_free(void);
38 int style_count(void);
39 int style_number(const struct nation_style *pstyle);
40 int style_index(const struct nation_style *pstyle);
41 struct nation_style *style_by_number(int id);
42 const char *style_name_translation(const struct nation_style *pstyle);
43 const char *style_rule_name(const struct nation_style *pstyle);
44 struct nation_style *style_by_rule_name(const char *name);
46 #define styles_iterate(_p) \
47 { \
48 int _i_; \
49 for (_i_ = 0; _i_ < game.control.num_styles; _i_++) { \
50 struct nation_style *_p = style_by_number(_i_);
52 #define styles_iterate_end \
53 } \
56 #define styles_active_iterate(_p) \
57 styles_iterate(_p) { \
58 if (!_p->disabled) {
60 #define styles_active_iterate_end \
61 } \
62 } styles_iterate_end;
64 void music_styles_alloc(int count);
65 void music_styles_free(void);
67 int music_style_number(const struct music_style *pms);
68 struct music_style *music_style_by_number(int id);
70 struct music_style *player_music_style(struct player *plr);
72 #define music_styles_iterate(_p) \
73 { \
74 int _i_; \
75 for (_i_ = 0; _i_ < game.control.num_music_styles; _i_++) { \
76 struct music_style *_p = music_style_by_number(_i_); \
77 if (_p != NULL) {
79 #define music_styles_iterate_end \
80 } \
81 } \
84 int style_of_city(const struct city *pcity);
86 int basic_city_style_for_style(struct nation_style *pstyle);
88 int city_style(struct city *pcity);
90 #ifdef __cplusplus
92 #endif /* __cplusplus */
94 #endif /* FC__STYLE_H */