Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
gui_tilespec.h File Reference
#include <SDL2/SDL.h>
#include "tilespec.h"
#include "graphics.h"
#include "sprite.h"

Go to the source code of this file.

Data Structures

struct  theme_icons
 
struct  city_icon
 

Functions

void tilespec_setup_theme (void)
 
void tilespec_free_theme (void)
 
void tilespec_setup_city_gfx (void)
 
void tilespec_free_city_gfx (void)
 
void tilespec_setup_city_icons (void)
 
void tilespec_free_city_icons (void)
 
void reload_citizens_icons (int style)
 
SDL_Surfaceget_city_gfx (void)
 
void draw_intro_gfx (void)
 
void setup_auxiliary_tech_icons (void)
 
void free_auxiliary_tech_icons (void)
 
SDL_Surfaceget_tech_icon (Tech_type_id tech)
 
SDL_Colorget_tech_color (Tech_type_id tech_id)
 
static SDL_Surfaceget_citizen_surface (enum citizen_category type, int citizen_index)
 
static SDL_Surfaceget_nation_flag_surface (const struct nation_type *pnation)
 
static SDL_Surfaceget_government_surface (const struct government *gov)
 
static SDL_Surfaceget_sample_city_surface (int city_style)
 
static SDL_Surfaceget_building_surface (const struct impr_type *pimprove)
 
static SDL_Surfaceget_unittype_surface (const struct unit_type *punittype, enum direction8 facing)
 
static SDL_Surfaceget_tax_surface (Output_type_id otype)
 

Variables

struct theme_iconscurrent_theme
 
struct city_iconicons
 

Function Documentation

◆ draw_intro_gfx()

void draw_intro_gfx ( void  )

Draw theme intro gfx.

Definition at line 484 of file gui_tilespec.c.

◆ free_auxiliary_tech_icons()

void free_auxiliary_tech_icons ( void  )

Free resources associated with aux tech icons.

Definition at line 419 of file gui_tilespec.c.

◆ get_building_surface()

static SDL_Surface * get_building_surface ( const struct impr_type pimprove)
inlinestatic

◆ get_citizen_surface()

static SDL_Surface * get_citizen_surface ( enum citizen_category  type,
int  citizen_index 
)
inlinestatic

Return a surface for the given citizen. The citizen's type is given, as well as their index (in the range [0..city_size_get(pcity))).

Definition at line 218 of file gui_tilespec.h.

Referenced by redraw_city_dialog(), reload_small_citizens_icons(), and update_city_cma_dialog().

◆ get_city_gfx()

SDL_Surface * get_city_gfx ( void  )

Return current city screen graphics

Definition at line 476 of file gui_tilespec.c.

◆ get_government_surface()

static SDL_Surface * get_government_surface ( const struct government gov)
inlinestatic

Return a surface for the given government icon.

Definition at line 235 of file gui_tilespec.h.

Referenced by create_tech_info(), and popup_government_dialog().

◆ get_nation_flag_surface()

static SDL_Surface * get_nation_flag_surface ( const struct nation_type pnation)
inlinestatic

◆ get_sample_city_surface()

static SDL_Surface * get_sample_city_surface ( int  city_style)
inlinestatic

Return a sample surface of a city with the given city style

Definition at line 243 of file gui_tilespec.h.

Referenced by popup_races_dialog().

◆ get_tax_surface()

static SDL_Surface * get_tax_surface ( Output_type_id  otype)
inlinestatic

Return a surface for the tax icon of the given output type.

Definition at line 269 of file gui_tilespec.h.

Referenced by create_city_options_widget_list(), misc_panel_city_dlg_callback(), popup_unitinfo_window(), set_indicator_icons(), and update_city_cma_dialog().

◆ get_tech_color()

SDL_Color * get_tech_color ( Tech_type_id  tech_id)

Return color associated with current tech knowledge state.

Definition at line 453 of file gui_tilespec.c.

◆ get_tech_icon()

SDL_Surface * get_tech_icon ( Tech_type_id  tech)

Return tech icon surface.

Definition at line 429 of file gui_tilespec.c.

◆ get_unittype_surface()

static SDL_Surface * get_unittype_surface ( const struct unit_type punittype,
enum direction8  facing 
)
inlinestatic

◆ reload_citizens_icons()

void reload_citizens_icons ( int  style)

Set city citizens icons sprite value; should only happen after start of game (city style struct was filled ).

Definition at line 126 of file gui_tilespec.c.

◆ setup_auxiliary_tech_icons()

void setup_auxiliary_tech_icons ( void  )

Setup icons for special (non-real) technologies.

Definition at line 379 of file gui_tilespec.c.

◆ tilespec_free_city_gfx()

void tilespec_free_city_gfx ( void  )

Free theme city screen graphics.

Definition at line 149 of file gui_tilespec.c.

◆ tilespec_free_city_icons()

void tilespec_free_city_icons ( void  )

Free resources associated with city screen icons.

Definition at line 227 of file gui_tilespec.c.

◆ tilespec_free_theme()

void tilespec_free_theme ( void  )

Free theme memory

Definition at line 366 of file gui_tilespec.c.

◆ tilespec_setup_city_gfx()

void tilespec_setup_city_gfx ( void  )

Load theme city screen graphics.

Definition at line 135 of file gui_tilespec.c.

◆ tilespec_setup_city_icons()

void tilespec_setup_city_icons ( void  )

Set city icons sprite value; should only happen after tileset_load_tiles(tileset).

Definition at line 160 of file gui_tilespec.c.

◆ tilespec_setup_theme()

void tilespec_setup_theme ( void  )

Alloc and fill Theme struct

Definition at line 261 of file gui_tilespec.c.

Variable Documentation

◆ current_theme

struct theme_icons* current_theme
extern

Definition at line 65 of file fc_client.cpp.

◆ icons

struct city_icon* icons
extern

Definition at line 55 of file gui_tilespec.c.