Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-sdl2/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/* SDL2 */
27#ifdef SDL2_PLAIN_INCLUDE
28#include <SDL.h>
29#else /* SDL2_PLAIN_INCLUDE */
30#include <SDL2/SDL.h>
31#endif /* SDL2_PLAIN_INCLUDE */
32
33/* utility */
34#include "fcintl.h"
35#include "log.h"
36
37/* common */
38#include "research.h"
39#include "specialist.h"
40
41/* client */
42#include "client_main.h"
43
44/* gui-sdl2 */
45#include "colors.h"
46#include "graphics.h"
47#include "gui_main.h"
48#include "gui_string.h"
49#include "sprite.h"
50#include "themespec.h"
51
52#include "gui_tilespec.h"
53
54 struct theme_icons *current_theme = NULL;
55 struct city_icon *icons;
56
57 static SDL_Surface *city_surf;
58
59 static SDL_Surface *neutral_tech_icon;
60 static SDL_Surface *none_tech_icon;
61 static SDL_Surface *future_tech_icon;
62
63#define load_gui_surface(_spr_, _struct_, _surf_, _tag_) \
64do { \
65 _spr_ = theme_lookup_sprite_tag_alt(active_theme, LOG_FATAL, \
66 _tag_, "", "", ""); \
67 fc_assert_action(_spr_ != NULL, break); \
68 _struct_->_surf_ = GET_SURF_REAL(_spr_); \
69} while (FALSE)
70
71#define load_theme_surface(spr, surf, tag) \
72 load_gui_surface(spr, current_theme, surf, tag)
73
74#define load_city_icon_surface(spr, surf, tag) \
75 load_gui_surface(spr, icons, surf, tag)
76
77#define load_order_theme_surface(spr, surf, tag) \
78 load_gui_surface(spr, current_theme, surf, tag);
79
80/***************************************************************************/
83 static void reload_small_citizens_icons(int style)
84{
85 int i;
86 int spe_max;
87
88 /* free info icons */
89 FREESURFACE(icons->male_content);
90 FREESURFACE(icons->female_content);
91 FREESURFACE(icons->male_happy);
92 FREESURFACE(icons->female_happy);
93 FREESURFACE(icons->male_unhappy);
94 FREESURFACE(icons->female_unhappy);
95 FREESURFACE(icons->male_angry);
96 FREESURFACE(icons->female_angry);
97
98 spe_max = specialist_count();
99 for (i = 0; i < spe_max; i++) {
100 FREESURFACE(icons->specialists[i]);
101 }
102
103 /* allocate icons */
104 icons->male_happy = adj_surf(get_citizen_surface(CITIZEN_HAPPY, 0));
105 icons->female_happy = adj_surf(get_citizen_surface(CITIZEN_HAPPY, 1));
106 icons->male_content = adj_surf(get_citizen_surface(CITIZEN_CONTENT, 0));
107 icons->female_content = adj_surf(get_citizen_surface(CITIZEN_CONTENT, 1));
108 icons->male_unhappy = adj_surf(get_citizen_surface(CITIZEN_UNHAPPY, 0));
109 icons->female_unhappy = adj_surf(get_citizen_surface(CITIZEN_UNHAPPY, 1));
110 icons->male_angry = adj_surf(get_citizen_surface(CITIZEN_ANGRY, 0));
111 icons->female_angry = adj_surf(get_citizen_surface(CITIZEN_ANGRY, 1));
112
113 for (i = 0; i < spe_max; i++) {
114 icons->specialists[i] = adj_surf(get_citizen_surface(CITIZEN_SPECIALIST + i, 0));
115 }
116}
117
118/* ================================================================================= */
119/* ===================================== Public ==================================== */
120/* ================================================================================= */
121
122/***************************************************************************/
126 void reload_citizens_icons(int style)
127{
128 reload_small_citizens_icons(style);
129 icons->style = style;
130}
131
132/***************************************************************************/
135 void tilespec_setup_city_gfx(void)
136{
137 struct sprite *spr =
138 theme_lookup_sprite_tag_alt(active_theme, LOG_FATAL,
139 "theme.city", "", "", "");
140
141 city_surf = (spr ? adj_surf(GET_SURF_REAL(spr)) : NULL);
142
143 fc_assert(city_surf != NULL);
144}
145
146/***************************************************************************/
149 void tilespec_free_city_gfx(void)
150{
151 /* There was two copies of this. One is freed from the sprite hash, but
152 * one created by adj_surf() in tilespec_setup_city_gfx() is freed here. */
153 FREESURFACE(city_surf);
154}
155
156/***************************************************************************/
160 void tilespec_setup_city_icons(void)
161{
162 struct sprite *spr = NULL;
163
164 icons = (struct city_icon *)fc_calloc(1, sizeof(struct city_icon));
165
166 load_city_icon_surface(spr, big_food_corr, "city.food_waste");
167 load_city_icon_surface(spr, big_shield_corr, "city.shield_waste");
168 load_city_icon_surface(spr, big_trade_corr, "city.trade_waste");
169 load_city_icon_surface(spr, big_food, "city.food");
170
171 icons->big_food_surplus = crop_rect_from_surface(icons->big_food, NULL);
172 SDL_SetSurfaceAlphaMod(icons->big_food_surplus, 128);
173
174 load_city_icon_surface(spr, big_shield, "city.shield");
175
176 icons->big_shield_surplus = crop_rect_from_surface(icons->big_shield, NULL);
177 SDL_SetSurfaceAlphaMod(icons->big_shield_surplus, 128);
178
179 load_city_icon_surface(spr, big_trade, "city.trade");
180 load_city_icon_surface(spr, big_luxury, "city.lux");
181 load_city_icon_surface(spr, big_coin, "city.coin");
182 load_city_icon_surface(spr, big_colb, "city.colb");
183 load_city_icon_surface(spr, pBIG_Face, "city.red_face");
184 load_city_icon_surface(spr, big_coin_corr, "city.dark_coin");
185 load_city_icon_surface(spr, big_coin_upkeep, "city.upkeep_coin");
186
187 /* Small icon */
188 load_city_icon_surface(spr, food, "city.small_food");
189 load_city_icon_surface(spr, shield, "city.small_shield");
190 load_city_icon_surface(spr, trade, "city.small_trade");
191 load_city_icon_surface(spr, face, "city.small_red_face");
192 load_city_icon_surface(spr, pLuxury, "city.small_lux");
193 load_city_icon_surface(spr, coint, "city.small_coin");
194 load_city_icon_surface(spr, pColb, "city.small_colb");
195
196 load_city_icon_surface(spr, pollution, "city.pollution");
197 /* ================================================================= */
198
199 load_city_icon_surface(spr, police, "city.police");
200 /* ================================================================= */
201 icons->worklist = create_surf(9,9, SDL_SWSURFACE);
202 SDL_FillRect(icons->worklist, NULL,
203 SDL_MapRGB(icons->worklist->format, 255, 255,255));
204
205 create_frame(icons->worklist,
206 0, 0, icons->worklist->w - 1, icons->worklist->h - 1,
207 get_theme_color(COLOR_THEME_CITYREP_FRAME));
208 create_line(icons->worklist,
209 3, 2, 5, 2,
210 get_theme_color(COLOR_THEME_CITYREP_FRAME));
211 create_line(icons->worklist,
212 3, 4, 7, 4,
213 get_theme_color(COLOR_THEME_CITYREP_FRAME));
214 create_line(icons->worklist,
215 3, 6, 6, 6,
216 get_theme_color(COLOR_THEME_CITYREP_FRAME));
217
218 /* ================================================================= */
219
220 /* Force reload citizens icons */
221 icons->style = 999;
222}
223
224/***************************************************************************/
227 void tilespec_free_city_icons(void)
228{
229 int i;
230 int spe_max;
231
232 if (!icons) {
233 return;
234 }
235
236 /* small citizens */
237 FREESURFACE(icons->male_content);
238 FREESURFACE(icons->female_content);
239 FREESURFACE(icons->male_happy);
240 FREESURFACE(icons->female_happy);
241 FREESURFACE(icons->male_unhappy);
242 FREESURFACE(icons->female_unhappy);
243 FREESURFACE(icons->male_angry);
244 FREESURFACE(icons->female_angry);
245
246 spe_max = specialist_count();
247 for (i = 0; i < spe_max; i++) {
248 FREESURFACE(icons->specialists[i]);
249 }
250
251 FC_FREE(icons);
252}
253
254/* =================================================== */
255/* ===================== THEME ======================= */
256/* =================================================== */
257
258/***************************************************************************/
261 void tilespec_setup_theme(void)
262{
263 struct sprite *buf = NULL;
264
265 current_theme = fc_calloc(1, sizeof(struct theme_icons));
266
267 load_theme_surface(buf, fr_left, "theme.left_frame");
268 load_theme_surface(buf, fr_right, "theme.right_frame");
269 load_theme_surface(buf, fr_top, "theme.top_frame");
270 load_theme_surface(buf, fr_bottom, "theme.bottom_frame");
271 load_theme_surface(buf, button, "theme.button");
272 load_theme_surface(buf, edit, "theme.edit");
273 load_theme_surface(buf, cbox_sell_icon, "theme.sbox");
274 load_theme_surface(buf, cbox_unsell_icon, "theme.ubox");
275 load_theme_surface(buf, up_icon, "theme.UP_scroll");
276 load_theme_surface(buf, down_icon, "theme.DOWN_scroll");
277#if 0
278 load_theme_surface(buf, left_icon, "theme.LEFT_scroll");
279 load_theme_surface(buf, right_icon, "theme.RIGHT_scroll");
280#endif
281 load_theme_surface(buf, vertic, "theme.vertic_scrollbar");
282 load_theme_surface(buf, horiz, "theme.horiz_scrollbar");
283
284 /* ------------------- */
285 load_theme_surface(buf, ok_pact_icon, "theme.pact_ok");
286 load_theme_surface(buf, cancel_pact_icon, "theme.pact_cancel");
287 /* ------------------- */
288 load_theme_surface(buf, small_ok_icon, "theme.SMALL_OK_button");
289 load_theme_surface(buf, small_cancel_icon, "theme.SMALL_FAIL_button");
290 /* ------------------- */
291 load_theme_surface(buf, ok_icon, "theme.OK_button");
292 load_theme_surface(buf, cancel_icon, "theme.FAIL_button");
293 load_theme_surface(buf, FORWARD_Icon, "theme.NEXT_button");
294 load_theme_surface(buf, back_icon, "theme.BACK_button");
295 load_theme_surface(buf, l_arrow_icon, "theme.LEFT_ARROW_button");
296 load_theme_surface(buf, r_arrow_icon, "theme.RIGHT_ARROW_button");
297 load_theme_surface(buf, map_icon, "theme.MAP_button");
298 load_theme_surface(buf, find_city_icon, "theme.FIND_CITY_button");
299 load_theme_surface(buf, new_turn_icon, "theme.NEW_TURN_button");
300 load_theme_surface(buf, log_icon, "theme.LOG_button");
301 load_theme_surface(buf, units_icon, "theme.UNITS_INFO_button");
302 load_theme_surface(buf, options_icon, "theme.OPTIONS_button");
303 load_theme_surface(buf, block, "theme.block");
304 load_theme_surface(buf, info_icon, "theme.INFO_button");
305 load_theme_surface(buf, army_icon, "theme.ARMY_button");
306 load_theme_surface(buf, happy_icon, "theme.HAPPY_button");
307 load_theme_surface(buf, support_icon, "theme.HOME_button");
308 load_theme_surface(buf, buy_prod_icon, "theme.BUY_button");
309 load_theme_surface(buf, prod_icon, "theme.PROD_button");
310 load_theme_surface(buf, qprod_icon, "theme.WORK_LIST_button");
311 load_theme_surface(buf, cma_icon, "theme.CMA_button");
312 load_theme_surface(buf, lock_icon, "theme.LOCK_button");
313 load_theme_surface(buf, unlock_icon, "theme.UNLOCK_button");
314 load_theme_surface(buf, players_icon, "theme.PLAYERS_button");
315 load_theme_surface(buf, units2_icon, "theme.UNITS_button");
316 load_theme_surface(buf, save_icon, "theme.SAVE_button");
317 load_theme_surface(buf, load_icon, "theme.LOAD_button");
318 load_theme_surface(buf, delete_icon, "theme.DELETE_button");
319 /* ------------------------------ */
320 load_theme_surface(buf, tech_tree_icon, "theme.tech_tree");
321 /* ------------------------------ */
322
323 load_order_theme_surface(buf, order_icon, "theme.order_empty");
324 load_order_theme_surface(buf, o_autoconnect_icon, "theme.order_auto_connect");
325 load_order_theme_surface(buf, o_autoexp_icon, "theme.order_auto_explorer");
326 load_order_theme_surface(buf, o_autosett_icon, "theme.order_auto_settler");
327 load_order_theme_surface(buf, o_build_city_icon, "theme.order_build_city");
328 load_order_theme_surface(buf, OCutDownForest_Icon, "theme.order_cutdown_forest");
329 load_order_theme_surface(buf, OPlantForest_Icon, "theme.order_plant_forest");
330 load_order_theme_surface(buf, o_mine_icon, "theme.order_build_mining");
331 load_order_theme_surface(buf, o_irrigation_icon, "theme.order_irrigation");
332 load_order_theme_surface(buf, o_cultivate_icon, "theme.order_cutdown_forest");
333 load_order_theme_surface(buf, o_plant_icon, "theme.order_plant_forest");
334 load_order_theme_surface(buf, o_done_icon, "theme.order_done");
335 load_order_theme_surface(buf, o_disband_icon, "theme.order_disband");
336 load_order_theme_surface(buf, o_fortify_icon, "theme.order_fortify");
337 load_order_theme_surface(buf, o_goto_icon, "theme.order_goto");
338 load_order_theme_surface(buf, o_goto_city_icon, "theme.order_goto_city");
339 load_order_theme_surface(buf, o_homecity_icon, "theme.order_home");
340 load_order_theme_surface(buf, o_nuke_icon, "theme.order_nuke");
341 load_order_theme_surface(buf, o_paradrop_icon, "theme.order_paradrop");
342 load_order_theme_surface(buf, o_patrol_icon, "theme.order_patrol");
343 load_order_theme_surface(buf, o_pillage_icon, "theme.order_pillage");
344 load_order_theme_surface(buf, o_railroad_icon, "theme.order_build_railroad");
345 load_order_theme_surface(buf, o_road_icon, "theme.order_build_road");
346 load_order_theme_surface(buf, o_sentry_icon, "theme.order_sentry");
347 load_order_theme_surface(buf, o_unload_icon, "theme.order_unload");
348 load_order_theme_surface(buf, o_wait_icon, "theme.order_wait");
349 load_order_theme_surface(buf, o_fortress_icon, "theme.order_build_fortress");
350 load_order_theme_surface(buf, o_clean_icon, "theme.order_clean");
351 load_order_theme_surface(buf, o_airbase_icon, "theme.order_build_airbase");
352 load_order_theme_surface(buf, o_transform_icon, "theme.order_transform");
353 load_order_theme_surface(buf, OAddCity_Icon, "theme.order_add_to_city");
354 load_order_theme_surface(buf, o_wonder_icon, "theme.order_carravan_wonder");
355 load_order_theme_surface(buf, o_trade_icon, "theme.order_carravan_trade_route");
356 load_order_theme_surface(buf, o_spy_icon, "theme.order_spying");
357 load_order_theme_surface(buf, o_wakeup_icon, "theme.order_wakeup");
358 load_order_theme_surface(buf, o_return_icon, "theme.order_return");
359 load_order_theme_surface(buf, OAirLift_Icon, "theme.order_airlift");
360 load_order_theme_surface(buf, o_load_icon, "theme.order_load");
361}
362
363/***************************************************************************/
366 void tilespec_free_theme(void)
367{
368 if (!current_theme) {
369 return;
370 }
371
372 FC_FREE(current_theme);
373 current_theme = NULL;
374}
375
376/***************************************************************************/
379 void setup_auxiliary_tech_icons(void)
380{
381 SDL_Color bg_color = {255, 255, 255, 136};
382 SDL_Surface *surf;
383 utf8_str *pstr = create_utf8_from_char_fonto(Q_("?tech:None"), FONTO_DEFAULT);
384
385 pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
386
387 /* Create icons */
388 surf = create_surf(adj_size(50), adj_size(50), SDL_SWSURFACE);
389 SDL_FillRect(surf, NULL, map_rgba(surf->format, bg_color));
390 create_frame(surf,
391 0 , 0, surf->w - 1, surf->h - 1,
392 get_theme_color(COLOR_THEME_SCIENCEDLG_FRAME));
393
394 neutral_tech_icon = copy_surface(surf);
395 none_tech_icon = copy_surface(surf);
396 future_tech_icon = surf;
397
398 /* None */
399 surf = create_text_surf_from_utf8(pstr);
400 blit_entire_src(surf, none_tech_icon ,
401 (adj_size(50) - surf->w) / 2 , (adj_size(50) - surf->h) / 2);
402
403 FREESURFACE(surf);
404
405 /* TRANS: Future Technology */
406 copy_chars_to_utf8_str(pstr, _("FT"));
407 surf = create_text_surf_from_utf8(pstr);
408 blit_entire_src(surf, future_tech_icon,
409 (adj_size(50) - surf->w) / 2 , (adj_size(50) - surf->h) / 2);
410
411 FREESURFACE(surf);
412
413 FREEUTF8STR(pstr);
414}
415
416/***************************************************************************/
419 void free_auxiliary_tech_icons(void)
420{
421 FREESURFACE(neutral_tech_icon);
422 FREESURFACE(none_tech_icon);
423 FREESURFACE(future_tech_icon);
424}
425
426/***************************************************************************/
429 SDL_Surface *get_tech_icon(Tech_type_id tech)
430{
431 switch (tech) {
432 case A_NONE:
433 case A_UNSET:
434 case A_UNKNOWN:
435 case A_LAST:
436 return adj_surf(none_tech_icon);
437 case A_FUTURE:
438 return adj_surf(future_tech_icon);
439 default:
440 if (get_tech_sprite(tileset, tech)) {
441 return adj_surf(GET_SURF(get_tech_sprite(tileset, tech)));
442 } else {
443 return adj_surf(neutral_tech_icon);
444 }
445 }
446
447 return NULL;
448}
449
450/***************************************************************************/
453 SDL_Color *get_tech_color(Tech_type_id tech_id)
454{
455 if (research_invention_gettable(research_get(client_player()),
456 tech_id, TRUE)) {
457 switch (research_invention_state(research_get(client_player()),
458 tech_id)) {
459 case TECH_UNKNOWN:
460 return get_game_color(COLOR_REQTREE_UNKNOWN);
461 case TECH_KNOWN:
462 return get_game_color(COLOR_REQTREE_KNOWN);
463 case TECH_PREREQS_KNOWN:
464 return get_game_color(COLOR_REQTREE_PREREQS_KNOWN);
465 default:
466 return get_game_color(COLOR_REQTREE_BACKGROUND);
467 }
468 }
469
470 return get_game_color(COLOR_REQTREE_UNREACHABLE);
471}
472
473/***************************************************************************/
476 SDL_Surface *get_city_gfx(void)
477{
478 return city_surf;
479}
480
481/***************************************************************************/
484 void draw_intro_gfx(void)
485{
486 SDL_Surface *intro = theme_get_background(active_theme, BACKGROUND_MAINPAGE);
487
488 if (intro->w != main_window_width()) {
489 SDL_Surface *tmp = resize_surface(intro, main_window_width(),
490 main_window_height(), 1);
491
492 FREESURFACE(intro);
493 intro = tmp;
494 }
495
496 /* draw intro gfx center in screen */
497 alphablit(intro, NULL, main_data.map, NULL, 255);
498
499 FREESURFACE(intro);
500}
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