Freeciv-3.2
|
Go to the source code of this file.
Functions | |
const char ** | get_theme_list (void) |
struct theme * | theme_read_toplevel (const char *theme_name) |
void | theme_free (struct theme *ftheme) |
void | theme_load_sprites (struct theme *t) |
void | theme_free_sprites (struct theme *t) |
void | themespec_try_read (const char *theme_name) |
void | themespec_reread (const char *theme_name) |
struct sprite * | theme_lookup_sprite_tag_alt (struct theme *t, enum log_level level, const char *tag, const char *alt, const char *what, const char *name) |
struct theme_color_system * | theme_get_color_system (const struct theme *t) |
struct theme_background_system * | theme_get_background_system (const struct theme *t) |
char * | themespec_gfx_filename (const char *gfx_filename) |
const char * | theme_get_name (const struct theme *t) |
const char * | theme_font_filename (const struct theme *t) |
int | theme_default_font_size (const struct theme *t) |
Variables | |
struct theme * | active_theme |
Returns a static list of themes available on the system by searching all data directories for files matching THEMESPEC_SUFFIX. The list is NULL-terminated.
Definition at line 200 of file themespec.c.
Return theme's default font size.
Definition at line 177 of file themespec.c.
Referenced by default_font_size().
Return the path within the data directories where the font file can be found. (It is left up to the GUI code to load and unload this file.)
Definition at line 169 of file themespec.c.
Referenced by load_font().
Free resources allocated for the theme.
Definition at line 317 of file themespec.c.
Referenced by get_theme_list(), gui_load_theme(), theme_read_toplevel(), themespec_try_read(), and ui_main().
Free all sprites for the theme.
Definition at line 1065 of file themespec.c.
Referenced by theme_free(), and themespec_reread().
struct theme_background_system * theme_get_background_system | ( | const struct theme * | t | ) |
Return the theme's background system.
Definition at line 1114 of file themespec.c.
Referenced by theme_get_background().
struct theme_color_system * theme_get_color_system | ( | const struct theme * | t | ) |
Return the theme's color system.
Definition at line 1122 of file themespec.c.
Referenced by theme_get_color().
Return the name of the given theme.
Definition at line 160 of file themespec.c.
Load the tiles; requires themespec_read_toplevel() called previously. Leads to tile_sprites being allocated and filled with pointers to sprites. Also sets up and populates sprite_hash, and calls func to initialize 'sprites' structure.
Definition at line 990 of file themespec.c.
Referenced by gui_load_theme(), and themespec_reread().
struct sprite * theme_lookup_sprite_tag_alt | ( | struct theme * | t, |
enum log_level | level, | ||
const char * | tag, | ||
const char * | alt, | ||
const char * | what, | ||
const char * | name | ||
) |
Lookup sprite to match tag, or else to match alt if don't find, or else return NULL, and emit log message.
Definition at line 1000 of file themespec.c.
Referenced by tilespec_setup_city_gfx().
Finds and reads the toplevel themespec file based on given name. Sets global variables, including tile sizes and full names for intro files.
Definition at line 721 of file themespec.c.
Referenced by get_theme_list(), themespec_reread(), and themespec_try_read().
Returns the correct name of the gfx file (with path and extension) Must be free'd when no longer used
Definition at line 690 of file themespec.c.
Referenced by theme_background_system_read().
Read a new themespec in from scratch.
Unlike the initial reading code, which reads pieces one at a time, this gets rid of the old data and reads in the new all at once. If the new theme fails to load the old theme may be reloaded; otherwise the client will exit. If a NULL name is given the current theme will be reread.
It will also call the necessary functions to redraw the graphics.
Definition at line 376 of file themespec.c.
Read a new themespec in when first starting the game.
Call this function with the (guessed) name of the theme, when starting the client.
Definition at line 334 of file themespec.c.
Referenced by gui_load_theme().
Definition at line 154 of file themespec.c.
Referenced by arrange_widgets(), draw_intro_gfx(), economy_report_dialog_popup(), get_theme_color(), gui_load_theme(), load_font(), meswin_dialog_popup(), popup_change_research_dialog(), popup_change_research_goal_dialog(), popup_city_cma_dialog(), popup_conn_list_dialog(), popup_connection_dialog(), popup_government_dialog(), popup_impr_info(), popup_join_game_dialog(), popup_load_game_dialog(), popup_new_user_passwd_dialog(), popup_newcity_dialog(), popup_races_dialog(), popup_tech_info(), popup_unit_info(), popup_user_passwd_dialog(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_city_dialog_popup(), real_info_city_report_dialog_update(), science_report_dialog_popup(), show_main_page(), spy_steal_popup_shared(), themespec_reread(), themespec_try_read(), tilespec_setup_city_gfx(), and ui_main().