Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Functions | Variables
gui_tilespec.c File Reference
#include <SDL3/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 70 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:75
#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:29
#define FALSE
Definition support.h:47

Definition at line 59 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 73 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 67 of file gui_tilespec.c.

Function Documentation

◆ draw_intro_gfx()

void draw_intro_gfx ( void  )

Draw theme intro gfx.

Definition at line 481 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 416 of file gui_tilespec.c.

◆ get_city_gfx()

SDL_Surface * get_city_gfx ( void  )

Return current city screen graphics

Definition at line 473 of file gui_tilespec.c.

◆ get_tech_color()

SDL_Color * get_tech_color ( Tech_type_id  tech_id)

Return color associated with current tech knowledge state.

Definition at line 450 of file gui_tilespec.c.

◆ get_tech_icon()

SDL_Surface * get_tech_icon ( Tech_type_id  tech)

Return tech icon surface.

Definition at line 426 of file gui_tilespec.c.

◆ 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 122 of file gui_tilespec.c.

◆ reload_small_citizens_icons()

static void reload_small_citizens_icons ( int  style)
static

Reload small citizens "style" icons.

Definition at line 79 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 376 of file gui_tilespec.c.

◆ tilespec_free_city_gfx()

void tilespec_free_city_gfx ( void  )

Free theme city screen graphics.

Definition at line 145 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 224 of file gui_tilespec.c.

◆ tilespec_free_theme()

void tilespec_free_theme ( void  )

Free theme memory

Definition at line 363 of file gui_tilespec.c.

◆ tilespec_setup_city_gfx()

void tilespec_setup_city_gfx ( void  )

Load theme city screen graphics.

Definition at line 131 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 156 of file gui_tilespec.c.

◆ tilespec_setup_theme()

void tilespec_setup_theme ( void  )

Alloc and fill Theme struct

Definition at line 258 of file gui_tilespec.c.

Variable Documentation

◆ city_surf

SDL_Surface* city_surf
static

Definition at line 53 of file gui_tilespec.c.

◆ current_theme

struct theme_icons* current_theme = NULL

Definition at line 50 of file gui_tilespec.c.

Referenced by qtg_gui_load_theme().

◆ future_tech_icon

SDL_Surface* future_tech_icon
static

Definition at line 57 of file gui_tilespec.c.

◆ icons

struct city_icon* icons

Definition at line 51 of file gui_tilespec.c.

◆ neutral_tech_icon

SDL_Surface* neutral_tech_icon
static

Definition at line 55 of file gui_tilespec.c.

◆ none_tech_icon

SDL_Surface* none_tech_icon
static

Definition at line 56 of file gui_tilespec.c.