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.
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.
Free resources allocated for the theme.
Definition at line 317 of file themespec.c.
Free all sprites for the theme.
Definition at line 1065 of file themespec.c.
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.
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.
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.
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.
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.
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.
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.
Definition at line 154 of file themespec.c.