Freeciv-3.1
|
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 |
const char ** get_theme_list | ( | void | ) |
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.
int theme_default_font_size | ( | const struct theme * | t | ) |
Return theme's default font size.
Definition at line 177 of file themespec.c.
Referenced by default_font_size().
const char * theme_font_filename | ( | const struct theme * | t | ) |
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().
void theme_free | ( | struct theme * | ftheme | ) |
Free resources allocated for the theme.
Definition at line 316 of file themespec.c.
Referenced by get_theme_list(), gui_load_theme(), theme_read_toplevel(), themespec_try_read(), and ui_main().
void theme_free_sprites | ( | struct theme * | t | ) |
Free all sprites for the theme.
Definition at line 1067 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 1116 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 1124 of file themespec.c.
Referenced by theme_get_color().
const char * theme_get_name | ( | const struct theme * | t | ) |
Return the name of the given theme.
Definition at line 160 of file themespec.c.
void theme_load_sprites | ( | struct theme * | t | ) |
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 992 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 1002 of file themespec.c.
Referenced by tilespec_setup_city_gfx().
struct theme * theme_read_toplevel | ( | const char * | theme_name | ) |
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 716 of file themespec.c.
Referenced by get_theme_list(), themespec_reread(), and themespec_try_read().
char * themespec_gfx_filename | ( | const char * | gfx_filename | ) |
Returns the correct name of the gfx file (with path and extension) Must be free'd when no longer used
Definition at line 685 of file themespec.c.
Referenced by theme_background_system_read().
void themespec_reread | ( | const char * | new_theme_name | ) |
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 372 of file themespec.c.
void themespec_try_read | ( | const char * | theme_name | ) |
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 333 of file themespec.c.
Referenced by gui_load_theme().
|
extern |
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().