Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions | Variables
gui_tilespec.c File Reference
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "research.h"
#include "specialist.h"
#include "client_main.h"
#include "colors.h"
#include "graphics.h"
#include "gui_main.h"
#include "gui_string.h"
#include "sprite.h"
#include "themespec.h"
#include "gui_tilespec.h"

Go to the source code of this file.

Macros

#define load_gui_surface(_spr_, _struct_, _surf_, _tag_)
 
#define load_theme_surface(spr, surf, tag)    load_gui_surface(spr, current_theme, surf, tag)
 
#define load_city_icon_surface(spr, surf, tag)    load_gui_surface(spr, icons, surf, tag)
 
#define load_order_theme_surface(spr, surf, tag)    load_gui_surface(spr, current_theme, surf, tag);
 

Functions

static void reload_small_citizens_icons (int style)
 
void reload_citizens_icons (int style)
 
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 tilespec_setup_theme (void)
 
void tilespec_free_theme (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)
 
SDL_Surfaceget_city_gfx (void)
 
void draw_intro_gfx (void)
 

Variables

struct theme_iconscurrent_theme = NULL
 
struct city_iconicons
 
static SDL_Surfacecity_surf
 
static SDL_Surfaceneutral_tech_icon
 
static SDL_Surfacenone_tech_icon
 
static SDL_Surfacefuture_tech_icon
 

Macro Definition Documentation

◆ load_city_icon_surface

#define load_city_icon_surface (   spr,
  surf,
  tag 
)     load_gui_surface(spr, icons, surf, tag)

Definition at line 74 of file gui_tilespec.c.

◆ load_gui_surface

#define load_gui_surface (   _spr_,
  _struct_,
  _surf_,
  _tag_ 
)
Value:
do { \
_tag_, "", "", ""); \
} while (FALSE)
char * incite_cost
Definition comments.c:76
#define GET_SURF_REAL(m_sprite)
Definition sprite.h:26
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)
Definition themespec.c:1000
struct theme * active_theme
Definition themespec.c:154
@ LOG_FATAL
Definition log.h:30
#define FALSE
Definition support.h:47

Definition at line 63 of file gui_tilespec.c.

◆ load_order_theme_surface

#define load_order_theme_surface (   spr,
  surf,
  tag 
)     load_gui_surface(spr, current_theme, surf, tag);

Definition at line 77 of file gui_tilespec.c.

◆ load_theme_surface

#define load_theme_surface (   spr,
  surf,
  tag 
)     load_gui_surface(spr, current_theme, surf, tag)

Definition at line 71 of file gui_tilespec.c.

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_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_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)

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

◆ reload_small_citizens_icons()

static void reload_small_citizens_icons ( int  style)
static

Reload small citizens "style" icons.

Definition at line 83 of file gui_tilespec.c.

Referenced by reload_citizens_icons().

◆ 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

◆ city_surf

SDL_Surface* city_surf
static

Definition at line 57 of file gui_tilespec.c.

Referenced by get_city_gfx(), tilespec_free_city_gfx(), and tilespec_setup_city_gfx().

◆ current_theme

struct theme_icons* current_theme = NULL

Definition at line 54 of file gui_tilespec.c.

Referenced by tilespec_free_theme(), and tilespec_setup_theme().

◆ future_tech_icon

SDL_Surface* future_tech_icon
static

◆ icons

struct city_icon* icons

◆ neutral_tech_icon

SDL_Surface* neutral_tech_icon
static

◆ none_tech_icon

SDL_Surface* none_tech_icon
static