Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
gui_tilespec.h File Reference
#include <SDL3/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.

Referenced by real_resize_window_callback(), and show_main_page().

◆ 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.

Referenced by ui_main().

◆ get_building_surface()

static SDL_Surface * get_building_surface ( const struct impr_type pimprove)
inlinestatic

Return a surface for the given building icon.

Definition at line 247 of file gui_tilespec.h.

◆ 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 214 of file gui_tilespec.h.

◆ get_city_gfx()

SDL_Surface * get_city_gfx ( void  )

Return current city screen graphics

Definition at line 476 of file gui_tilespec.c.

Referenced by real_city_dialog_popup().

◆ 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 231 of file gui_tilespec.h.

◆ get_nation_flag_surface()

static SDL_Surface * get_nation_flag_surface ( const struct nation_type pnation)
inlinestatic

Return a surface for the flag of the given nation.

Definition at line 223 of file gui_tilespec.h.

◆ 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 239 of file gui_tilespec.h.

◆ 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 265 of file gui_tilespec.h.

◆ 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.

Referenced by create_select_tech_icon(), create_tech_info(), popup_impr_info(), and popup_unit_info().

◆ get_tech_icon()

SDL_Surface * get_tech_icon ( Tech_type_id  tech)

◆ get_unittype_surface()

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

Return a surface for the given unit type.

Definition at line 255 of file gui_tilespec.h.

◆ 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.

Referenced by popup_city_cma_dialog(), and real_city_dialog_popup().

◆ 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.

Referenced by ui_main().

◆ tilespec_free_city_gfx()

void tilespec_free_city_gfx ( void  )

Free theme city screen graphics.

Definition at line 149 of file gui_tilespec.c.

Referenced by theme_free_sprites().

◆ 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.

Referenced by theme_free_sprites().

◆ tilespec_free_theme()

void tilespec_free_theme ( void  )

Free theme memory

Definition at line 366 of file gui_tilespec.c.

Referenced by theme_free_sprites().

◆ tilespec_setup_city_gfx()

void tilespec_setup_city_gfx ( void  )

Load theme city screen graphics.

Definition at line 135 of file gui_tilespec.c.

Referenced by theme_lookup_sprite_tags().

◆ 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.

Referenced by theme_lookup_sprite_tags().

◆ tilespec_setup_theme()

void tilespec_setup_theme ( void  )

Alloc and fill Theme struct

Definition at line 261 of file gui_tilespec.c.

Referenced by theme_lookup_sprite_tags().

Variable Documentation

◆ current_theme

struct theme_icons* current_theme
extern

Definition at line 65 of file fc_client.cpp.

Referenced by combo_new(), create_checkbox(), create_edit(), create_horizontal_scrollbar(), create_icon_button(), create_tech_info(), create_textcheckbox(), create_units_order_widgets(), create_vertical_scrollbar(), create_window_skeleton(), draw_frame(), economy_report_dialog_popup(), fc_icons::get_icon(), fc_icons::get_pixmap(), get_progress_icon(), init_options_button(), nation_button_callback(), notify_goto_dialog_new(), option_dialog_new(), option_dialog_optset_category(), popup_advanced_terrain_dialog(), popup_bribe_dialog(), popup_change_research_dialog(), popup_change_research_goal_dialog(), popup_city_cma_dialog(), popup_conn_list_dialog(), popup_connection_dialog(), popup_diplomacy_dialog(), popup_find_dialog(), popup_goto_airlift_dialog(), popup_hurry_production_dialog(), popup_image(), popup_impr_info(), popup_incite_dialog(), popup_join_game_dialog(), popup_load_del_presets_dialog(), popup_load_game_dialog(), popup_minimap_window(), popup_new_user_passwd_dialog(), popup_newcity_dialog(), popup_notify_dialog(), popup_pillage_dialog(), popup_players_dialog(), popup_players_nations_dialog(), popup_races_dialog(), popup_sabotage_dialog(), popup_sell_impr_callback(), popup_spaceship_dialog(), popup_tech_info(), popup_terrain_info_dialog(), popup_unit_disband_dlg(), popup_unit_info(), popup_unit_upgrade_dlg(), popup_unitinfo_window(), popup_upgrade_unit_callback(), popup_user_passwd_dialog(), popup_war_dialog(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_city_dialog_popup(), real_info_city_report_dialog_update(), real_menus_update(), redraw_army_city_dialog(), redraw_happiness_city_dialog(), redraw_info_city_dialog(), redraw_misc_city_dialog(), redraw_supported_units_city_dialog(), save_cma_callback(), science_report_dialog_popup(), sell_imprvm_dlg_callback(), set_client_area(), set_new_minimap_window_pos(), set_new_unitinfo_window_pos(), show_tech_tree_callback(), spy_steal_popup_shared(), tilespec_free_theme(), tilespec_setup_theme(), toggle_full_tree_mode_in_help_dlg_callback(), toggle_map_window_callback(), toggle_unit_info_window_callback(), unit_select_dialog_popup(), update_diplomacy_dialog(), and update_intel_dialog().

◆ icons

struct city_icon* icons
extern