Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-sdl2/gui_tilespec.c File Reference

Freeciv-3.1

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_Surface * | get_tech_icon (Tech_type_id tech)
SDL_Color * | get_tech_color (Tech_type_id tech_id)
SDL_Surface * | get_city_gfx (void)
void | draw_intro_gfx (void)

## Variables

struct theme_icons * | current_theme = NULL
struct city_icon * | icons
static SDL_Surface * | city_surf
static SDL_Surface * | neutral_tech_icon
static SDL_Surface * | none_tech_icon
static SDL_Surface * | future_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 { \
_spr_ = theme_lookup_sprite_tag_alt(active_theme, LOG_FATAL, \
_tag_, "", "", ""); \
fc_assert_action(_spr_ != NULL, break); \
_struct_->_surf_ = GET_SURF_REAL(_spr_); \
} while (FALSE)
GET_SURF_REAL
#define GET_SURF_REAL(m_sprite)
Definition sprite.h:26
LOG_FATAL
@ LOG_FATAL
Definition log.h:29
FALSE
#define FALSE
Definition support.h:47
theme_lookup_sprite_tag_alt
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:1002
active_theme
struct theme * active_theme
Definition themespec.c:154

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 485 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 420 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 477 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 454 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 | ) |

Return tech icon surface.

Definition at line 430 of file gui_tilespec.c.

Referenced by create_select_tech_icon(), create_tech_info(), real_science_report_dialog_update(), science_report_dialog_popup(), and update_intel_dialog().

## ◆ 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 380 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 367 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 qtg_gui_load_theme(), tilespec_free_theme(), and tilespec_setup_theme().

## ◆ future_tech_icon

SDL_Surface* future_tech_icon

static

Definition at line 61 of file gui_tilespec.c.

Referenced by free_auxiliary_tech_icons(), get_tech_icon(), and setup_auxiliary_tech_icons().

## ◆ icons

struct city_icon* icons

Definition at line 55 of file gui_tilespec.c.

Referenced by create_unit_surface(), economy_report_dialog_popup(), popup_city_cma_dialog(), real_activeunits_report_dialog_update(), real_city_dialog_popup(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), real_science_report_dialog_update(), redraw_city_dialog(), redraw_happiness_city_dialog(), redraw_info_city_dialog(), reload_citizens_icons(), reload_small_citizens_icons(), tilespec_free_city_icons(), and tilespec_setup_city_icons().

## ◆ neutral_tech_icon

SDL_Surface* neutral_tech_icon

static

Definition at line 59 of file gui_tilespec.c.

Referenced by free_auxiliary_tech_icons(), get_tech_icon(), and setup_auxiliary_tech_icons().

## ◆ none_tech_icon

SDL_Surface* none_tech_icon

static

Definition at line 60 of file gui_tilespec.c.

Referenced by free_auxiliary_tech_icons(), get_tech_icon(), and setup_auxiliary_tech_icons().