Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-sdl3/gui_tilespec.c Source File

Freeciv-3.2

Loading...
Searching...
No Matches
gui_tilespec.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14/***********************************************************************
15 gui_tilespec.c - description
16 -------------------
17 begin : Dec. 2 2002
18 copyright : (C) 2002 by Rafał Bursig
19 email : Rafal Bursig <bursig@poczta.fm>
20***********************************************************************/
21
22#ifdef HAVE_CONFIG_H
23#include <fc_config.h>
24#endif
25
26/* SDL3 */
27#include <SDL3/SDL.h>
28
29/* utility */
30#include "fcintl.h"
31#include "log.h"
32
33/* common */
34#include "research.h"
35#include "specialist.h"
36
37/* client */
38#include "client_main.h"
39
40/* gui-sdl3 */
41#include "colors.h"
42#include "graphics.h"
43#include "gui_main.h"
44#include "gui_string.h"
45#include "sprite.h"
46#include "themespec.h"
47
48#include "gui_tilespec.h"
49
50 struct theme_icons *current_theme = NULL;
51 struct city_icon *icons;
52
53 static SDL_Surface *city_surf;
54
55 static SDL_Surface *neutral_tech_icon;
56 static SDL_Surface *none_tech_icon;
57 static SDL_Surface *future_tech_icon;
58
59#define load_gui_surface(_spr_, _struct_, _surf_, _tag_) \
60do { \
61 _spr_ = theme_lookup_sprite_tag_alt(active_theme, LOG_FATAL, \
62 _tag_, "", "", ""); \
63 fc_assert_action(_spr_ != NULL, break); \
64 _struct_->_surf_ = GET_SURF_REAL(_spr_); \
65} while (FALSE)
66
67#define load_theme_surface(spr, surf, tag) \
68 load_gui_surface(spr, current_theme, surf, tag)
69
70#define load_city_icon_surface(spr, surf, tag) \
71 load_gui_surface(spr, icons, surf, tag)
72
73#define load_order_theme_surface(spr, surf, tag) \
74 load_gui_surface(spr, current_theme, surf, tag);
75
76/***************************************************************************/
79 static void reload_small_citizens_icons(int style)
80{
81 int i;
82 int spe_max;
83
84 /* free info icons */
85 FREESURFACE(icons->male_content);
86 FREESURFACE(icons->female_content);
87 FREESURFACE(icons->male_happy);
88 FREESURFACE(icons->female_happy);
89 FREESURFACE(icons->male_unhappy);
90 FREESURFACE(icons->female_unhappy);
91 FREESURFACE(icons->male_angry);
92 FREESURFACE(icons->female_angry);
93
94 spe_max = specialist_count();
95 for (i = 0; i < spe_max; i++) {
96 FREESURFACE(icons->specialists[i]);
97 }
98
99 /* allocate icons */
100 icons->male_happy = adj_surf(get_citizen_surface(CITIZEN_HAPPY, 0));
101 icons->female_happy = adj_surf(get_citizen_surface(CITIZEN_HAPPY, 1));
102 icons->male_content = adj_surf(get_citizen_surface(CITIZEN_CONTENT, 0));
103 icons->female_content = adj_surf(get_citizen_surface(CITIZEN_CONTENT, 1));
104 icons->male_unhappy = adj_surf(get_citizen_surface(CITIZEN_UNHAPPY, 0));
105 icons->female_unhappy = adj_surf(get_citizen_surface(CITIZEN_UNHAPPY, 1));
106 icons->male_angry = adj_surf(get_citizen_surface(CITIZEN_ANGRY, 0));
107 icons->female_angry = adj_surf(get_citizen_surface(CITIZEN_ANGRY, 1));
108
109 for (i = 0; i < spe_max; i++) {
110 icons->specialists[i] = adj_surf(get_citizen_surface(CITIZEN_SPECIALIST + i, 0));
111 }
112}
113
114/* ================================================================================= */
115/* ===================================== Public ==================================== */
116/* ================================================================================= */
117
118/***************************************************************************/
122 void reload_citizens_icons(int style)
123{
124 reload_small_citizens_icons(style);
125 icons->style = style;
126}
127
128/***************************************************************************/
131 void tilespec_setup_city_gfx(void)
132{
133 struct sprite *spr =
134 theme_lookup_sprite_tag_alt(active_theme, LOG_FATAL,
135 "theme.city", "", "", "");
136
137 city_surf = (spr ? adj_surf(GET_SURF_REAL(spr)) : NULL);
138
139 fc_assert(city_surf != NULL);
140}
141
142/***************************************************************************/
145 void tilespec_free_city_gfx(void)
146{
147 /* There was two copies of this. One is freed from the sprite hash, but
148 * one created by adj_surf() in tilespec_setup_city_gfx() is freed here. */
149 FREESURFACE(city_surf);
150}
151
152/***************************************************************************/
156 void tilespec_setup_city_icons(void)
157{
158 struct sprite *spr = NULL;
159
160 icons = (struct city_icon *)fc_calloc(1, sizeof(struct city_icon));
161
162 load_city_icon_surface(spr, big_food_corr, "city.food_waste");
163 load_city_icon_surface(spr, big_shield_corr, "city.shield_waste");
164 load_city_icon_surface(spr, big_trade_corr, "city.trade_waste");
165 load_city_icon_surface(spr, big_food, "city.food");
166
167 icons->big_food_surplus = crop_rect_from_surface(icons->big_food, NULL);
168 SDL_SetSurfaceAlphaMod(icons->big_food_surplus, 128);
169
170 load_city_icon_surface(spr, big_shield, "city.shield");
171
172 icons->big_shield_surplus = crop_rect_from_surface(icons->big_shield, NULL);
173 SDL_SetSurfaceAlphaMod(icons->big_shield_surplus, 128);
174
175 load_city_icon_surface(spr, big_trade, "city.trade");
176 load_city_icon_surface(spr, big_luxury, "city.lux");
177 load_city_icon_surface(spr, big_coin, "city.coin");
178 load_city_icon_surface(spr, big_colb, "city.colb");
179 load_city_icon_surface(spr, pBIG_Face, "city.red_face");
180 load_city_icon_surface(spr, big_coin_corr, "city.dark_coin");
181 load_city_icon_surface(spr, big_coin_upkeep, "city.upkeep_coin");
182
183 /* Small icon */
184 load_city_icon_surface(spr, food, "city.small_food");
185 load_city_icon_surface(spr, shield, "city.small_shield");
186 load_city_icon_surface(spr, trade, "city.small_trade");
187 load_city_icon_surface(spr, face, "city.small_red_face");
188 load_city_icon_surface(spr, pLuxury, "city.small_lux");
189 load_city_icon_surface(spr, coint, "city.small_coin");
190 load_city_icon_surface(spr, pColb, "city.small_colb");
191
192 load_city_icon_surface(spr, pollution, "city.pollution");
193 /* ================================================================= */
194
195 load_city_icon_surface(spr, police, "city.police");
196 /* ================================================================= */
197 icons->worklist = create_surf(9,9, SDL_SWSURFACE);
198 SDL_FillSurfaceRect(icons->worklist, NULL,
199 SDL_MapRGB(icons->worklist->format, 255, 255,255));
200
201 create_frame(icons->worklist,
202 0, 0, icons->worklist->w - 1, icons->worklist->h - 1,
203 get_theme_color(COLOR_THEME_CITYREP_FRAME));
204 create_line(icons->worklist,
205 3, 2, 5, 2,
206 get_theme_color(COLOR_THEME_CITYREP_FRAME));
207 create_line(icons->worklist,
208 3, 4, 7, 4,
209 get_theme_color(COLOR_THEME_CITYREP_FRAME));
210 create_line(icons->worklist,
211 3, 6, 6, 6,
212 get_theme_color(COLOR_THEME_CITYREP_FRAME));
213
214 /* ================================================================= */
215
216 /* Force reload citizens icons */
217 icons->style = 999;
218}
219
220/***************************************************************************/
223 void tilespec_free_city_icons(void)
224{
225 int i;
226 int spe_max;
227
228 if (!icons) {
229 return;
230 }
231
232 /* small citizens */
233 FREESURFACE(icons->male_content);
234 FREESURFACE(icons->female_content);
235 FREESURFACE(icons->male_happy);
236 FREESURFACE(icons->female_happy);
237 FREESURFACE(icons->male_unhappy);
238 FREESURFACE(icons->female_unhappy);
239 FREESURFACE(icons->male_angry);
240 FREESURFACE(icons->female_angry);
241
242 spe_max = specialist_count();
243 for (i = 0; i < spe_max; i++) {
244 FREESURFACE(icons->specialists[i]);
245 }
246
247 FC_FREE(icons);
248}
249
250/* =================================================== */
251/* ===================== THEME ======================= */
252/* =================================================== */
253
254/***************************************************************************/
257 void tilespec_setup_theme(void)
258{
259 struct sprite *buf = NULL;
260
261 current_theme = fc_calloc(1, sizeof(struct theme_icons));
262
263 load_theme_surface(buf, fr_left, "theme.left_frame");
264 load_theme_surface(buf, fr_right, "theme.right_frame");
265 load_theme_surface(buf, fr_top, "theme.top_frame");
266 load_theme_surface(buf, fr_bottom, "theme.bottom_frame");
267 load_theme_surface(buf, button, "theme.button");
268 load_theme_surface(buf, edit, "theme.edit");
269 load_theme_surface(buf, cbox_sell_icon, "theme.sbox");
270 load_theme_surface(buf, cbox_unsell_icon, "theme.ubox");
271 load_theme_surface(buf, up_icon, "theme.UP_scroll");
272 load_theme_surface(buf, down_icon, "theme.DOWN_scroll");
273#if 0
274 load_theme_surface(buf, left_icon, "theme.LEFT_scroll");
275 load_theme_surface(buf, right_icon, "theme.RIGHT_scroll");
276#endif
277 load_theme_surface(buf, vertic, "theme.vertic_scrollbar");
278 load_theme_surface(buf, horiz, "theme.horiz_scrollbar");
279
280 /* ------------------- */
281 load_theme_surface(buf, ok_pact_icon, "theme.pact_ok");
282 load_theme_surface(buf, cancel_pact_icon, "theme.pact_cancel");
283 /* ------------------- */
284 load_theme_surface(buf, small_ok_icon, "theme.SMALL_OK_button");
285 load_theme_surface(buf, small_cancel_icon, "theme.SMALL_FAIL_button");
286 /* ------------------- */
287 load_theme_surface(buf, ok_icon, "theme.OK_button");
288 load_theme_surface(buf, cancel_icon, "theme.FAIL_button");
289 load_theme_surface(buf, FORWARD_Icon, "theme.NEXT_button");
290 load_theme_surface(buf, back_icon, "theme.BACK_button");
291 load_theme_surface(buf, l_arrow_icon, "theme.LEFT_ARROW_button");
292 load_theme_surface(buf, r_arrow_icon, "theme.RIGHT_ARROW_button");
293 load_theme_surface(buf, map_icon, "theme.MAP_button");
294 load_theme_surface(buf, find_city_icon, "theme.FIND_CITY_button");
295 load_theme_surface(buf, new_turn_icon, "theme.NEW_TURN_button");
296 load_theme_surface(buf, log_icon, "theme.LOG_button");
297 load_theme_surface(buf, units_icon, "theme.UNITS_INFO_button");
298 load_theme_surface(buf, options_icon, "theme.OPTIONS_button");
299 load_theme_surface(buf, block, "theme.block");
300 load_theme_surface(buf, info_icon, "theme.INFO_button");
301 load_theme_surface(buf, army_icon, "theme.ARMY_button");
302 load_theme_surface(buf, happy_icon, "theme.HAPPY_button");
303 load_theme_surface(buf, support_icon, "theme.HOME_button");
304 load_theme_surface(buf, buy_prod_icon, "theme.BUY_button");
305 load_theme_surface(buf, prod_icon, "theme.PROD_button");
306 load_theme_surface(buf, qprod_icon, "theme.WORK_LIST_button");
307 load_theme_surface(buf, cma_icon, "theme.CMA_button");
308 load_theme_surface(buf, lock_icon, "theme.LOCK_button");
309 load_theme_surface(buf, unlock_icon, "theme.UNLOCK_button");
310 load_theme_surface(buf, players_icon, "theme.PLAYERS_button");
311 load_theme_surface(buf, units2_icon, "theme.UNITS_button");
312 load_theme_surface(buf, save_icon, "theme.SAVE_button");
313 load_theme_surface(buf, load_icon, "theme.LOAD_button");
314 load_theme_surface(buf, delete_icon, "theme.DELETE_button");
315 /* ------------------------------ */
316 load_theme_surface(buf, tech_tree_icon, "theme.tech_tree");
317 /* ------------------------------ */
318
319 load_order_theme_surface(buf, order_icon, "theme.order_empty");
320 load_order_theme_surface(buf, o_autoconnect_icon, "theme.order_auto_connect");
321 load_order_theme_surface(buf, o_autoexp_icon, "theme.order_auto_explorer");
322 load_order_theme_surface(buf, o_autosett_icon, "theme.order_auto_settler");
323 load_order_theme_surface(buf, o_build_city_icon, "theme.order_build_city");
324 load_order_theme_surface(buf, OCutDownForest_Icon, "theme.order_cutdown_forest");
325 load_order_theme_surface(buf, OPlantForest_Icon, "theme.order_plant_forest");
326 load_order_theme_surface(buf, o_mine_icon, "theme.order_build_mining");
327 load_order_theme_surface(buf, o_irrigation_icon, "theme.order_irrigation");
328 load_order_theme_surface(buf, o_cultivate_icon, "theme.order_cutdown_forest");
329 load_order_theme_surface(buf, o_plant_icon, "theme.order_plant_forest");
330 load_order_theme_surface(buf, o_done_icon, "theme.order_done");
331 load_order_theme_surface(buf, o_disband_icon, "theme.order_disband");
332 load_order_theme_surface(buf, o_fortify_icon, "theme.order_fortify");
333 load_order_theme_surface(buf, o_goto_icon, "theme.order_goto");
334 load_order_theme_surface(buf, o_goto_city_icon, "theme.order_goto_city");
335 load_order_theme_surface(buf, o_homecity_icon, "theme.order_home");
336 load_order_theme_surface(buf, o_nuke_icon, "theme.order_nuke");
337 load_order_theme_surface(buf, o_paradrop_icon, "theme.order_paradrop");
338 load_order_theme_surface(buf, o_patrol_icon, "theme.order_patrol");
339 load_order_theme_surface(buf, o_pillage_icon, "theme.order_pillage");
340 load_order_theme_surface(buf, o_railroad_icon, "theme.order_build_railroad");
341 load_order_theme_surface(buf, o_road_icon, "theme.order_build_road");
342 load_order_theme_surface(buf, o_sentry_icon, "theme.order_sentry");
343 load_order_theme_surface(buf, o_unload_icon, "theme.order_unload");
344 load_order_theme_surface(buf, o_wait_icon, "theme.order_wait");
345 load_order_theme_surface(buf, o_fortress_icon, "theme.order_build_fortress");
346 load_order_theme_surface(buf, o_clean_icon, "theme.order_clean");
347 load_order_theme_surface(buf, o_airbase_icon, "theme.order_build_airbase");
348 load_order_theme_surface(buf, o_transform_icon, "theme.order_transform");
349 load_order_theme_surface(buf, OAddCity_Icon, "theme.order_add_to_city");
350 load_order_theme_surface(buf, o_wonder_icon, "theme.order_carravan_wonder");
351 load_order_theme_surface(buf, o_trade_icon, "theme.order_carravan_trade_route");
352 load_order_theme_surface(buf, o_spy_icon, "theme.order_spying");
353 load_order_theme_surface(buf, o_wakeup_icon, "theme.order_wakeup");
354 load_order_theme_surface(buf, o_return_icon, "theme.order_return");
355 load_order_theme_surface(buf, OAirLift_Icon, "theme.order_airlift");
356 load_order_theme_surface(buf, o_load_icon, "theme.order_load");
357}
358
359/***************************************************************************/
362 void tilespec_free_theme(void)
363{
364 if (!current_theme) {
365 return;
366 }
367
368 FC_FREE(current_theme);
369 current_theme = NULL;
370}
371
372/***************************************************************************/
375 void setup_auxiliary_tech_icons(void)
376{
377 SDL_Color bg_color = {255, 255, 255, 136};
378 SDL_Surface *surf;
379 utf8_str *pstr = create_utf8_from_char_fonto(Q_("?tech:None"), FONTO_DEFAULT);
380
381 pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
382
383 /* Create icons */
384 surf = create_surf(adj_size(50), adj_size(50), SDL_SWSURFACE);
385 SDL_FillSurfaceRect(surf, NULL, map_rgba(surf->format, bg_color));
386 create_frame(surf,
387 0 , 0, surf->w - 1, surf->h - 1,
388 get_theme_color(COLOR_THEME_SCIENCEDLG_FRAME));
389
390 neutral_tech_icon = copy_surface(surf);
391 none_tech_icon = copy_surface(surf);
392 future_tech_icon = surf;
393
394 /* None */
395 surf = create_text_surf_from_utf8(pstr);
396 blit_entire_src(surf, none_tech_icon ,
397 (adj_size(50) - surf->w) / 2 , (adj_size(50) - surf->h) / 2);
398
399 FREESURFACE(surf);
400
401 /* TRANS: Future Technology */
402 copy_chars_to_utf8_str(pstr, _("FT"));
403 surf = create_text_surf_from_utf8(pstr);
404 blit_entire_src(surf, future_tech_icon,
405 (adj_size(50) - surf->w) / 2 , (adj_size(50) - surf->h) / 2);
406
407 FREESURFACE(surf);
408
409 FREEUTF8STR(pstr);
410}
411
412/***************************************************************************/
415 void free_auxiliary_tech_icons(void)
416{
417 FREESURFACE(neutral_tech_icon);
418 FREESURFACE(none_tech_icon);
419 FREESURFACE(future_tech_icon);
420}
421
422/***************************************************************************/
425 SDL_Surface *get_tech_icon(Tech_type_id tech)
426{
427 switch (tech) {
428 case A_NONE:
429 case A_UNSET:
430 case A_UNKNOWN:
431 case A_LAST:
432 return adj_surf(none_tech_icon);
433 case A_FUTURE:
434 return adj_surf(future_tech_icon);
435 default:
436 if (get_tech_sprite(tileset, tech)) {
437 return adj_surf(GET_SURF(get_tech_sprite(tileset, tech)));
438 } else {
439 return adj_surf(neutral_tech_icon);
440 }
441 }
442
443 return NULL;
444}
445
446/***************************************************************************/
449 SDL_Color *get_tech_color(Tech_type_id tech_id)
450{
451 if (research_invention_gettable(research_get(client_player()),
452 tech_id, TRUE)) {
453 switch (research_invention_state(research_get(client_player()),
454 tech_id)) {
455 case TECH_UNKNOWN:
456 return get_game_color(COLOR_REQTREE_UNKNOWN);
457 case TECH_KNOWN:
458 return get_game_color(COLOR_REQTREE_KNOWN);
459 case TECH_PREREQS_KNOWN:
460 return get_game_color(COLOR_REQTREE_PREREQS_KNOWN);
461 default:
462 return get_game_color(COLOR_REQTREE_BACKGROUND);
463 }
464 }
465
466 return get_game_color(COLOR_REQTREE_UNREACHABLE);
467}
468
469/***************************************************************************/
472 SDL_Surface *get_city_gfx(void)
473{
474 return city_surf;
475}
476
477/***************************************************************************/
480 void draw_intro_gfx(void)
481{
482 SDL_Surface *intro = theme_get_background(active_theme, BACKGROUND_MAINPAGE);
483
484 if (intro->w != main_window_width()) {
485 SDL_Surface *tmp = resize_surface(intro, main_window_width(),
486 main_window_height(), 1);
487
488 FREESURFACE(intro);
489 intro = tmp;
490 }
491
492 /* draw intro gfx center in screen */
493 alphablit(intro, NULL, main_data.map, NULL, 255);
494
495 FREESURFACE(intro);
496}
CITIZEN_SPECIALIST
@ CITIZEN_SPECIALIST
Definition city.h:273
CITIZEN_ANGRY
@ CITIZEN_ANGRY
Definition city.h:271
CITIZEN_HAPPY
@ CITIZEN_HAPPY
Definition city.h:268
CITIZEN_CONTENT
@ CITIZEN_CONTENT
Definition city.h:269
CITIZEN_UNHAPPY
@ CITIZEN_UNHAPPY
Definition city.h:270
client_main.h
client_player
#define client_player()
Definition client_main.h:106
incite_cost
char * incite_cost
Definition comments.c:74
Tech_type_id
int Tech_type_id
Definition fc_types.h:380
fcintl.h
Q_
#define Q_(String)
Definition fcintl.h:70
_
#define _(String)
Definition fcintl.h:67
get_theme_color
SDL_Color * get_theme_color(enum theme_color themecolor)
Definition colors.c:47
get_game_color
SDL_Color * get_game_color(enum color_std stdcolor)
Definition colors.c:55
resize_surface
SDL_Surface * resize_surface(const SDL_Surface *psrc, Uint16 new_width, Uint16 new_height, int smooth)
Definition graphics.c:1237
main_window_width
int main_window_width(void)
Definition graphics.c:685
create_line
void create_line(SDL_Surface *dest, Sint16 x0, Sint16 y0, Sint16 x1, Sint16 y1, SDL_Color *pcolor)
Definition graphics.c:1379
copy_surface
SDL_Surface * copy_surface(SDL_Surface *src)
Definition graphics.c:1309
crop_rect_from_surface
SDL_Surface * crop_rect_from_surface(SDL_Surface *psource, SDL_Rect *prect)
Definition graphics.c:236
alphablit
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
Definition graphics.c:199
main_data
struct sdl2_data main_data
Definition graphics.c:57
blit_entire_src
int blit_entire_src(SDL_Surface *psrc, SDL_Surface *pdest, Sint16 dest_x, Sint16 dest_y)
Definition graphics.c:417
create_surf
SDL_Surface * create_surf(int width, int height, Uint32 flags)
Definition graphics.c:351
create_frame
void create_frame(SDL_Surface *dest, Sint16 left, Sint16 top, Sint16 width, Sint16 height, SDL_Color *pcolor)
Definition graphics.c:1348
main_window_height
int main_window_height(void)
Definition graphics.c:693
FREESURFACE
#define FREESURFACE(ptr)
Definition graphics.h:322
adj_surf
#define adj_surf(surf)
Definition graphics.h:200
map_rgba
#define map_rgba(format, color)
Definition graphics.h:315
adj_size
#define adj_size(size)
Definition gui_main.h:141
copy_chars_to_utf8_str
utf8_str * copy_chars_to_utf8_str(utf8_str *pstr, const char *pchars)
Definition gui_string.c:251
create_text_surf_from_utf8
SDL_Surface * create_text_surf_from_utf8(utf8_str *pstr)
Definition gui_string.c:425
FREEUTF8STR
#define FREEUTF8STR(pstr)
Definition gui_string.h:93
SF_CENTER
#define SF_CENTER
Definition gui_string.h:40
FONTO_DEFAULT
@ FONTO_DEFAULT
Definition gui_string.h:65
create_utf8_from_char_fonto
#define create_utf8_from_char_fonto(string_in, fonto)
Definition gui_string.h:108
icons
struct city_icon * icons
Definition gui_tilespec.c:55
setup_auxiliary_tech_icons
void setup_auxiliary_tech_icons(void)
Definition gui_tilespec.c:379
load_city_icon_surface
#define load_city_icon_surface(spr, surf, tag)
Definition gui_tilespec.c:74
current_theme
struct theme_icons * current_theme
Definition gui_tilespec.c:54
tilespec_setup_city_gfx
void tilespec_setup_city_gfx(void)
Definition gui_tilespec.c:135
neutral_tech_icon
static SDL_Surface * neutral_tech_icon
Definition gui_tilespec.c:59
load_order_theme_surface
#define load_order_theme_surface(spr, surf, tag)
Definition gui_tilespec.c:77
reload_small_citizens_icons
static void reload_small_citizens_icons(int style)
Definition gui_tilespec.c:83
get_tech_color
SDL_Color * get_tech_color(Tech_type_id tech_id)
Definition gui_tilespec.c:453
draw_intro_gfx
void draw_intro_gfx(void)
Definition gui_tilespec.c:484
none_tech_icon
static SDL_Surface * none_tech_icon
Definition gui_tilespec.c:60
tilespec_free_city_icons
void tilespec_free_city_icons(void)
Definition gui_tilespec.c:227
tilespec_setup_theme
void tilespec_setup_theme(void)
Definition gui_tilespec.c:261
tilespec_free_city_gfx
void tilespec_free_city_gfx(void)
Definition gui_tilespec.c:149
city_surf
static SDL_Surface * city_surf
Definition gui_tilespec.c:57
future_tech_icon
static SDL_Surface * future_tech_icon
Definition gui_tilespec.c:61
tilespec_setup_city_icons
void tilespec_setup_city_icons(void)
Definition gui_tilespec.c:160
load_theme_surface
#define load_theme_surface(spr, surf, tag)
Definition gui_tilespec.c:71
tilespec_free_theme
void tilespec_free_theme(void)
Definition gui_tilespec.c:366
get_tech_icon
SDL_Surface * get_tech_icon(Tech_type_id tech)
Definition gui_tilespec.c:429
reload_citizens_icons
void reload_citizens_icons(int style)
Definition gui_tilespec.c:126
get_city_gfx
SDL_Surface * get_city_gfx(void)
Definition gui_tilespec.c:476
free_auxiliary_tech_icons
void free_auxiliary_tech_icons(void)
Definition gui_tilespec.c:419
get_citizen_surface
static SDL_Surface * get_citizen_surface(enum citizen_category type, int citizen_index)
Definition gui_tilespec.h:218
GET_SURF
#define GET_SURF(m_sprite)
Definition sprite.h:29
GET_SURF_REAL
#define GET_SURF_REAL(m_sprite)
Definition sprite.h:26
theme_get_background
SDL_Surface * theme_get_background(const struct theme *t, enum theme_background background)
Definition themebackgrounds.c:94
BACKGROUND_MAINPAGE
@ BACKGROUND_MAINPAGE
Definition themebackgrounds.h:39
COLOR_THEME_CITYREP_FRAME
@ COLOR_THEME_CITYREP_FRAME
Definition themecolors.h:70
COLOR_THEME_SCIENCEDLG_FRAME
@ COLOR_THEME_SCIENCEDLG_FRAME
Definition themecolors.h:116
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:1000
active_theme
struct theme * active_theme
Definition themespec.c:154
edit
#define edit(pedit)
Definition widget_edit.h:34
gui_string.h
gui_tilespec.h
themespec.h
colors.h
graphics.h
gui_main.h
sprite.h
log.h
fc_assert
#define fc_assert(condition)
Definition log.h:176
LOG_FATAL
@ LOG_FATAL
Definition log.h:29
fc_calloc
#define fc_calloc(n, esz)
Definition mem.h:38
FC_FREE
#define FC_FREE(ptr)
Definition mem.h:41
research_get
struct research * research_get(const struct player *pplayer)
Definition research.c:128
research_invention_state
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
Definition research.c:619
research_invention_gettable
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
Definition research.c:693
research.h
specialist_count
Specialist_type_id specialist_count(void)
Definition specialist.c:71
specialist.h
city_icon
Definition gui_tilespec.h:148
city_icon::pollution
SDL_Surface * pollution
Definition gui_tilespec.h:175
city_icon::shield
SDL_Surface * shield
Definition gui_tilespec.h:167
city_icon::coint
SDL_Surface * coint
Definition gui_tilespec.h:170
city_icon::big_trade_corr
SDL_Surface * big_trade_corr
Definition gui_tilespec.h:153
city_icon::trade
SDL_Surface * trade
Definition gui_tilespec.h:168
city_icon::big_shield_corr
SDL_Surface * big_shield_corr
Definition gui_tilespec.h:152
city_icon::big_trade
SDL_Surface * big_trade
Definition gui_tilespec.h:156
city_icon::face
SDL_Surface * face
Definition gui_tilespec.h:172
city_icon::food
SDL_Surface * food
Definition gui_tilespec.h:166
city_icon::female_angry
SDL_Surface * female_angry
Definition gui_tilespec.h:187
city_icon::big_shield
SDL_Surface * big_shield
Definition gui_tilespec.h:155
city_icon::specialists
SDL_Surface * specialists[SP_MAX]
Definition gui_tilespec.h:189
city_icon::female_happy
SDL_Surface * female_happy
Definition gui_tilespec.h:181
city_icon::big_luxury
SDL_Surface * big_luxury
Definition gui_tilespec.h:157
city_icon::female_content
SDL_Surface * female_content
Definition gui_tilespec.h:183
city_icon::police
SDL_Surface * police
Definition gui_tilespec.h:176
city_icon::style
int style
Definition gui_tilespec.h:149
city_icon::pBIG_Face
SDL_Surface * pBIG_Face
Definition gui_tilespec.h:160
city_icon::big_colb
SDL_Surface * big_colb
Definition gui_tilespec.h:159
city_icon::big_coin_upkeep
SDL_Surface * big_coin_upkeep
Definition gui_tilespec.h:162
city_icon::pLuxury
SDL_Surface * pLuxury
Definition gui_tilespec.h:169
city_icon::female_unhappy
SDL_Surface * female_unhappy
Definition gui_tilespec.h:185
city_icon::male_unhappy
SDL_Surface * male_unhappy
Definition gui_tilespec.h:184
city_icon::male_content
SDL_Surface * male_content
Definition gui_tilespec.h:182
city_icon::big_food
SDL_Surface * big_food
Definition gui_tilespec.h:154
city_icon::big_coin_corr
SDL_Surface * big_coin_corr
Definition gui_tilespec.h:161
city_icon::male_happy
SDL_Surface * male_happy
Definition gui_tilespec.h:180
city_icon::big_coin
SDL_Surface * big_coin
Definition gui_tilespec.h:158
city_icon::big_food_corr
SDL_Surface * big_food_corr
Definition gui_tilespec.h:151
city_icon::male_angry
SDL_Surface * male_angry
Definition gui_tilespec.h:186
city_icon::big_food_surplus
SDL_Surface * big_food_surplus
Definition gui_tilespec.h:164
city_icon::pColb
SDL_Surface * pColb
Definition gui_tilespec.h:171
city_icon::worklist
SDL_Surface * worklist
Definition gui_tilespec.h:177
city_icon::big_shield_surplus
SDL_Surface * big_shield_surplus
Definition gui_tilespec.h:163
sdl2_data::map
SDL_Surface * map
Definition graphics.h:210
sprite
Definition sprite.h:22
theme_icons
Definition gui_tilespec.h:39
tileset
Definition tilespec.c:481
utf8_str
Definition gui_string.h:52
TRUE
#define TRUE
Definition support.h:46
A_FUTURE
#define A_FUTURE
Definition tech.h:46
A_NONE
#define A_NONE
Definition tech.h:43
A_UNSET
#define A_UNSET
Definition tech.h:48
A_UNKNOWN
#define A_UNKNOWN
Definition tech.h:49
A_LAST
#define A_LAST
Definition tech.h:45
get_tech_sprite
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)
Definition tilespec.c:6778