![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "fcintl.h"#include "fc_types.h"#include "game.h"#include "name_translation.h"#include "style.h"
Include dependency graph for style.cpp:Go to the source code of this file.
Functions | |
| void | styles_alloc (int count) |
| Initialise styles structures. More... | |
| void | styles_free () |
| Free the memory associated with styles. More... | |
| int | style_number (const struct nation_style *pstyle) |
| Return the style id. More... | |
| int | style_index (const struct nation_style *pstyle) |
| Return the style index. More... | |
| struct nation_style * | style_by_number (int id) |
| Return style of given id. More... | |
| const char * | style_name_translation (const struct nation_style *pstyle) |
| Return the (translated) name of the style. More... | |
| const char * | style_rule_name (const struct nation_style *pstyle) |
| Return the (untranslated) rule name of the style. More... | |
| struct nation_style * | style_by_rule_name (const char *name) |
| Returns style matching rule name or nullptr if there is no style with such name. More... | |
| void | music_styles_alloc (int count) |
| Initialise music styles structures. More... | |
| void | music_styles_free () |
| Free the memory associated with music styles. More... | |
| int | music_style_number (const struct music_style *pms) |
| Return the music style id. More... | |
| struct music_style * | music_style_by_number (int id) |
| Return music style of given id. More... | |
| struct music_style * | player_music_style (struct player *plr) |
| Return music style for player. More... | |
| int | style_of_city (const struct city *pcity) |
| Evaluate which style should be used to draw a city. More... | |
| int | basic_city_style_for_style (struct nation_style *pstyle) |
| Return basic city style representing nation style. More... | |
| int | city_style (struct city *pcity) |
| Return citystyle of the city. More... | |
Variables | |
| static struct nation_style * | styles = nullptr |
| static struct music_style * | music_styles = nullptr |
| int basic_city_style_for_style | ( | struct nation_style * | pstyle | ) |
Return basic city style representing nation style.
Definition at line 197 of file style.cpp.
Referenced by races_dialog::races_dialog(), and sanity_check_ruleset_data().
| int city_style | ( | struct city * | pcity | ) |
Return citystyle of the city.
Definition at line 234 of file style.cpp.
Referenced by city_style_refresh(), and sg_load_player_city().
| struct music_style* music_style_by_number | ( | int | id | ) |
Return music style of given id.
Definition at line 158 of file style.cpp.
Referenced by handle_ruleset_music(), load_ruleset_styles(), and start_style_music().
| int music_style_number | ( | const struct music_style * | pms | ) |
Return the music style id.
Definition at line 148 of file style.cpp.
Referenced by package_player_common().
| void music_styles_alloc | ( | int | count | ) |
Initialise music styles structures.
Definition at line 121 of file style.cpp.
Referenced by handle_ruleset_control(), and load_ruleset_styles().
| void music_styles_free | ( | ) |
Free the memory associated with music styles.
Definition at line 136 of file style.cpp.
Referenced by game_ruleset_free().
| struct music_style* player_music_style | ( | struct player * | plr | ) |
Return music style for player.
Definition at line 172 of file style.cpp.
Referenced by package_player_common().
| struct nation_style* style_by_number | ( | int | id | ) |
Return style of given id.
Definition at line 74 of file style.cpp.
Referenced by handle_nation_select_req(), handle_player_info(), handle_ruleset_nation(), handle_ruleset_style(), load_ruleset_nations(), sg_load_player_main(), and universal_value_initial().
| struct nation_style* style_by_rule_name | ( | const char * | name | ) |
Returns style matching rule name or nullptr if there is no style with such name.
Definition at line 103 of file style.cpp.
Referenced by load_ruleset_nations(), playernation_command(), sg_load_player_main(), and universal_by_number().
| int style_index | ( | const struct nation_style * | pstyle | ) |
Return the style index.
Definition at line 64 of file style.cpp.
Referenced by load_style_names(), freeciv::layer_city::sample_sprite(), and send_ruleset_styles().
| const char* style_name_translation | ( | const struct nation_style * | pstyle | ) |
Return the (translated) name of the style.
You don't have to free the return pointer.
Definition at line 85 of file style.cpp.
Referenced by races_dialog::races_dialog(), req_text_insert(), universal_name_translation(), and worklist_item_postpone_req_vec().
| int style_number | ( | const struct nation_style * | pstyle | ) |
Return the style id.
Definition at line 54 of file style.cpp.
Referenced by races_dialog::nation_selected(), package_player_common(), races_dialog::races_dialog(), send_ruleset_nations(), and universal_number().
| int style_of_city | ( | const struct city * | pcity | ) |
| const char* style_rule_name | ( | const struct nation_style * | pstyle | ) |
Return the (untranslated) rule name of the style.
You don't have to free the return pointer.
Definition at line 94 of file style.cpp.
Referenced by sanity_check_ruleset_data(), save_nation(), sg_load_player_main(), sg_save_player_main(), style_by_rule_name(), universal_kind_values(), and universal_rule_name().
| void styles_alloc | ( | int | count | ) |
Initialise styles structures.
Definition at line 30 of file style.cpp.
Referenced by handle_ruleset_control(), and load_style_names().
| void styles_free | ( | ) |
Free the memory associated with styles.
Definition at line 45 of file style.cpp.
Referenced by game_ruleset_free().
|
static |
Definition at line 25 of file style.cpp.
Referenced by music_style_by_number(), music_styles_alloc(), and music_styles_free().
|
static |
Definition at line 23 of file style.cpp.
Referenced by style_by_number(), style_index(), styles_alloc(), and styles_free().