Freeciv-3.2
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#include "specenum_gen.h"
54
55#define SPECENUM_NAME fog_style
56/* Fog is automatically appended by the code. */
57#define SPECENUM_VALUE0 FOG_AUTO
58#define SPECENUM_VALUE0NAME "Auto"
59/* A single fog sprite is provided by the tileset (tx.fog). */
60#define SPECENUM_VALUE1 FOG_SPRITE
61#define SPECENUM_VALUE1NAME "Sprite"
62/* No fog, or fog derived from darkness style. */
63#define SPECENUM_VALUE2 FOG_DARKNESS
64#define SPECENUM_VALUE2NAME "Darkness"
65#include "specenum_gen.h"
66
67#define SPECENUM_NAME darkness_style
68/* No darkness sprites are drawn. */
69#define SPECENUM_VALUE0 DARKNESS_NONE
70#define SPECENUM_VALUE0NAME "None"
71/* 1 sprite that is split into 4 parts and treated as a darkness4. Only
72 * works in iso-view. */
73#define SPECENUM_VALUE1 DARKNESS_ISORECT
74#define SPECENUM_VALUE1NAME "IsoRect"
75/* 4 sprites, one per direction. More than one sprite per tile may be
76 * drawn. */
77#define SPECENUM_VALUE2 DARKNESS_CARD_SINGLE
78#define SPECENUM_VALUE2NAME "CardinalSingle"
79/* 15=2^4-1 sprites. A single sprite is drawn, chosen based on whether
80 * there's darkness in _each_ of the cardinal directions. */
81#define SPECENUM_VALUE3 DARKNESS_CARD_FULL
82#define SPECENUM_VALUE3NAME "CardinalFull"
83/* Corner darkness & fog. 3^4 = 81 sprites. */
84#define SPECENUM_VALUE4 DARKNESS_CORNER
85#define SPECENUM_VALUE4NAME "Corner"
86#include "specenum_gen.h"
87
88/* An edge is the border between two tiles. This structure represents one
89 * edge. The tiles are given in the same order as the enumeration name. */
91 EDGE_NS, /* North and south */
92 EDGE_WE, /* West and east */
93 EDGE_UD, /* Up and down (nw/se), for hex_width tilesets */
94 EDGE_LR, /* Left and right (ne/sw), for hex_height tilesets */
96};
97struct tile_edge {
99#define NUM_EDGE_TILES 2
100 const struct tile *tile[NUM_EDGE_TILES];
101};
102
103/* A corner is the endpoint of several edges. At each corner 4 tiles will
104 * meet (3 in hex view). Tiles are in clockwise order NESW. */
106#define NUM_CORNER_TILES 4
107 const struct tile *tile[NUM_CORNER_TILES];
108};
109
111 bool foggable; /* Set to FALSE for sprites that are never fogged. */
112 struct sprite *sprite;
113 int offset_x, offset_y; /* Offset from tile origin */
114};
115
116/* Items on the mapview are drawn in layers. Each entry below represents
117 * one layer. The names are basically arbitrary and just correspond to
118 * groups of elements in fill_sprite_array(). Callers of fill_sprite_array
119 * must call it once for each layer. */
120#define SPECENUM_NAME mapview_layer
121#define SPECENUM_VALUE0 LAYER_BACKGROUND
122#define SPECENUM_VALUE0NAME "Background"
123/* Adjust also TERRAIN_LAYER_COUNT if changing these */
124#define SPECENUM_VALUE1 LAYER_TERRAIN1
125#define SPECENUM_VALUE1NAME "Terrain1"
126#define SPECENUM_VALUE2 LAYER_DARKNESS
127#define SPECENUM_VALUE2NAME "Darkness"
128#define SPECENUM_VALUE3 LAYER_TERRAIN2
129#define SPECENUM_VALUE3NAME "Terrain2"
130#define SPECENUM_VALUE4 LAYER_TERRAIN3
131#define SPECENUM_VALUE4NAME "Terrain3"
132#define SPECENUM_VALUE5 LAYER_WATER
133#define SPECENUM_VALUE5NAME "Water"
134#define SPECENUM_VALUE6 LAYER_ROADS
135#define SPECENUM_VALUE6NAME "Roads"
136#define SPECENUM_VALUE7 LAYER_SPECIAL1
137#define SPECENUM_VALUE7NAME "Special1"
138#define SPECENUM_VALUE8 LAYER_GRID1
139#define SPECENUM_VALUE8NAME "Grid1"
140#define SPECENUM_VALUE9 LAYER_CITY1
141#define SPECENUM_VALUE9NAME "City1"
142#define SPECENUM_VALUE10 LAYER_SPECIAL2
143#define SPECENUM_VALUE10NAME "Special2"
144#define SPECENUM_VALUE11 LAYER_FOG
145#define SPECENUM_VALUE11NAME "Fog"
146#define SPECENUM_VALUE12 LAYER_UNIT
147#define SPECENUM_VALUE12NAME "Unit"
148#define SPECENUM_VALUE13 LAYER_SPECIAL3
149#define SPECENUM_VALUE13NAME "Special3"
150#define SPECENUM_VALUE14 LAYER_CITY2
151#define SPECENUM_VALUE14NAME "City2"
152#define SPECENUM_VALUE15 LAYER_GRID2
153#define SPECENUM_VALUE15NAME "Grid2"
154#define SPECENUM_VALUE16 LAYER_OVERLAYS
155#define SPECENUM_VALUE16NAME "Overlays"
156#define SPECENUM_VALUE17 LAYER_TILELABEL
157#define SPECENUM_VALUE17NAME "TileLabel"
158#define SPECENUM_VALUE18 LAYER_CITYBAR
159#define SPECENUM_VALUE18NAME "CityBar"
160#define SPECENUM_VALUE19 LAYER_FOCUS_UNIT
161#define SPECENUM_VALUE19NAME "FocusUnit"
162#define SPECENUM_VALUE20 LAYER_GOTO
163#define SPECENUM_VALUE20NAME "Goto"
164#define SPECENUM_VALUE21 LAYER_WORKERTASK
165#define SPECENUM_VALUE21NAME "WorkerTask"
166#define SPECENUM_VALUE22 LAYER_EDITOR
167#define SPECENUM_VALUE22NAME "Editor"
168#define SPECENUM_VALUE23 LAYER_INFRAWORK
169#define SPECENUM_VALUE23NAME "InfraWork"
170#define SPECENUM_COUNT LAYER_COUNT
171#include "specenum_gen.h"
172
173#define TERRAIN_LAYER_COUNT 3
174
175#define mapview_layer_iterate(layer) \
176{ \
177 enum mapview_layer layer; \
178 int layer_index; \
179 \
180 for (layer_index = 0; layer_index < LAYER_COUNT; layer_index++) { \
181 layer = tileset_get_layer(tileset, layer_index); \
182
183#define mapview_layer_iterate_end \
184 } \
185}
186
187/* Layer categories can be used to only render part of a tile. */
189{
190 LAYER_CATEGORY_CITY, /* Render cities */
191 LAYER_CATEGORY_TILE, /* Render terrain only */
192 LAYER_CATEGORY_UNIT /* Render units only */
194
195#define NUM_TILES_PROGRESS 8
196
197#define MAX_NUM_CITIZEN_SPRITES 6
198
205
206struct tileset;
207
208extern struct tileset *tileset;
209extern struct tileset *unscaled_tileset;
210
211struct strvec;
212const struct strvec *get_tileset_list(const struct option *poption);
213
214void tileset_error(enum log_level level, const char *tset_name,
215 const char *format, ...);
216
217void tileset_init(struct tileset *t);
218void tileset_free(struct tileset *tileset);
219void tileset_load_tiles(struct tileset *t);
220void tileset_free_tiles(struct tileset *t);
221void tileset_ruleset_reset(struct tileset *t);
222bool tileset_is_fully_loaded(void);
223
224void finish_loading_sprites(struct tileset *t);
225
226bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id,
227 bool global_default);
229 float scale);
231void tilespec_reread_frozen_refresh(const char *tname);
232
235void tileset_setup_unit_type(struct tileset *t, struct unit_type *punittype);
236void tileset_setup_impr_type(struct tileset *t,
237 struct impr_type *pimprove);
238void tileset_setup_tech_type(struct tileset *t,
239 struct advance *padvance);
240void tileset_setup_tile_type(struct tileset *t,
241 const struct terrain *pterrain);
243 const struct resource_type *presource);
244void tileset_setup_extra(struct tileset *t,
245 struct extra_type *pextra);
246void tileset_setup_government(struct tileset *t,
247 struct government *gov);
249 struct nation_type *nation);
250void tileset_setup_city_tiles(struct tileset *t, int style);
251
252void tileset_player_init(struct tileset *t, struct player *pplayer);
253void tileset_background_init(struct tileset *t);
254void tileset_background_free(struct tileset *t);
255
256/* Layer order */
257
258enum mapview_layer tileset_get_layer(const struct tileset *t, int n);
260 enum layer_category cat);
261
262/* Gfx support */
263
264int fill_sprite_array(struct tileset *t,
265 struct drawn_sprite *sprs, enum mapview_layer layer,
266 const struct tile *ptile,
267 const struct tile_edge *pedge,
268 const struct tile_corner *pcorner,
269 const struct unit *punit, const struct city *pcity,
270 const struct city *citymode,
271 const struct unit_type *putype);
273 struct drawn_sprite *sprs,
274 int layer,
275 struct terrain *pterrain);
276
277double get_focus_unit_toggle_timeout(const struct tileset *t);
278void reset_focus_unit_state(struct tileset *t);
279void focus_unit_in_combat(struct tileset *t);
280void toggle_focus_unit_state(struct tileset *t);
281struct unit *get_drawable_unit(const struct tileset *t,
282 struct tile *ptile,
283 const struct city *citymode);
284bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus);
285
286
302
303#define NUM_CURSOR_FRAMES 6
304
311
317
328
338
358
359#define NUM_WALL_TYPES 7
360
361struct sprite *get_spaceship_sprite(const struct tileset *t,
362 enum spaceship_part part);
363struct sprite *get_citizen_sprite(const struct tileset *t,
365 int citizen_index,
366 const struct city *pcity);
367struct sprite *get_city_flag_sprite(const struct tileset *t,
368 const struct city *pcity);
369struct sprite *get_nation_flag_sprite(const struct tileset *t,
370 const struct nation_type *nation);
371struct sprite *get_nation_shield_sprite(const struct tileset *t,
372 const struct nation_type *nation);
373struct sprite *get_tech_sprite(const struct tileset *t, Tech_type_id tech);
374struct sprite *get_building_sprite(const struct tileset *t,
375 const struct impr_type *pimprove);
376struct sprite *get_government_sprite(const struct tileset *t,
377 const struct government *gov);
378struct sprite *get_unittype_sprite(const struct tileset *t,
379 const struct unit_type *punittype,
380 enum unit_activity activity,
381 enum direction8 facing);
382struct sprite *get_sample_city_sprite(const struct tileset *t,
383 int style_idx);
384struct sprite *get_arrow_sprite(const struct tileset *t,
385 enum arrow_type arrow);
386struct sprite *get_tax_sprite(const struct tileset *t, Output_type_id otype);
387struct sprite *get_treaty_thumb_sprite(const struct tileset *t, bool on_off);
388const struct sprite_vector *get_unit_explode_animation(const struct
389 tileset *t);
390struct sprite *get_nuke_explode_sprite(const struct tileset *t);
391struct sprite *get_cursor_sprite(const struct tileset *t,
392 enum cursor_type cursor,
393 int *hot_x, int *hot_y, int frame);
394const struct citybar_sprites *get_citybar_sprites(const struct tileset *t);
395const struct editor_sprites *get_editor_sprites(const struct tileset *t);
396struct sprite *get_icon_sprite(const struct tileset *t, enum icon_type icon);
397struct sprite *get_attention_crosshair_sprite(const struct tileset *t);
398struct sprite *get_indicator_sprite(const struct tileset *t,
399 enum indicator_type indicator,
400 int index);
401struct sprite *get_unit_unhappy_sprite(const struct tileset *t,
402 const struct unit *punit,
403 int happy_cost);
404struct sprite *get_unit_upkeep_sprite(const struct tileset *t,
406 const struct unit *punit,
407 const int *upkeep_cost);
408struct sprite *get_basic_fog_sprite(const struct tileset *t);
409int fill_basic_extra_sprite_array(const struct tileset *t,
410 struct drawn_sprite *sprs,
411 const struct extra_type *pextra);
412struct sprite *get_event_sprite(const struct tileset *t, enum event_type event);
413
415 enum log_level level,
416 const char *tag, const char *alt,
417 const char *alt2,
418 const char *what,
419 const char *name,
420 bool scale);
421
422struct color_system;
423struct color_system *get_color_system(const struct tileset *t);
424
425/* Tileset accessor functions. */
426struct tileset *get_tileset(void);
427const char *tileset_basename(const struct tileset *t);
428bool tileset_is_isometric(const struct tileset *t);
429int tileset_hex_width(const struct tileset *t);
430int tileset_hex_height(const struct tileset *t);
431int tileset_tile_width(const struct tileset *t);
432int tileset_tile_height(const struct tileset *t);
433int tileset_full_tile_width(const struct tileset *t);
434int tileset_full_tile_height(const struct tileset *t);
435int tileset_unit_width(const struct tileset *t);
436int tileset_unit_height(const struct tileset *t);
437int tileset_unit_with_upkeep_height(const struct tileset *t);
439int tileset_unit_layout_offset_y(const struct tileset *t);
441int tileset_small_sprite_width(const struct tileset *t);
442int tileset_small_sprite_height(const struct tileset *t);
443int tileset_citybar_offset_y(const struct tileset *t);
444int tileset_tilelabel_offset_y(const struct tileset *t);
445float tileset_scale(const struct tileset *t);
446const char *tileset_main_intro_filename(const struct tileset *t);
447int tileset_num_city_colors(const struct tileset *t);
448void tileset_use_preferred_theme(const struct tileset *t);
449bool tileset_use_hard_coded_fog(const struct tileset *t);
450
451/* These are used as array index -> can't be changed freely to values
452 bigger than size of those arrays. */
453#define TS_TOPO_SQUARE 0
454#define TS_TOPO_HEX 1
455#define TS_TOPO_ISOHEX 2
456
457const char *tileset_name_get(struct tileset *t);
458const char *tileset_version(struct tileset *t);
459const char *tileset_summary(struct tileset *t);
460const char *tileset_description(struct tileset *t);
461char *tileset_what_ruleset(struct tileset *t);
462int tileset_topo_index(struct tileset *t);
463int tileset_svg_flag_height(struct tileset *t);
464
465int index_ts_topology(int idx);
466
467struct sprite *load_popup_sprite(const char *tag);
468void unload_popup_sprite(const char *tag);
469
470#ifdef __cplusplus
471}
472#endif /* __cplusplus */
473
474#endif /* FC__TILESPEC_H */
#define n
Definition astring.c:77
citizen_category
Definition city.h:267
char * incite_cost
Definition comments.c:75
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
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
enum event_type event
Definition events.c:81
int Tech_type_id
Definition fc_types.h:377
int Specialist_type_id
Definition fc_types.h:375
enum output_type_id Output_type_id
Definition fc_types.h:378
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
log_level
Definition log.h:28
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
struct sprite int int int int struct sprite int int float scale
Definition sprite_g.h:33
Definition city.h:320
struct sprite * food
Definition tilespec.h:332
struct sprite * trade
Definition tilespec.h:333
struct sprite * shields
Definition tilespec.h:330
struct sprite * background
Definition tilespec.h:335
struct sprite * occupied
Definition tilespec.h:334
struct sprite_vector occupancy
Definition tilespec.h:336
struct sprite * sprite
Definition tilespec.h:112
bool foggable
Definition tilespec.h:111
struct sprite * terrain
Definition tilespec.h:347
struct sprite * road
Definition tilespec.h:355
struct sprite * city
Definition tilespec.h:351
struct sprite * terrain_special
Definition tilespec.h:349
struct sprite * vision
Definition tilespec.h:352
struct sprite * terrain_resource
Definition tilespec.h:348
struct sprite * territory
Definition tilespec.h:353
struct sprite * copypaste
Definition tilespec.h:345
struct sprite * brush
Definition tilespec.h:342
struct sprite * startpos
Definition tilespec.h:346
struct sprite * military_base
Definition tilespec.h:356
struct sprite * properties
Definition tilespec.h:354
struct sprite * copy
Definition tilespec.h:343
struct sprite * erase
Definition tilespec.h:340
struct sprite * paste
Definition tilespec.h:344
struct sprite * unit
Definition tilespec.h:350
Definition goto.c:52
enum edge_type type
Definition tilespec.h:98
Definition tile.h:50
Definition unit.h:138
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
Definition tilespec.c:6793
void tileset_load_tiles(struct tileset *t)
Definition tilespec.c:3628
struct tileset * tileset
Definition tilespec.c:567
struct sprite * get_nuke_explode_sprite(const struct tileset *t)
Definition tilespec.c:6929
void tileset_setup_resource(struct tileset *t, const struct resource_type *presource)
int tileset_hex_width(const struct tileset *t)
Definition tilespec.c:721
struct sprite * get_building_sprite(const struct tileset *t, const struct impr_type *pimprove)
Definition tilespec.c:6783
#define NUM_EDGE_TILES
Definition tilespec.h:99
int tileset_unit_width(const struct tileset *t)
Definition tilespec.c:797
struct unit * get_drawable_unit(const struct tileset *t, struct tile *ptile, const struct city *citymode)
Definition tilespec.c:6564
struct sprite * get_attention_crosshair_sprite(const struct tileset *t)
Definition tilespec.c:6990
int tileset_unit_height(const struct tileset *t)
Definition tilespec.c:805
indicator_type
Definition tilespec.h:305
@ INDICATOR_COOLING
Definition tilespec.h:308
@ INDICATOR_WARMING
Definition tilespec.h:307
@ INDICATOR_COUNT
Definition tilespec.h:309
@ INDICATOR_BULB
Definition tilespec.h:306
int tileset_small_sprite_width(const struct tileset *t)
Definition tilespec.c:901
struct sprite * get_nation_shield_sprite(const struct tileset *t, const struct nation_type *nation)
Definition tilespec.c:6765
int tileset_svg_flag_height(struct tileset *t)
Definition tilespec.c:7570
struct tileset * get_tileset(void)
Definition tilespec.c:692
void tileset_setup_government(struct tileset *t, struct government *gov)
Definition tilespec.c:4419
struct sprite * get_city_flag_sprite(const struct tileset *t, const struct city *pcity)
Definition tilespec.c:4469
void tileset_setup_specialist_type_default_set(struct tileset *t, Specialist_type_id id)
Definition tilespec.c:2891
struct sprite * get_basic_fog_sprite(const struct tileset *t)
Definition tilespec.c:7053
int tileset_full_tile_height(const struct tileset *t)
Definition tilespec.c:789
bool tilespec_try_read(const char *tileset_name, bool verbose, int topo_id, bool global_default)
Definition tilespec.c:1296
struct tileset * unscaled_tileset
Definition tilespec.c:568
int fill_basic_extra_sprite_array(const struct tileset *t, struct drawn_sprite *sprs, const struct extra_type *pextra)
Definition tilespec.c:7200
arrow_type
Definition tilespec.h:199
@ ARROW_LAST
Definition tilespec.h:203
@ ARROW_MINUS
Definition tilespec.h:202
@ ARROW_RIGHT
Definition tilespec.h:200
@ ARROW_PLUS
Definition tilespec.h:201
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:7035
const char * tileset_main_intro_filename(const struct tileset *t)
Definition tilespec.c:947
void tileset_setup_tile_type(struct tileset *t, const struct terrain *pterrain)
Definition tilespec.c:4153
void tileset_player_init(struct tileset *t, struct player *pplayer)
Definition tilespec.c:7371
const struct strvec * get_tileset_list(const struct option *poption)
Definition tilespec.c:1103
int tileset_unit_layout_offset_y(const struct tileset *t)
Definition tilespec.c:882
int tileset_citybar_offset_y(const struct tileset *t)
Definition tilespec.c:910
struct sprite * get_treaty_thumb_sprite(const struct tileset *t, bool on_off)
Definition tilespec.c:6909
bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus)
Definition tilespec.c:5511
double get_focus_unit_toggle_timeout(const struct tileset *t)
Definition tilespec.c:6519
void tileset_free_tiles(struct tileset *t)
Definition tilespec.c:6604
void tileset_setup_impr_type(struct tileset *t, struct impr_type *pimprove)
Definition tilespec.c:3840
const struct sprite_vector * get_unit_explode_animation(const struct tileset *t)
Definition tilespec.c:6918
struct sprite * load_popup_sprite(const char *tag)
Definition tilespec.c:7578
void tileset_background_init(struct tileset *t)
Definition tilespec.c:7451
void tileset_setup_tech_type(struct tileset *t, struct advance *padvance)
Definition tilespec.c:3856
void tileset_free(struct tileset *tileset)
Definition tilespec.c:1274
float tileset_scale(const struct tileset *t)
Definition tilespec.c:927
int tileset_unit_with_small_upkeep_height(const struct tileset *t)
Definition tilespec.c:871
bool tileset_layer_in_category(enum mapview_layer layer, enum layer_category cat)
Definition tilespec.c:7328
int tileset_num_city_colors(const struct tileset *t)
Definition tilespec.c:955
int index_ts_topology(int idx)
Definition tilespec.c:1085
#define NUM_CORNER_TILES
Definition tilespec.h:106
bool tileset_is_isometric(const struct tileset *t)
Definition tilespec.c:712
bool tileset_use_hard_coded_fog(const struct tileset *t)
Definition tilespec.c:963
void tileset_use_preferred_theme(const struct tileset *t)
Definition tilespec.c:7069
struct sprite * get_indicator_sprite(const struct tileset *t, enum indicator_type indicator, int index)
Definition tilespec.c:6999
void tileset_setup_city_tiles(struct tileset *t, int style)
Definition tilespec.c:6454
const char * tileset_description(struct tileset *t)
Definition tilespec.c:7546
void tileset_background_free(struct tileset *t)
Definition tilespec.c:7470
int tileset_unit_layout_small_offset_y(const struct tileset *t)
Definition tilespec.c:891
struct sprite * get_event_sprite(const struct tileset *t, enum event_type event)
Definition tilespec.c:6900
void toggle_focus_unit_state(struct tileset *t)
Definition tilespec.c:6551
void tilespec_reread_frozen_refresh(const char *tname)
Definition tilespec.c:1545
int tileset_small_sprite_height(const struct tileset *t)
Definition tilespec.c:937
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *nation)
Definition tilespec.c:6756
void focus_unit_in_combat(struct tileset *t)
Definition tilespec.c:6540
const char * tileset_summary(struct tileset *t)
Definition tilespec.c:7538
struct sprite * get_icon_sprite(const struct tileset *t, enum icon_type icon)
Definition tilespec.c:6979
struct sprite * get_sample_city_sprite(const struct tileset *t, int style_idx)
Definition tilespec.c:6851
void tileset_setup_extra(struct tileset *t, struct extra_type *pextra)
Definition tilespec.c:3875
void tileset_init(struct tileset *t)
Definition tilespec.c:7126
const char * tileset_basename(const struct tileset *t)
Definition tilespec.c:704
int fill_basic_terrain_layer_sprite_array(struct tileset *t, struct drawn_sprite *sprs, int layer, struct terrain *pterrain)
Definition tilespec.c:7167
int tileset_tile_height(const struct tileset *t)
Definition tilespec.c:765
struct sprite * get_spaceship_sprite(const struct tileset *t, enum spaceship_part part)
Definition tilespec.c:6691
int tileset_unit_with_upkeep_height(const struct tileset *t)
Definition tilespec.c:859
struct sprite * get_cursor_sprite(const struct tileset *t, enum cursor_type cursor, int *hot_x, int *hot_y, int frame)
Definition tilespec.c:6960
struct color_system * get_color_system(const struct tileset *t)
Definition tilespec.c:7061
int tileset_hex_height(const struct tileset *t)
Definition tilespec.c:730
void reset_focus_unit_state(struct tileset *t)
Definition tilespec.c:6532
bool tileset_is_fully_loaded(void)
Definition tilespec.c:7514
void tileset_setup_unit_type(struct tileset *t, struct unit_type *punittype)
Definition tilespec.c:3806
const struct citybar_sprites * get_citybar_sprites(const struct tileset *t)
Definition tilespec.c:6937
void unload_popup_sprite(const char *tag)
Definition tilespec.c:7586
struct sprite * get_arrow_sprite(const struct tileset *t, enum arrow_type arrow)
Definition tilespec.c:6868
struct sprite * get_unit_unhappy_sprite(const struct tileset *t, const struct unit *punit, int happy_cost)
Definition tilespec.c:7016
layer_category
Definition tilespec.h:189
@ LAYER_CATEGORY_TILE
Definition tilespec.h:191
@ LAYER_CATEGORY_CITY
Definition tilespec.h:190
@ LAYER_CATEGORY_UNIT
Definition tilespec.h:192
void finish_loading_sprites(struct tileset *t)
Definition tilespec.c:3612
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:3639
void tilespec_reread_callback(struct option *poption)
Definition tilespec.c:1509
const char * tileset_name_get(struct tileset *t)
Definition tilespec.c:7522
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:5813
int tileset_full_tile_width(const struct tileset *t)
Definition tilespec.c:776
struct sprite * get_tax_sprite(const struct tileset *t, Output_type_id otype)
Definition tilespec.c:6879
icon_type
Definition tilespec.h:312
@ ICON_CITYDLG
Definition tilespec.h:314
@ ICON_FREECIV
Definition tilespec.h:313
@ ICON_COUNT
Definition tilespec.h:315
struct sprite * get_citizen_sprite(const struct tileset *t, enum citizen_category type, int citizen_index, const struct city *pcity)
Definition tilespec.c:6722
const char * tileset_version(struct tileset *t)
Definition tilespec.c:7530
edge_type
Definition tilespec.h:90
@ EDGE_WE
Definition tilespec.h:92
@ EDGE_UD
Definition tilespec.h:93
@ EDGE_LR
Definition tilespec.h:94
@ EDGE_NS
Definition tilespec.h:91
@ EDGE_COUNT
Definition tilespec.h:95
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum unit_activity activity, enum direction8 facing)
Definition tilespec.c:6805
char * tileset_what_ruleset(struct tileset *t)
Definition tilespec.c:7554
spaceship_part
Definition tilespec.h:318
@ SPACESHIP_STRUCTURAL
Definition tilespec.h:322
@ SPACESHIP_HABITATION
Definition tilespec.h:321
@ SPACESHIP_COUNT
Definition tilespec.h:326
@ SPACESHIP_EXHAUST
Definition tilespec.h:325
@ SPACESHIP_FUEL
Definition tilespec.h:323
@ SPACESHIP_PROPULSION
Definition tilespec.h:324
@ SPACESHIP_SOLAR_PANEL
Definition tilespec.h:319
@ SPACESHIP_LIFE_SUPPORT
Definition tilespec.h:320
bool tilespec_reread(const char *tileset_name, bool game_fully_initialized, float scale)
Definition tilespec.c:1355
int tileset_tile_width(const struct tileset *t)
Definition tilespec.c:753
int tileset_tilelabel_offset_y(const struct tileset *t)
Definition tilespec.c:919
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)
Definition tilespec.c:6774
void tileset_error(enum log_level level, const char *tset_name, const char *format,...)
Definition tilespec.c:624
const struct editor_sprites * get_editor_sprites(const struct tileset *t)
Definition tilespec.c:6949
cursor_type
Definition tilespec.h:287
@ CURSOR_TELEPORT
Definition tilespec.h:291
@ CURSOR_GOTO
Definition tilespec.h:288
@ CURSOR_INVALID
Definition tilespec.h:294
@ CURSOR_PATROL
Definition tilespec.h:289
@ CURSOR_WAIT
Definition tilespec.h:298
@ CURSOR_EDIT_ADD
Definition tilespec.h:297
@ CURSOR_SELECT
Definition tilespec.h:293
@ CURSOR_DEFAULT
Definition tilespec.h:300
@ CURSOR_PARADROP
Definition tilespec.h:290
@ CURSOR_LAST
Definition tilespec.h:299
@ CURSOR_NUKE
Definition tilespec.h:292
@ CURSOR_ATTACK
Definition tilespec.h:295
@ CURSOR_EDIT_PAINT
Definition tilespec.h:296
int tileset_topo_index(struct tileset *t)
Definition tilespec.c:7562
void tileset_setup_nation_flag(struct tileset *t, struct nation_type *nation)
Definition tilespec.c:4434
void tileset_ruleset_reset(struct tileset *t)
Definition tilespec.c:7486
enum mapview_layer tileset_get_layer(const struct tileset *t, int n)
Definition tilespec.c:7319