Freeciv-3.3: /fast/freeciv/nightly/main/client/tilespec.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
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 Reading and using the tilespec files, which describe
16 the files and contents of tilesets.
17***********************************************************************/
18#ifndef FC__TILESPEC_H
19#define FC__TILESPEC_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif /* __cplusplus */
24
25/* utility */
26#include "log.h" /* enum log_level */
27
28/* common */
29#include "city.h" /* enum citizen_category */
30#include "fc_types.h"
31
32/* client */
33#include "options.h"
34
35struct sprite; /* opaque; gui-dep */
36
37struct base_type;
38struct resource_type;
39
40/* Create the sprite_vector type. */
41#define SPECVEC_TAG sprite
42#define SPECVEC_TYPE struct sprite *
43#include "specvec.h"
44#define sprite_vector_iterate(sprite_vec, psprite) \
45 TYPED_VECTOR_ITERATE(struct sprite *, sprite_vec, psprite)
46#define sprite_vector_iterate_end VECTOR_ITERATE_END
47
48#define SPECENUM_NAME ts_type
49#define SPECENUM_VALUE0 TS_OVERHEAD
50#define SPECENUM_VALUE0NAME N_("Overhead")
51#define SPECENUM_VALUE1 TS_ISOMETRIC
52#define SPECENUM_VALUE1NAME N_("Isometric")
53#define SPECENUM_VALUE2 TS_3D
54#define SPECENUM_VALUE2NAME N_("3D")
55#include "specenum_gen.h"
56
57#define SPECENUM_NAME fog_style
58/* Fog is automatically appended by the code. */
59#define SPECENUM_VALUE0 FOG_AUTO
60#define SPECENUM_VALUE0NAME "Auto"
61/* A single fog sprite is provided by the tileset (tx.fog). */
62#define SPECENUM_VALUE1 FOG_SPRITE
63#define SPECENUM_VALUE1NAME "Sprite"
64/* No fog, or fog derived from darkness style. */
65#define SPECENUM_VALUE2 FOG_DARKNESS
66#define SPECENUM_VALUE2NAME "Darkness"
67#include "specenum_gen.h"
68
69#define SPECENUM_NAME darkness_style
70/* No darkness sprites are drawn. */
71#define SPECENUM_VALUE0 DARKNESS_NONE
72#define SPECENUM_VALUE0NAME "None"
73/* 1 sprite that is split into 4 parts and treated as a darkness4. Only
74 * works in iso-view. */
75#define SPECENUM_VALUE1 DARKNESS_ISORECT
76#define SPECENUM_VALUE1NAME "IsoRect"
77/* 4 sprites, one per direction. More than one sprite per tile may be
78 * drawn. */
79#define SPECENUM_VALUE2 DARKNESS_CARD_SINGLE
80#define SPECENUM_VALUE2NAME "CardinalSingle"
81/* 15=2^4-1 sprites. A single sprite is drawn, chosen based on whether
82 * there's darkness in _each_ of the cardinal directions. */
83#define SPECENUM_VALUE3 DARKNESS_CARD_FULL
84#define SPECENUM_VALUE3NAME "CardinalFull"
85/* Corner darkness & fog. 3^4 = 81 sprites. */
86#define SPECENUM_VALUE4 DARKNESS_CORNER
87#define SPECENUM_VALUE4NAME "Corner"
88#include "specenum_gen.h"
89
90/* An edge is the border between two tiles. This structure represents one
91 * edge. The tiles are given in the same order as the enumeration name. */
92 enum edge_type {
93 EDGE_NS, /* North and south */
94 EDGE_WE, /* West and east */
95 EDGE_UD, /* Up and down (nw/se), for hex_width tilesets */
96 EDGE_LR, /* Left and right (ne/sw), for hex_height tilesets */
97 EDGE_COUNT
98};
99 struct tile_edge {
100 enum edge_type type;
101#define NUM_EDGE_TILES 2
102 const struct tile *tile[NUM_EDGE_TILES];
103};
104
105/* A corner is the endpoint of several edges. At each corner 4 tiles will
106 * meet (3 in hex view). Tiles are in clockwise order NESW. */
107 struct tile_corner {
108#define NUM_CORNER_TILES 4
109 const struct tile *tile[NUM_CORNER_TILES];
110};
111
112 struct drawn_sprite {
113 bool foggable; /* Set to FALSE for sprites that are never fogged. */
114 struct sprite *sprite;
115 int offset_x, offset_y; /* Offset from tile origin */
116};
117
118/* Items on the mapview are drawn in layers. Each entry below represents
119 * one layer. The names are basically arbitrary and just correspond to
120 * groups of elements in fill_sprite_array(). Callers of fill_sprite_array
121 * must call it once for each layer. */
122#define SPECENUM_NAME mapview_layer
123#define SPECENUM_VALUE0 LAYER_BACKGROUND
124#define SPECENUM_VALUE0NAME "Background"
125/* Adjust also TERRAIN_LAYER_COUNT if changing these */
126#define SPECENUM_VALUE1 LAYER_TERRAIN1
127#define SPECENUM_VALUE1NAME "Terrain1"
128#define SPECENUM_VALUE2 LAYER_DARKNESS
129#define SPECENUM_VALUE2NAME "Darkness"
130#define SPECENUM_VALUE3 LAYER_TERRAIN2
131#define SPECENUM_VALUE3NAME "Terrain2"
132#define SPECENUM_VALUE4 LAYER_TERRAIN3
133#define SPECENUM_VALUE4NAME "Terrain3"
134#define SPECENUM_VALUE5 LAYER_WATER
135#define SPECENUM_VALUE5NAME "Water"
136#define SPECENUM_VALUE6 LAYER_ROADS
137#define SPECENUM_VALUE6NAME "Roads"
138#define SPECENUM_VALUE7 LAYER_SPECIAL1
139#define SPECENUM_VALUE7NAME "Special1"
140#define SPECENUM_VALUE8 LAYER_GRID1
141#define SPECENUM_VALUE8NAME "Grid1"
142#define SPECENUM_VALUE9 LAYER_CITY1
143#define SPECENUM_VALUE9NAME "City1"
144#define SPECENUM_VALUE10 LAYER_SPECIAL2
145#define SPECENUM_VALUE10NAME "Special2"
146#define SPECENUM_VALUE11 LAYER_FOG
147#define SPECENUM_VALUE11NAME "Fog"
148#define SPECENUM_VALUE12 LAYER_UNIT
149#define SPECENUM_VALUE12NAME "Unit"
150#define SPECENUM_VALUE13 LAYER_SPECIAL3
151#define SPECENUM_VALUE13NAME "Special3"
152#define SPECENUM_VALUE14 LAYER_CITY2
153#define SPECENUM_VALUE14NAME "City2"
154#define SPECENUM_VALUE15 LAYER_GRID2
155#define SPECENUM_VALUE15NAME "Grid2"
156#define SPECENUM_VALUE16 LAYER_OVERLAYS
157#define SPECENUM_VALUE16NAME "Overlays"
158#define SPECENUM_VALUE17 LAYER_TILELABEL
159#define SPECENUM_VALUE17NAME "TileLabel"
160#define SPECENUM_VALUE18 LAYER_CITYBAR
161#define SPECENUM_VALUE18NAME "CityBar"
162#define SPECENUM_VALUE19 LAYER_FOCUS_UNIT
163#define SPECENUM_VALUE19NAME "FocusUnit"
164#define SPECENUM_VALUE20 LAYER_GOTO
165#define SPECENUM_VALUE20NAME "Goto"
166#define SPECENUM_VALUE21 LAYER_WORKERTASK
167#define SPECENUM_VALUE21NAME "WorkerTask"
168#define SPECENUM_VALUE22 LAYER_EDITOR
169#define SPECENUM_VALUE22NAME "Editor"
170#define SPECENUM_VALUE23 LAYER_INFRAWORK
171#define SPECENUM_VALUE23NAME "InfraWork"
172#define SPECENUM_COUNT LAYER_COUNT
173#include "specenum_gen.h"
174
175#define TERRAIN_LAYER_COUNT 3
176
177#define mapview_layer_iterate(layer) \
178{ \
179 enum mapview_layer layer; \
180 int layer_index; \
181 \
182 for (layer_index = 0; layer_index < LAYER_COUNT; layer_index++) { \
183 layer = tileset_get_layer(tileset, layer_index); \
184
185#define mapview_layer_iterate_end \
186 } \
187}
188
189/* Layer categories can be used to only render part of a tile. */
190 enum layer_category
191{
192 LAYER_CATEGORY_CITY, /* Render cities */
193 LAYER_CATEGORY_TILE, /* Render terrain only */
194 LAYER_CATEGORY_UNIT /* Render units only */
195};
196
197#define NUM_TILES_PROGRESS 8
198
199#define MAX_NUM_CITIZEN_SPRITES 6
200
201 enum arrow_type {
202 ARROW_RIGHT,
203 ARROW_PLUS,
204 ARROW_MINUS,
205 ARROW_LAST
206};
207
208struct tileset;
209
210extern struct tileset *tileset;
211extern struct tileset *unscaled_tileset;
212
213struct strvec;
214const struct strvec *get_tileset_list(const struct option *poption);
215
216void tileset_error(enum log_level level, const char *tset_name,
217 const char *format, ...);
218
219void tileset_init(struct tileset *t);
220void tileset_free(struct tileset *tileset);
221void tileset_load_tiles(struct tileset *t);
222void tileset_free_tiles(struct tileset *t);
223void tileset_ruleset_reset(struct tileset *t);
224bool tileset_is_fully_loaded(void);
225
226void finish_loading_sprites(struct tileset *t);
227
228bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id,
229 bool global_default);
230bool tilespec_reread(const char *tileset_name, bool game_fully_initialized,
231 float scale);
232void tilespec_reread_callback(struct option *poption);
233void tilespec_reread_frozen_refresh(const char *tname);
234
235void tileset_setup_specialist_type_default_set(struct tileset *t,
236 Specialist_type_id id);
237void tileset_setup_unit_type(struct tileset *t, struct unit_type *punittype);
238void tileset_setup_impr_type(struct tileset *t,
239 struct impr_type *pimprove);
240void tileset_setup_tech_type(struct tileset *t,
241 struct advance *padvance);
242void tileset_setup_tile_type(struct tileset *t,
243 const struct terrain *pterrain);
244 void tileset_setup_resource(struct tileset *t,
245 const struct resource_type *presource);
246void tileset_setup_extra(struct tileset *t,
247 struct extra_type *pextra);
248void tileset_setup_government(struct tileset *t,
249 struct government *gov);
250void tileset_setup_nation_flag(struct tileset *t,
251 struct nation_type *nation);
252void tileset_setup_city_tiles(struct tileset *t, int style);
253
254void tileset_player_init(struct tileset *t, struct player *pplayer);
255void tileset_background_init(struct tileset *t);
256void tileset_background_free(struct tileset *t);
257
258/* Layer order */
259
260enum mapview_layer tileset_get_layer(const struct tileset *t, int n);
261bool tileset_layer_in_category(enum mapview_layer layer,
262 enum layer_category cat);
263
264/* Gfx support */
265
266int fill_sprite_array(struct tileset *t,
267 struct drawn_sprite *sprs, enum mapview_layer layer,
268 const struct tile *ptile,
269 const struct tile_edge *pedge,
270 const struct tile_corner *pcorner,
271 const struct unit *punit, const struct city *pcity,
272 const struct city *citymode,
273 const struct unit_type *putype);
274int fill_basic_terrain_layer_sprite_array(struct tileset *t,
275 struct drawn_sprite *sprs,
276 int layer,
277 struct terrain *pterrain);
278
279double get_focus_unit_toggle_timeout(const struct tileset *t);
280void reset_focus_unit_state(struct tileset *t);
281void focus_unit_in_combat(struct tileset *t);
282void toggle_focus_unit_state(struct tileset *t);
283struct unit *get_drawable_unit(const struct tileset *t,
284 struct tile *ptile,
285 const struct city *citymode);
286bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus);
287
288
289 enum cursor_type {
290 CURSOR_GOTO,
291 CURSOR_PATROL,
292 CURSOR_PARADROP,
293 CURSOR_TELEPORT,
294 CURSOR_NUKE,
295 CURSOR_SELECT,
296 CURSOR_INVALID,
297 CURSOR_ATTACK,
298 CURSOR_EDIT_PAINT,
299 CURSOR_EDIT_ADD,
300 CURSOR_WAIT,
301 CURSOR_LAST,
302 CURSOR_DEFAULT,
303};
304
305#define NUM_CURSOR_FRAMES 6
306
307 enum indicator_type {
308 INDICATOR_BULB,
309 INDICATOR_WARMING,
310 INDICATOR_COOLING,
311 INDICATOR_COUNT
312};
313
314 enum icon_type {
315 ICON_FREECIV,
316 ICON_CITYDLG,
317 ICON_COUNT
318};
319
320 enum spaceship_part {
321 SPACESHIP_SOLAR_PANEL,
322 SPACESHIP_LIFE_SUPPORT,
323 SPACESHIP_HABITATION,
324 SPACESHIP_STRUCTURAL,
325 SPACESHIP_FUEL,
326 SPACESHIP_PROPULSION,
327 SPACESHIP_EXHAUST,
328 SPACESHIP_COUNT
329};
330
331 struct citybar_sprites {
332 struct sprite
333 *shields,
334 *food,
335 *trade,
336 *occupied,
337 *background;
338 struct sprite_vector occupancy;
339};
340
341 struct editor_sprites {
342 struct sprite
343 *erase,
344 *brush,
345 *copy,
346 *paste,
347 *copypaste,
348 *startpos,
349 *terrain,
350 *terrain_resource,
351 *terrain_special,
352 *unit,
353 *city,
354 *vision,
355 *territory,
356 *properties,
357 *road,
358 *military_base;
359};
360
361#define NUM_WALL_TYPES 7
362
363struct sprite *get_spaceship_sprite(const struct tileset *t,
364 enum spaceship_part part);
365struct sprite *get_citizen_sprite(const struct tileset *t,
366 enum citizen_category type,
367 int citizen_index,
368 const struct city *pcity);
369struct sprite *get_city_flag_sprite(const struct tileset *t,
370 const struct city *pcity);
371struct sprite *get_nation_flag_sprite(const struct tileset *t,
372 const struct nation_type *nation);
373struct sprite *get_nation_shield_sprite(const struct tileset *t,
374 const struct nation_type *nation);
375struct sprite *get_tech_sprite(const struct tileset *t, Tech_type_id tech);
376struct sprite *get_building_sprite(const struct tileset *t,
377 const struct impr_type *pimprove);
378struct sprite *get_government_sprite(const struct tileset *t,
379 const struct government *gov);
380struct sprite *get_unittype_sprite(const struct tileset *t,
381 const struct unit_type *punittype,
382 enum unit_activity activity,
383 enum direction8 facing);
384struct sprite *get_sample_city_sprite(const struct tileset *t,
385 int style_idx);
386struct sprite *get_arrow_sprite(const struct tileset *t,
387 enum arrow_type arrow);
388struct sprite *get_tax_sprite(const struct tileset *t, Output_type_id otype);
389struct sprite *get_treaty_thumb_sprite(const struct tileset *t, bool on_off);
390const struct sprite_vector *get_unit_explode_animation(const struct
391 tileset *t);
392struct sprite *get_nuke_explode_sprite(const struct tileset *t);
393struct sprite *get_cursor_sprite(const struct tileset *t,
394 enum cursor_type cursor,
395 int *hot_x, int *hot_y, int frame);
396const struct citybar_sprites *get_citybar_sprites(const struct tileset *t);
397const struct editor_sprites *get_editor_sprites(const struct tileset *t);
398struct sprite *get_icon_sprite(const struct tileset *t, enum icon_type icon);
399struct sprite *get_attention_crosshair_sprite(const struct tileset *t);
400struct sprite *get_indicator_sprite(const struct tileset *t,
401 enum indicator_type indicator,
402 int index);
403struct sprite *get_unit_unhappy_sprite(const struct tileset *t,
404 const struct unit *punit,
405 int happy_cost);
406struct sprite *get_unit_upkeep_sprite(const struct tileset *t,
407 Output_type_id otype,
408 const struct unit *punit,
409 const int *upkeep_cost);
410struct sprite *get_basic_fog_sprite(const struct tileset *t);
411int fill_basic_extra_sprite_array(const struct tileset *t,
412 struct drawn_sprite *sprs,
413 const struct extra_type *pextra);
414struct sprite *get_event_sprite(const struct tileset *t, enum event_type event);
415
416struct sprite *tiles_lookup_sprite_tag_alt(struct tileset *t,
417 enum log_level level,
418 const char *tag, const char *alt,
419 const char *alt2,
420 const char *what,
421 const char *name,
422 bool scale);
423
424struct color_system;
425struct color_system *get_color_system(const struct tileset *t);
426
427/* Tileset accessor functions. */
428struct tileset *get_tileset(void);
429const char *tileset_basename(const struct tileset *t);
430bool tileset_is_isometric(const struct tileset *t);
431int tileset_hex_width(const struct tileset *t);
432int tileset_hex_height(const struct tileset *t);
433int tileset_tile_width(const struct tileset *t);
434int tileset_tile_height(const struct tileset *t);
435int tileset_full_tile_width(const struct tileset *t);
436int tileset_full_tile_height(const struct tileset *t);
437int tileset_unit_width(const struct tileset *t);
438int tileset_unit_height(const struct tileset *t);
439int tileset_unit_with_upkeep_height(const struct tileset *t);
440int tileset_unit_with_small_upkeep_height(const struct tileset *t);
441int tileset_unit_layout_offset_y(const struct tileset *t);
442int tileset_unit_layout_small_offset_y(const struct tileset *t);
443int tileset_small_sprite_width(const struct tileset *t);
444int tileset_small_sprite_height(const struct tileset *t);
445int tileset_citybar_offset_y(const struct tileset *t);
446int tileset_tilelabel_offset_y(const struct tileset *t);
447float tileset_scale(const struct tileset *t);
448const char *tileset_main_intro_filename(const struct tileset *t);
449int tileset_num_city_colors(const struct tileset *t);
450void tileset_use_preferred_theme(const struct tileset *t);
451bool tileset_use_hard_coded_fog(const struct tileset *t);
452
453/* These are used as array index -> can't be changed freely to values
454 bigger than size of those arrays. */
455#define TS_TOPO_SQUARE 0
456#define TS_TOPO_HEX 1
457#define TS_TOPO_ISOHEX 2
458
459const char *tileset_name_get(struct tileset *t);
460const char *tileset_version(struct tileset *t);
461const char *tileset_summary(struct tileset *t);
462const char *tileset_description(struct tileset *t);
463char *tileset_what_ruleset(struct tileset *t);
464int tileset_topo_index(struct tileset *t);
465int tileset_svg_flag_height(struct tileset *t);
466
467int index_ts_topology(int idx);
468
469struct sprite *load_popup_sprite(const char *tag);
470void unload_popup_sprite(const char *tag);
471
472#ifdef __cplusplus
473}
474#endif /* __cplusplus */
475
476#endif /* FC__TILESPEC_H */
n
#define n
Definition astring.c:77
city.h
citizen_category
citizen_category
Definition city.h:267
incite_cost
char * incite_cost
Definition comments.c:74
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
tset_name
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction bool const char * tset_name
Definition dialogs_g.h:86
event
enum event_type event
Definition events.c:81
fc_types.h
Tech_type_id
int Tech_type_id
Definition fc_types.h:381
Specialist_type_id
int Specialist_type_id
Definition fc_types.h:379
Output_type_id
enum output_type_id Output_type_id
Definition fc_types.h:382
type
GType type
Definition repodlgs.c:1313
name
const char * name
Definition inputfile.c:127
log.h
log_level
log_level
Definition log.h:28
options.h
level
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
specenum_gen.h
specvec.h
scale
struct sprite int int int int struct sprite int int float scale
Definition sprite_g.h:33
advance
Definition tech.h:124
base_type
Definition base.h:41
city
Definition city.h:320
citybar_sprites
Definition tilespec.h:331
citybar_sprites::food
struct sprite * food
Definition tilespec.h:334
citybar_sprites::trade
struct sprite * trade
Definition tilespec.h:335
citybar_sprites::shields
struct sprite * shields
Definition tilespec.h:332
citybar_sprites::background
struct sprite * background
Definition tilespec.h:337
citybar_sprites::occupied
struct sprite * occupied
Definition tilespec.h:336
citybar_sprites::occupancy
struct sprite_vector occupancy
Definition tilespec.h:338
color_system
Definition colors_common.c:34
drawn_sprite
Definition tilespec.h:112
drawn_sprite::sprite
struct sprite * sprite
Definition tilespec.h:114
drawn_sprite::offset_x
int offset_x
Definition tilespec.h:115
drawn_sprite::offset_y
int offset_y
Definition tilespec.h:115
drawn_sprite::foggable
bool foggable
Definition tilespec.h:113
editor_sprites
Definition tilespec.h:341
editor_sprites::terrain
struct sprite * terrain
Definition tilespec.h:349
editor_sprites::road
struct sprite * road
Definition tilespec.h:357
editor_sprites::city
struct sprite * city
Definition tilespec.h:353
editor_sprites::terrain_special
struct sprite * terrain_special
Definition tilespec.h:351
editor_sprites::vision
struct sprite * vision
Definition tilespec.h:354
editor_sprites::terrain_resource
struct sprite * terrain_resource
Definition tilespec.h:350
editor_sprites::territory
struct sprite * territory
Definition tilespec.h:355
editor_sprites::copypaste
struct sprite * copypaste
Definition tilespec.h:347
editor_sprites::brush
struct sprite * brush
Definition tilespec.h:344
editor_sprites::startpos
struct sprite * startpos
Definition tilespec.h:348
editor_sprites::military_base
struct sprite * military_base
Definition tilespec.h:358
editor_sprites::properties
struct sprite * properties
Definition tilespec.h:356
editor_sprites::copy
struct sprite * copy
Definition tilespec.h:345
editor_sprites::erase
struct sprite * erase
Definition tilespec.h:342
editor_sprites::paste
struct sprite * paste
Definition tilespec.h:346
editor_sprites::unit
struct sprite * unit
Definition tilespec.h:352
extra_type
Definition extras.h:88
government
Definition government.h:52
impr_type
Definition improvement.h:50
nation_type
Definition nation.h:98
option
Definition options.c:514
part
Definition goto.c:52
player
Definition player.h:249
resource_type
Definition terrain.h:48
sprite
Definition sprite.h:22
strvec
Definition string_vector.c:29
terrain
Definition terrain.h:75
tile_corner
Definition tilespec.h:107
tile_edge
Definition tilespec.h:99
tile_edge::type
enum edge_type type
Definition tilespec.h:100
tile
Definition tile.h:50
tileset
Definition tilespec.c:482
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
get_government_sprite
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
Definition tilespec.c:6832
tileset_load_tiles
void tileset_load_tiles(struct tileset *t)
Definition tilespec.c:3662
tileset
struct tileset * tileset
Definition tilespec.c:568
get_nuke_explode_sprite
struct sprite * get_nuke_explode_sprite(const struct tileset *t)
Definition tilespec.c:6968
tileset_setup_resource
void tileset_setup_resource(struct tileset *t, const struct resource_type *presource)
tileset_hex_width
int tileset_hex_width(const struct tileset *t)
Definition tilespec.c:722
get_building_sprite
struct sprite * get_building_sprite(const struct tileset *t, const struct impr_type *pimprove)
Definition tilespec.c:6822
NUM_EDGE_TILES
#define NUM_EDGE_TILES
Definition tilespec.h:101
tileset_unit_width
int tileset_unit_width(const struct tileset *t)
Definition tilespec.c:798
get_drawable_unit
struct unit * get_drawable_unit(const struct tileset *t, struct tile *ptile, const struct city *citymode)
Definition tilespec.c:6603
get_attention_crosshair_sprite
struct sprite * get_attention_crosshair_sprite(const struct tileset *t)
Definition tilespec.c:7029
tileset_unit_height
int tileset_unit_height(const struct tileset *t)
Definition tilespec.c:806
indicator_type
indicator_type
Definition tilespec.h:307
INDICATOR_COOLING
@ INDICATOR_COOLING
Definition tilespec.h:310
INDICATOR_WARMING
@ INDICATOR_WARMING
Definition tilespec.h:309
INDICATOR_COUNT
@ INDICATOR_COUNT
Definition tilespec.h:311
INDICATOR_BULB
@ INDICATOR_BULB
Definition tilespec.h:308
tileset_small_sprite_width
int tileset_small_sprite_width(const struct tileset *t)
Definition tilespec.c:902
get_nation_shield_sprite
struct sprite * get_nation_shield_sprite(const struct tileset *t, const struct nation_type *nation)
Definition tilespec.c:6804
tileset_svg_flag_height
int tileset_svg_flag_height(struct tileset *t)
Definition tilespec.c:7613
get_tileset
struct tileset * get_tileset(void)
Definition tilespec.c:693
tileset_setup_government
void tileset_setup_government(struct tileset *t, struct government *gov)
Definition tilespec.c:4453
get_city_flag_sprite
struct sprite * get_city_flag_sprite(const struct tileset *t, const struct city *pcity)
Definition tilespec.c:4503
tileset_setup_specialist_type_default_set
void tileset_setup_specialist_type_default_set(struct tileset *t, Specialist_type_id id)
Definition tilespec.c:2924
get_basic_fog_sprite
struct sprite * get_basic_fog_sprite(const struct tileset *t)
Definition tilespec.c:7092
tileset_full_tile_height
int tileset_full_tile_height(const struct tileset *t)
Definition tilespec.c:790
tilespec_try_read
bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id, bool global_default)
Definition tilespec.c:1335
unscaled_tileset
struct tileset * unscaled_tileset
Definition tilespec.c:569
fill_basic_extra_sprite_array
int fill_basic_extra_sprite_array(const struct tileset *t, struct drawn_sprite *sprs, const struct extra_type *pextra)
Definition tilespec.c:7243
arrow_type
arrow_type
Definition tilespec.h:201
ARROW_LAST
@ ARROW_LAST
Definition tilespec.h:205
ARROW_MINUS
@ ARROW_MINUS
Definition tilespec.h:204
ARROW_RIGHT
@ ARROW_RIGHT
Definition tilespec.h:202
ARROW_PLUS
@ ARROW_PLUS
Definition tilespec.h:203
get_unit_upkeep_sprite
struct sprite * get_unit_upkeep_sprite(const struct tileset *t, Output_type_id otype, const struct unit *punit, const int *upkeep_cost)
Definition tilespec.c:7074
tileset_main_intro_filename
const char * tileset_main_intro_filename(const struct tileset *t)
Definition tilespec.c:948
tileset_setup_tile_type
void tileset_setup_tile_type(struct tileset *t, const struct terrain *pterrain)
Definition tilespec.c:4187
tileset_player_init
void tileset_player_init(struct tileset *t, struct player *pplayer)
Definition tilespec.c:7414
get_tileset_list
const struct strvec * get_tileset_list(const struct option *poption)
Definition tilespec.c:1125
tileset_unit_layout_offset_y
int tileset_unit_layout_offset_y(const struct tileset *t)
Definition tilespec.c:883
tileset_citybar_offset_y
int tileset_citybar_offset_y(const struct tileset *t)
Definition tilespec.c:911
get_treaty_thumb_sprite
struct sprite * get_treaty_thumb_sprite(const struct tileset *t, bool on_off)
Definition tilespec.c:6948
unit_drawn_with_city_outline
bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus)
Definition tilespec.c:5547
get_focus_unit_toggle_timeout
double get_focus_unit_toggle_timeout(const struct tileset *t)
Definition tilespec.c:6558
tileset_free_tiles
void tileset_free_tiles(struct tileset *t)
Definition tilespec.c:6643
tileset_setup_impr_type
void tileset_setup_impr_type(struct tileset *t, struct impr_type *pimprove)
Definition tilespec.c:3874
get_unit_explode_animation
const struct sprite_vector * get_unit_explode_animation(const struct tileset *t)
Definition tilespec.c:6957
load_popup_sprite
struct sprite * load_popup_sprite(const char *tag)
Definition tilespec.c:7621
tileset_background_init
void tileset_background_init(struct tileset *t)
Definition tilespec.c:7494
tileset_setup_tech_type
void tileset_setup_tech_type(struct tileset *t, struct advance *padvance)
Definition tilespec.c:3890
tileset_free
void tileset_free(struct tileset *tileset)
Definition tilespec.c:1290
tileset_scale
float tileset_scale(const struct tileset *t)
Definition tilespec.c:928
tileset_unit_with_small_upkeep_height
int tileset_unit_with_small_upkeep_height(const struct tileset *t)
Definition tilespec.c:872
tileset_layer_in_category
bool tileset_layer_in_category(enum mapview_layer layer, enum layer_category cat)
Definition tilespec.c:7371
tileset_num_city_colors
int tileset_num_city_colors(const struct tileset *t)
Definition tilespec.c:956
index_ts_topology
int index_ts_topology(int idx)
Definition tilespec.c:1086
NUM_CORNER_TILES
#define NUM_CORNER_TILES
Definition tilespec.h:108
tileset_is_isometric
bool tileset_is_isometric(const struct tileset *t)
Definition tilespec.c:713
tileset_use_hard_coded_fog
bool tileset_use_hard_coded_fog(const struct tileset *t)
Definition tilespec.c:964
tileset_use_preferred_theme
void tileset_use_preferred_theme(const struct tileset *t)
Definition tilespec.c:7108
get_indicator_sprite
struct sprite * get_indicator_sprite(const struct tileset *t, enum indicator_type indicator, int index)
Definition tilespec.c:7038
tileset_setup_city_tiles
void tileset_setup_city_tiles(struct tileset *t, int style)
Definition tilespec.c:6493
tileset_description
const char * tileset_description(struct tileset *t)
Definition tilespec.c:7589
tileset_background_free
void tileset_background_free(struct tileset *t)
Definition tilespec.c:7513
tileset_unit_layout_small_offset_y
int tileset_unit_layout_small_offset_y(const struct tileset *t)
Definition tilespec.c:892
get_event_sprite
struct sprite * get_event_sprite(const struct tileset *t, enum event_type event)
Definition tilespec.c:6939
toggle_focus_unit_state
void toggle_focus_unit_state(struct tileset *t)
Definition tilespec.c:6590
tilespec_reread_frozen_refresh
void tilespec_reread_frozen_refresh(const char *tname)
Definition tilespec.c:1566
tileset_small_sprite_height
int tileset_small_sprite_height(const struct tileset *t)
Definition tilespec.c:938
get_nation_flag_sprite
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *nation)
Definition tilespec.c:6795
focus_unit_in_combat
void focus_unit_in_combat(struct tileset *t)
Definition tilespec.c:6579
tileset_summary
const char * tileset_summary(struct tileset *t)
Definition tilespec.c:7581
get_icon_sprite
struct sprite * get_icon_sprite(const struct tileset *t, enum icon_type icon)
Definition tilespec.c:7018
get_sample_city_sprite
struct sprite * get_sample_city_sprite(const struct tileset *t, int style_idx)
Definition tilespec.c:6890
tileset_setup_extra
void tileset_setup_extra(struct tileset *t, struct extra_type *pextra)
Definition tilespec.c:3909
tileset_init
void tileset_init(struct tileset *t)
Definition tilespec.c:7169
tileset_basename
const char * tileset_basename(const struct tileset *t)
Definition tilespec.c:705
fill_basic_terrain_layer_sprite_array
int fill_basic_terrain_layer_sprite_array(struct tileset *t, struct drawn_sprite *sprs, int layer, struct terrain *pterrain)
Definition tilespec.c:7210
tileset_tile_height
int tileset_tile_height(const struct tileset *t)
Definition tilespec.c:766
get_spaceship_sprite
struct sprite * get_spaceship_sprite(const struct tileset *t, enum spaceship_part part)
Definition tilespec.c:6730
tileset_unit_with_upkeep_height
int tileset_unit_with_upkeep_height(const struct tileset *t)
Definition tilespec.c:860
get_cursor_sprite
struct sprite * get_cursor_sprite(const struct tileset *t, enum cursor_type cursor, int *hot_x, int *hot_y, int frame)
Definition tilespec.c:6999
get_color_system
struct color_system * get_color_system(const struct tileset *t)
Definition tilespec.c:7100
tileset_hex_height
int tileset_hex_height(const struct tileset *t)
Definition tilespec.c:731
reset_focus_unit_state
void reset_focus_unit_state(struct tileset *t)
Definition tilespec.c:6571
tileset_is_fully_loaded
bool tileset_is_fully_loaded(void)
Definition tilespec.c:7557
tileset_setup_unit_type
void tileset_setup_unit_type(struct tileset *t, struct unit_type *punittype)
Definition tilespec.c:3840
get_citybar_sprites
const struct citybar_sprites * get_citybar_sprites(const struct tileset *t)
Definition tilespec.c:6976
unload_popup_sprite
void unload_popup_sprite(const char *tag)
Definition tilespec.c:7629
get_arrow_sprite
struct sprite * get_arrow_sprite(const struct tileset *t, enum arrow_type arrow)
Definition tilespec.c:6907
get_unit_unhappy_sprite
struct sprite * get_unit_unhappy_sprite(const struct tileset *t, const struct unit *punit, int happy_cost)
Definition tilespec.c:7055
layer_category
layer_category
Definition tilespec.h:191
LAYER_CATEGORY_TILE
@ LAYER_CATEGORY_TILE
Definition tilespec.h:193
LAYER_CATEGORY_CITY
@ LAYER_CATEGORY_CITY
Definition tilespec.h:192
LAYER_CATEGORY_UNIT
@ LAYER_CATEGORY_UNIT
Definition tilespec.h:194
finish_loading_sprites
void finish_loading_sprites(struct tileset *t)
Definition tilespec.c:3646
tiles_lookup_sprite_tag_alt
struct sprite * tiles_lookup_sprite_tag_alt(struct tileset *t, enum log_level level, const char *tag, const char *alt, const char *alt2, const char *what, const char *name, bool scale)
Definition tilespec.c:3673
tilespec_reread_callback
void tilespec_reread_callback(struct option *poption)
Definition tilespec.c:1530
tileset_name_get
const char * tileset_name_get(struct tileset *t)
Definition tilespec.c:7565
fill_sprite_array
int fill_sprite_array(struct tileset *t, struct drawn_sprite *sprs, enum mapview_layer layer, const struct tile *ptile, const struct tile_edge *pedge, const struct tile_corner *pcorner, const struct unit *punit, const struct city *pcity, const struct city *citymode, const struct unit_type *putype)
Definition tilespec.c:5849
tileset_full_tile_width
int tileset_full_tile_width(const struct tileset *t)
Definition tilespec.c:777
get_tax_sprite
struct sprite * get_tax_sprite(const struct tileset *t, Output_type_id otype)
Definition tilespec.c:6918
icon_type
icon_type
Definition tilespec.h:314
ICON_CITYDLG
@ ICON_CITYDLG
Definition tilespec.h:316
ICON_FREECIV
@ ICON_FREECIV
Definition tilespec.h:315
ICON_COUNT
@ ICON_COUNT
Definition tilespec.h:317
get_citizen_sprite
struct sprite * get_citizen_sprite(const struct tileset *t, enum citizen_category type, int citizen_index, const struct city *pcity)
Definition tilespec.c:6761
tileset_version
const char * tileset_version(struct tileset *t)
Definition tilespec.c:7573
edge_type
edge_type
Definition tilespec.h:92
EDGE_WE
@ EDGE_WE
Definition tilespec.h:94
EDGE_UD
@ EDGE_UD
Definition tilespec.h:95
EDGE_LR
@ EDGE_LR
Definition tilespec.h:96
EDGE_NS
@ EDGE_NS
Definition tilespec.h:93
EDGE_COUNT
@ EDGE_COUNT
Definition tilespec.h:97
get_unittype_sprite
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum unit_activity activity, enum direction8 facing)
Definition tilespec.c:6844
tileset_what_ruleset
char * tileset_what_ruleset(struct tileset *t)
Definition tilespec.c:7597
spaceship_part
spaceship_part
Definition tilespec.h:320
SPACESHIP_STRUCTURAL
@ SPACESHIP_STRUCTURAL
Definition tilespec.h:324
SPACESHIP_HABITATION
@ SPACESHIP_HABITATION
Definition tilespec.h:323
SPACESHIP_COUNT
@ SPACESHIP_COUNT
Definition tilespec.h:328
SPACESHIP_EXHAUST
@ SPACESHIP_EXHAUST
Definition tilespec.h:327
SPACESHIP_FUEL
@ SPACESHIP_FUEL
Definition tilespec.h:325
SPACESHIP_PROPULSION
@ SPACESHIP_PROPULSION
Definition tilespec.h:326
SPACESHIP_SOLAR_PANEL
@ SPACESHIP_SOLAR_PANEL
Definition tilespec.h:321
SPACESHIP_LIFE_SUPPORT
@ SPACESHIP_LIFE_SUPPORT
Definition tilespec.h:322
tilespec_reread
bool tilespec_reread(const char *tileset_name, bool game_fully_initialized, float scale)
Definition tilespec.c:1376
tileset_tile_width
int tileset_tile_width(const struct tileset *t)
Definition tilespec.c:754
tileset_tilelabel_offset_y
int tileset_tilelabel_offset_y(const struct tileset *t)
Definition tilespec.c:920
get_tech_sprite
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)
Definition tilespec.c:6813
tileset_error
void tileset_error(enum log_level level, const char *tset_name, const char *format,...)
Definition tilespec.c:625
get_editor_sprites
const struct editor_sprites * get_editor_sprites(const struct tileset *t)
Definition tilespec.c:6988
cursor_type
cursor_type
Definition tilespec.h:289
CURSOR_TELEPORT
@ CURSOR_TELEPORT
Definition tilespec.h:293
CURSOR_GOTO
@ CURSOR_GOTO
Definition tilespec.h:290
CURSOR_INVALID
@ CURSOR_INVALID
Definition tilespec.h:296
CURSOR_PATROL
@ CURSOR_PATROL
Definition tilespec.h:291
CURSOR_WAIT
@ CURSOR_WAIT
Definition tilespec.h:300
CURSOR_EDIT_ADD
@ CURSOR_EDIT_ADD
Definition tilespec.h:299
CURSOR_SELECT
@ CURSOR_SELECT
Definition tilespec.h:295
CURSOR_DEFAULT
@ CURSOR_DEFAULT
Definition tilespec.h:302
CURSOR_PARADROP
@ CURSOR_PARADROP
Definition tilespec.h:292
CURSOR_LAST
@ CURSOR_LAST
Definition tilespec.h:301
CURSOR_NUKE
@ CURSOR_NUKE
Definition tilespec.h:294
CURSOR_ATTACK
@ CURSOR_ATTACK
Definition tilespec.h:297
CURSOR_EDIT_PAINT
@ CURSOR_EDIT_PAINT
Definition tilespec.h:298
tileset_topo_index
int tileset_topo_index(struct tileset *t)
Definition tilespec.c:7605
tileset_setup_nation_flag
void tileset_setup_nation_flag(struct tileset *t, struct nation_type *nation)
Definition tilespec.c:4468
tileset_ruleset_reset
void tileset_ruleset_reset(struct tileset *t)
Definition tilespec.c:7529
tileset_get_layer
enum mapview_layer tileset_get_layer(const struct tileset *t, int n)
Definition tilespec.c:7362