Freeciv-3.2
|
#include "mem.h"
#include "fc_types.h"
#include "game.h"
#include "name_translation.h"
#include "style.h"
Go to the source code of this file.
Functions | |
void | styles_alloc (int count) |
void | styles_free (void) |
int | style_count (void) |
int | style_number (const struct nation_style *pstyle) |
int | style_index (const struct nation_style *pstyle) |
struct nation_style * | style_by_number (int id) |
const char * | style_name_translation (const struct nation_style *pstyle) |
const char * | style_rule_name (const struct nation_style *pstyle) |
struct nation_style * | style_by_rule_name (const char *name) |
void | music_styles_alloc (int count) |
void | music_styles_free (void) |
int | music_style_number (const struct music_style *pms) |
struct music_style * | music_style_by_number (int id) |
struct music_style * | player_music_style (struct player *plr) |
int | style_of_city (const struct city *pcity) |
int | basic_city_style_for_style (struct nation_style *pstyle) |
int | city_style (struct city *pcity) |
Variables | |
static struct nation_style * | styles = NULL |
static struct music_style * | music_styles = NULL |
int basic_city_style_for_style | ( | struct nation_style * | pstyle | ) |
Return basic city style representing nation style.
Definition at line 210 of file style.c.
Referenced by create_races_dialog(), popup_races_dialog(), races_dialog::races_dialog(), sanity_check_ruleset_data(), and select_nation().
Return citystyle of the city.
Definition at line 241 of file style.c.
Referenced by city_style_refresh(), get_sample_city_surface(), sg_load_player_city(), and sg_load_player_city().
struct music_style * music_style_by_number | ( | int | id | ) |
Return music style of given id.
Definition at line 171 of file style.c.
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 161 of file style.c.
Referenced by package_player_common().
Initialise music styles structures.
Definition at line 133 of file style.c.
Referenced by handle_ruleset_control(), and load_ruleset_styles().
Free the memory associated with music styles
Definition at line 148 of file style.c.
Referenced by game_ruleset_free().
struct music_style * player_music_style | ( | struct player * | plr | ) |
Return music style for player
Definition at line 185 of file style.c.
Referenced by package_player_common().
struct nation_style * style_by_number | ( | int | id | ) |
Return style of given id.
Definition at line 88 of file style.c.
Referenced by handle_nation_select_req(), handle_player_info(), handle_ruleset_nation(), handle_ruleset_style(), load_ruleset_nations(), sg_load_player_main(), sg_load_player_main(), universal_by_number(), and universal_value_initial().
struct nation_style * style_by_rule_name | ( | const char * | name | ) |
Returns style matching rule name or NULL if there is no style with such name.
Definition at line 117 of file style.c.
Referenced by load_ruleset_nations(), playernation_command(), sg_load_player_main(), sg_load_player_main(), and universal_value_from_str().
int style_index | ( | const struct nation_style * | pstyle | ) |
Return the style index.
Definition at line 78 of file style.c.
Referenced by load_style_names(), 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 99 of file style.c.
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 68 of file style.c.
Referenced by create_races_dialog(), nation_button_callback(), races_dialog::nation_selected(), package_player_common(), popup_races_dialog(), races_dialog::races_dialog(), races_nation_callback(), races_toggles_set_sensitive(), send_ruleset_nations(), and universal_number().
Evaluate which style should be used to draw a city.
Definition at line 202 of file style.c.
Referenced by get_citizen_sprite(), get_city_sprite(), popup_city_cma_dialog(), and real_city_dialog_popup().
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 108 of file style.c.
Referenced by sanity_check_ruleset_data(), save_nation(), sg_load_player_main(), sg_load_player_main(), sg_save_player_main(), style_by_rule_name(), universal_kind_values(), and universal_rule_name().
Initialise styles structures.
Definition at line 36 of file style.c.
Referenced by handle_ruleset_control(), and load_style_names().
Free the memory associated with styles
Definition at line 51 of file style.c.
Referenced by game_ruleset_free().
|
static |
Definition at line 31 of file style.c.
Referenced by music_style_by_number(), music_styles_alloc(), and music_styles_free().
|
static |
Definition at line 29 of file style.c.
Referenced by style_by_number(), style_index(), styles_alloc(), and styles_free().