Prevented building advisor from randomly building, and thus potentially just moving...
[freeciv.git] / common / style.h
blob39297f67763510458393e7a5c07eb09244a825ad
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;
27 struct music_style
29 int id;
30 char music_peaceful[MAX_LEN_NAME];
31 char music_combat[MAX_LEN_NAME];
32 struct requirement_vector reqs;
35 void styles_alloc(int count);
36 void styles_free(void);
37 int style_count(void);
38 int style_number(const struct nation_style *pstyle);
39 int style_index(const struct nation_style *pstyle);
40 struct nation_style *style_by_number(int id);
41 const char *style_name_translation(const struct nation_style *pstyle);
42 const char *style_rule_name(const struct nation_style *pstyle);
43 struct nation_style *style_by_rule_name(const char *name);
45 #define styles_iterate(_p) \
46 { \
47 int _i_; \
48 for (_i_ = 0; _i_ < game.control.num_styles; _i_++) { \
49 struct nation_style *_p = style_by_number(_i_);
51 #define styles_iterate_end \
52 } \
55 void music_styles_alloc(int count);
56 void music_styles_free(void);
58 int music_style_number(const struct music_style *pms);
59 struct music_style *music_style_by_number(int id);
61 struct music_style *player_music_style(struct player *plr);
63 #define music_styles_iterate(_p) \
64 { \
65 int _i_; \
66 for (_i_ = 0; _i_ < game.control.num_music_styles; _i_++) { \
67 struct music_style *_p = music_style_by_number(_i_); \
68 if (_p != NULL) {
70 #define music_styles_iterate_end \
71 } \
72 } \
75 int style_of_city(const struct city *pcity);
77 int basic_city_style_for_style(struct nation_style *pstyle);
79 int city_style(struct city *pcity);
81 #ifdef __cplusplus
83 #endif /* __cplusplus */
85 #endif /* FC__STYLE_H */