Freeciv-3.1
Loading...
Searching...
No Matches
gui_tilespec.h
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.h - description
16 -------------------
17 begin : Dec. 2 2002
18 copyright : (C) 2002 by RafaƂ Bursig
19 email : Rafal Bursig <bursig@poczta.fm>
20***********************************************************************/
21
22#ifndef FC__GUI_TILESPEC_H
23#define FC__GUI_TILESPEC_H
24
25/* SDL2 */
26#ifdef SDL2_PLAIN_INCLUDE
27#include <SDL.h>
28#else /* SDL2_PLAIN_INCLUDE */
29#include <SDL2/SDL.h>
30#endif /* SDL2_PLAIN_INCLUDE */
31
32/* client */
33#include "tilespec.h"
34
35/* gui-sdl2 */
36#include "graphics.h"
37#include "sprite.h"
38
40
41 /* Frame */
42 SDL_Surface *fr_left;
43 SDL_Surface *fr_right;
44 SDL_Surface *fr_top;
45 SDL_Surface *fr_bottom;
46
47 /* Button */
48 SDL_Surface *button;
49
50 /* Edit */
51 SDL_Surface *edit;
52
53 /* Checkbox */
54 SDL_Surface *cbox_sell_icon;
55 SDL_Surface *cbox_unsell_icon;
56
57 /* Scrollbar */
58 SDL_Surface *up_icon;
59 SDL_Surface *down_icon;
60 SDL_Surface *left_icon;
61 SDL_Surface *right_icon;
62 SDL_Surface *vertic;
63 SDL_Surface *horiz;
64
65 /* Game */
66 SDL_Surface *ok_icon;
67 SDL_Surface *cancel_icon;
68 SDL_Surface *small_ok_icon;
69 SDL_Surface *small_cancel_icon;
70 SDL_Surface *FORWARD_Icon;
71 SDL_Surface *back_icon;
72 SDL_Surface *info_icon;
73 SDL_Surface *r_arrow_icon;
74 SDL_Surface *l_arrow_icon;
75 SDL_Surface *lock_icon;
76 SDL_Surface *unlock_icon;
77
78 SDL_Surface *options_icon;
79 SDL_Surface *block;
80 SDL_Surface *units_icon;
81 SDL_Surface *map_icon;
82 SDL_Surface *log_icon;
83 SDL_Surface *players_icon;
84 SDL_Surface *units2_icon;
85 SDL_Surface *find_city_icon;
86 SDL_Surface *new_turn_icon;
87 SDL_Surface *save_icon;
88 SDL_Surface *load_icon;
89 SDL_Surface *delete_icon;
90
91 /* help icons */
92 SDL_Surface *tech_tree_icon;
93
94 /* city icons */
95 SDL_Surface *army_icon;
96 SDL_Surface *support_icon;
97 SDL_Surface *happy_icon;
98 SDL_Surface *cma_icon;
99 SDL_Surface *prod_icon;
100 SDL_Surface *qprod_icon;
101 SDL_Surface *buy_prod_icon;
102
103 /* diplomacy */
104 SDL_Surface *ok_pact_icon;
105 SDL_Surface *cancel_pact_icon;
106
107 /* orders icons */
108 SDL_Surface *order_icon;
109 SDL_Surface *o_disband_icon;
110 SDL_Surface *o_wait_icon;
111 SDL_Surface *o_done_icon;
112 SDL_Surface *o_autoexp_icon;
113 SDL_Surface *o_autosett_icon;
114 SDL_Surface *o_autoconnect_icon;
115 SDL_Surface *o_unload_icon;
116 SDL_Surface *o_build_city_icon;
117 SDL_Surface *o_goto_city_icon;
118 SDL_Surface *o_goto_icon;
119 SDL_Surface *o_homecity_icon;
120 SDL_Surface *o_patrol_icon;
121 SDL_Surface *o_mine_icon;
122 SDL_Surface *OPlantForest_Icon;
124 SDL_Surface *o_fortify_icon;
125 SDL_Surface *o_sentry_icon;
126 SDL_Surface *o_irrigation_icon;
127 SDL_Surface *o_cultivate_icon;
128 SDL_Surface *o_plant_icon;
129 SDL_Surface *o_road_icon;
130 SDL_Surface *o_railroad_icon;
131 SDL_Surface *o_pillage_icon;
132 SDL_Surface *o_paradrop_icon;
133 SDL_Surface *o_nuke_icon;
134 SDL_Surface *o_fortress_icon;
135 SDL_Surface *o_fallout_icon;
136 SDL_Surface *o_pollution_icon;
137 SDL_Surface *o_airbase_icon;
138 SDL_Surface *o_transform_icon;
139 SDL_Surface *OAddCity_Icon;
140 SDL_Surface *o_wonder_icon;
141 SDL_Surface *o_trade_icon;
142 SDL_Surface *o_spy_icon;
143 SDL_Surface *o_wakeup_icon;
144 SDL_Surface *o_return_icon;
145 SDL_Surface *OAirLift_Icon;
146 SDL_Surface *o_load_icon;
147};
148
149struct city_icon {
150 int style;
151
152 SDL_Surface *big_food_corr;
153 SDL_Surface *big_shield_corr;
154 SDL_Surface *big_trade_corr;
155 SDL_Surface *big_food;
156 SDL_Surface *big_shield;
157 SDL_Surface *big_trade;
158 SDL_Surface *big_luxury;
159 SDL_Surface *big_coin;
160 SDL_Surface *big_colb;
161 SDL_Surface *pBIG_Face;
162 SDL_Surface *big_coin_corr;
163 SDL_Surface *big_coin_upkeep;
164 SDL_Surface *big_shield_surplus;
165 SDL_Surface *big_food_surplus;
166
167 SDL_Surface *food;
168 SDL_Surface *shield;
169 SDL_Surface *trade;
170 SDL_Surface *pLuxury;
171 SDL_Surface *coint;
172 SDL_Surface *pColb;
173 SDL_Surface *face;
174 /*SDL_Surface *pDark_Face;*/
175
176 SDL_Surface *pollution;
177 SDL_Surface *police;
178 SDL_Surface *worklist;
179
180 /* Small Citizens */
181 SDL_Surface *male_happy;
182 SDL_Surface *female_happy;
183 SDL_Surface *male_content;
184 SDL_Surface *female_content;
185 SDL_Surface *male_unhappy;
186 SDL_Surface *female_unhappy;
187 SDL_Surface *male_angry;
188 SDL_Surface *female_angry;
189
190 SDL_Surface *specialists[SP_MAX];
191};
192
193extern struct theme_icons *current_theme;
194extern struct city_icon *icons;
195
196void tilespec_setup_theme(void);
197void tilespec_free_theme(void);
198
199void tilespec_setup_city_gfx(void);
200void tilespec_free_city_gfx(void);
201
203void tilespec_free_city_icons(void);
204
206SDL_Surface *get_city_gfx(void);
207
208void draw_intro_gfx(void);
209
212SDL_Surface *get_tech_icon(Tech_type_id tech);
213SDL_Color *get_tech_color(Tech_type_id tech_id);
214
215/**********************************************************************/
219static inline SDL_Surface *get_citizen_surface(enum citizen_category type,
220 int citizen_index)
221{
222 return GET_SURF(get_citizen_sprite(tileset, type, 0, NULL));
223}
224
225/**********************************************************************/
228static inline SDL_Surface *get_nation_flag_surface(const struct nation_type *pnation)
229{
230 return GET_SURF(get_nation_flag_sprite(tileset, pnation));
231}
232
233/**********************************************************************/
236static inline SDL_Surface *get_government_surface(const struct government *gov)
237{
239}
240
241/**********************************************************************/
244static inline SDL_Surface *get_sample_city_surface(int city_style)
245{
247}
248
249/**********************************************************************/
252static inline SDL_Surface *get_building_surface(const struct impr_type *pimprove)
253{
254 return GET_SURF(get_building_sprite(tileset, pimprove));
255}
256
257/**********************************************************************/
260static inline SDL_Surface *get_unittype_surface(const struct unit_type *punittype,
261 enum direction8 facing)
262{
263 return GET_SURF(get_unittype_sprite(tileset, punittype, facing));
264}
265
266/**********************************************************************/
269static inline SDL_Surface *get_tax_surface(Output_type_id otype)
270{
271 return adj_surf(GET_SURF(get_tax_sprite(tileset, otype)));
272}
273
274#endif /* FC__GUI_TILESPEC_H */
citizen_category
Definition city.h:259
int Tech_type_id
Definition fc_types.h:347
#define SP_MAX
Definition fc_types.h:379
enum output_type_id Output_type_id
Definition fc_types.h:348
GType type
Definition repodlgs.c:1312
#define adj_surf(surf)
Definition graphics.h:200
#define GET_SURF(m_sprite)
Definition sprite.h:29
static SDL_Surface * get_government_surface(const struct government *gov)
struct city_icon * icons
static SDL_Surface * get_building_surface(const struct impr_type *pimprove)
void setup_auxiliary_tech_icons(void)
static SDL_Surface * get_citizen_surface(enum citizen_category type, int citizen_index)
static SDL_Surface * get_tax_surface(Output_type_id otype)
struct theme_icons * current_theme
Definition fc_client.cpp:65
void tilespec_setup_city_gfx(void)
static SDL_Surface * get_nation_flag_surface(const struct nation_type *pnation)
static SDL_Surface * get_unittype_surface(const struct unit_type *punittype, enum direction8 facing)
SDL_Color * get_tech_color(Tech_type_id tech_id)
void draw_intro_gfx(void)
static SDL_Surface * get_sample_city_surface(int city_style)
void tilespec_free_city_icons(void)
void tilespec_setup_theme(void)
void tilespec_free_city_gfx(void)
void tilespec_setup_city_icons(void)
void tilespec_free_theme(void)
SDL_Surface * get_tech_icon(Tech_type_id tech)
void reload_citizens_icons(int style)
SDL_Surface * get_city_gfx(void)
void free_auxiliary_tech_icons(void)
SDL_Surface * coint
SDL_Surface * police
SDL_Surface * shield
SDL_Surface * male_angry
SDL_Surface * big_colb
SDL_Surface * big_coin
SDL_Surface * worklist
SDL_Surface * female_angry
SDL_Surface * big_food_corr
SDL_Surface * pBIG_Face
SDL_Surface * big_shield_corr
SDL_Surface * big_coin_corr
SDL_Surface * specialists[SP_MAX]
SDL_Surface * big_food_surplus
SDL_Surface * female_happy
SDL_Surface * big_trade
SDL_Surface * female_content
SDL_Surface * big_coin_upkeep
SDL_Surface * trade
SDL_Surface * big_luxury
SDL_Surface * food
SDL_Surface * pLuxury
SDL_Surface * female_unhappy
SDL_Surface * male_content
SDL_Surface * face
SDL_Surface * male_happy
SDL_Surface * big_shield
SDL_Surface * big_shield_surplus
SDL_Surface * male_unhappy
SDL_Surface * big_trade_corr
SDL_Surface * pColb
SDL_Surface * big_food
SDL_Surface * pollution
SDL_Surface * l_arrow_icon
SDL_Surface * horiz
SDL_Surface * o_return_icon
SDL_Surface * ok_icon
SDL_Surface * OPlantForest_Icon
SDL_Surface * o_patrol_icon
SDL_Surface * fr_top
SDL_Surface * o_airbase_icon
SDL_Surface * cancel_pact_icon
SDL_Surface * o_wakeup_icon
SDL_Surface * map_icon
SDL_Surface * o_plant_icon
SDL_Surface * o_build_city_icon
SDL_Surface * r_arrow_icon
SDL_Surface * delete_icon
SDL_Surface * log_icon
SDL_Surface * o_load_icon
SDL_Surface * support_icon
SDL_Surface * o_pillage_icon
SDL_Surface * load_icon
SDL_Surface * OCutDownForest_Icon
SDL_Surface * happy_icon
SDL_Surface * prod_icon
SDL_Surface * button
SDL_Surface * block
SDL_Surface * fr_right
SDL_Surface * options_icon
SDL_Surface * buy_prod_icon
SDL_Surface * find_city_icon
SDL_Surface * o_fortress_icon
SDL_Surface * small_cancel_icon
SDL_Surface * o_homecity_icon
SDL_Surface * ok_pact_icon
SDL_Surface * info_icon
SDL_Surface * o_autosett_icon
SDL_Surface * cbox_unsell_icon
SDL_Surface * unlock_icon
SDL_Surface * o_done_icon
SDL_Surface * o_wait_icon
SDL_Surface * new_turn_icon
SDL_Surface * save_icon
SDL_Surface * down_icon
SDL_Surface * right_icon
SDL_Surface * o_fortify_icon
SDL_Surface * o_fallout_icon
SDL_Surface * players_icon
SDL_Surface * o_paradrop_icon
SDL_Surface * o_unload_icon
SDL_Surface * o_autoconnect_icon
SDL_Surface * edit
SDL_Surface * o_road_icon
SDL_Surface * o_sentry_icon
SDL_Surface * o_irrigation_icon
SDL_Surface * o_transform_icon
SDL_Surface * o_pollution_icon
SDL_Surface * order_icon
SDL_Surface * fr_left
SDL_Surface * vertic
SDL_Surface * o_goto_city_icon
SDL_Surface * fr_bottom
SDL_Surface * o_mine_icon
SDL_Surface * o_spy_icon
SDL_Surface * left_icon
SDL_Surface * tech_tree_icon
SDL_Surface * cancel_icon
SDL_Surface * up_icon
SDL_Surface * lock_icon
SDL_Surface * o_autoexp_icon
SDL_Surface * o_goto_icon
SDL_Surface * army_icon
SDL_Surface * FORWARD_Icon
SDL_Surface * OAirLift_Icon
SDL_Surface * OAddCity_Icon
SDL_Surface * o_wonder_icon
SDL_Surface * small_ok_icon
SDL_Surface * o_railroad_icon
SDL_Surface * units_icon
SDL_Surface * units2_icon
SDL_Surface * o_trade_icon
SDL_Surface * cma_icon
SDL_Surface * o_cultivate_icon
SDL_Surface * cbox_sell_icon
SDL_Surface * o_nuke_icon
SDL_Surface * qprod_icon
SDL_Surface * back_icon
SDL_Surface * o_disband_icon
int city_style(struct city *pcity)
Definition style.c:241
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
Definition tilespec.c:6504
struct sprite * get_building_sprite(const struct tileset *t, const struct impr_type *pimprove)
Definition tilespec.c:6494
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum direction8 facing)
Definition tilespec.c:6516
struct sprite * get_sample_city_sprite(const struct tileset *t, int style_idx)
Definition tilespec.c:6547
struct sprite * get_tax_sprite(const struct tileset *t, Output_type_id otype)
Definition tilespec.c:6575
struct sprite * get_citizen_sprite(const struct tileset *t, enum citizen_category type, int citizen_index, const struct city *pcity)
Definition tilespec.c:6437
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)
Definition tilespec.c:6467