Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/mapview_common.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
mapview_common.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#ifndef FC__MAPVIEW_COMMON_H
15#define FC__MAPVIEW_COMMON_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* utility */
22#include "support.h" /* bool type */
23
24/* common */
25#include "fc_types.h"
26#include "featured_text.h" /* enum text_link_type type */
27#include "map.h"
28
29/* include */
30#include "colors_g.h"
31
32#include "tilespec.h"
33
34struct canvas_store; /* opaque type, real type is gui-dep */
35
36 struct view {
37 float gui_x0, gui_y0;
38 int width, height; /* Size in pixels. */
39 int tile_width, tile_height; /* Size in tiles. Rounded up. */
40 int store_width, store_height;
41 bool can_do_cached_drawing; /* TRUE if cached drawing is possible. */
42 struct canvas *store, *tmp_store;
43};
44
45void mapdeco_init(void);
46void mapdeco_free(void);
47void mapdeco_set_highlight(const struct tile *ptile, bool highlight);
48bool mapdeco_is_highlight_set(const struct tile *ptile);
49void mapdeco_clear_highlights(void);
50void mapdeco_set_crosshair(const struct tile *ptile, bool crosshair);
51bool mapdeco_is_crosshair_set(const struct tile *ptile);
52void mapdeco_clear_crosshairs(void);
53void mapdeco_set_gotoroute(const struct unit *punit);
54void mapdeco_add_gotoline(const struct tile *ptile,
55 enum direction8 dir);
56void mapdeco_remove_gotoline(const struct tile *ptile,
57 enum direction8 dir);
58bool mapdeco_is_gotoline_set(const struct tile *ptile,
59 enum direction8 dir);
60void mapdeco_clear_gotoroutes(void);
61
62struct tile *client_infratile(void);
63void client_infratile_set(struct tile *ptile);
64
65extern struct view mapview;
66
67/* HACK: Callers can set this to FALSE to disable sliding. It should be
68 * reenabled afterwards. */
69extern bool can_slide;
70
71#define BORDER_WIDTH 2
72#define GOTO_WIDTH 2
73
74/*
75 * Iterate over all map tiles that intersect with the given GUI rectangle.
76 * The order of iteration is guaranteed to satisfy the painter's algorithm.
77 * The iteration covers not only tiles but tile edges and corners.
78 *
79 * GRI_x0, GRI_y0: gives the GUI origin of the rectangle.
80 *
81 * GRI_width, GRI_height: gives the GUI width and height of the rectangle.
82 * These values may be negative.
83 *
84 * _t, _e, _c: the tile, edge, or corner that is being iterated, declared
85 * inside the macro. Usually, only one of them will be non-NULL at a time.
86 * These values may be passed directly to fill_sprite_array().
87 *
88 * _x, _y: the canvas position of the current element, declared inside
89 * the macro. Each element is assumed to be tileset_tile_width(tileset) *
90 * tileset_tile_height(tileset) in size. If an element is larger, the
91 * caller needs to use a larger rectangle of iteration.
92 *
93 * The grid of iteration is rather complicated. For a picture of it see
94 * https://files.freeciv.org/dev/newgrid.png
95 * (originally newgrid.png in PR#12085).
96 */
97#define gui_rect_iterate(GRI_x0, GRI_y0, GRI_width, GRI_height, \
98 _t, _e, _c, _zoom) \
99{ \
100 int _x_##_0 = (GRI_x0), _y_##_0 = (GRI_y0); \
101 int _x_##_w = (GRI_width), _y_##_h = (GRI_height); \
102 \
103 if (_x_##_w < 0) { \
104 _x_##_0 += _x_##_w; \
105 _x_##_w = -_x_##_w; \
106 } \
107 if (_y_##_h < 0) { \
108 _y_##_0 += _y_##_h; \
109 _y_##_h = -_y_##_h; \
110 } \
111 if (_x_##_w > 0 && _y_##_h > 0) { \
112 struct tile_edge _t##_e; \
113 struct tile_corner _t##_c; \
114 int _t##_xi, _t##_yi, _t##_si, _t##_di; \
115 const int _t##_r1 = (tileset_is_isometric(tileset) ? 2 : 1); \
116 const int _t##_r2 = _t##_r1 * 2; /* double the ratio */ \
117 const int _t##_w = tileset_tile_width(tileset) * _zoom; \
118 const int _t##_h = tileset_tile_height(tileset) * _zoom; \
119 /* Don't divide by _r2 yet, to avoid integer rounding errors. */ \
120 const int _t##_x0 = DIVIDE(_x_##_0 * _t##_r2, _t##_w) - _t##_r1 / 2;\
121 const int _t##_y0 = DIVIDE(_y_##_0 * _t##_r2, _t##_h) - _t##_r1 / 2;\
122 const int _t##_x1 = DIVIDE((_x_##_0 + _x_##_w) * _t##_r2 + _t##_w - 1,\
123 _t##_w) + _t##_r1; \
124 const int _t##_y1 = DIVIDE((_y_##_0 + _y_##_h) * _t##_r2 + _t##_h - 1,\
125 _t##_h) + _t##_r1; \
126 const int _t##_count = (_t##_x1 - _t##_x0) * (_t##_y1 - _t##_y0); \
127 int _t##_index = 0; \
128 \
129 log_debug("Iterating over %d-%d x %d-%d rectangle.", \
130 _t##_x1, _t##_x0, _t##_y1, _t##_y0); \
131 for (; _t##_index < _t##_count; _t##_index++) { \
132 struct tile *_t = NULL; \
133 struct tile_edge *_e = NULL; \
134 struct tile_corner *_c = NULL; \
135 \
136 _t##_xi = _t##_x0 + (_t##_index % (_t##_x1 - _t##_x0)); \
137 _t##_yi = _t##_y0 + (_t##_index / (_t##_x1 - _t##_x0)); \
138 _t##_si = _t##_xi + _t##_yi; \
139 _t##_di = _t##_yi - _t##_xi; \
140 if (2 == _t##_r1 /*tileset_is_isometric(tileset)*/) { \
141 if ((_t##_xi + _t##_yi) % 2 != 0) { \
142 continue; \
143 } \
144 if (_t##_xi % 2 == 0 && _t##_yi % 2 == 0) { \
145 if ((_t##_xi + _t##_yi) % 4 == 0) { \
146 /* Tile */ \
147 _t = map_pos_to_tile(&(wld.map), _t##_si / 4 - 1, _t##_di / 4); \
148 } else { \
149 /* Corner */ \
150 _c = &_t##_c; \
151 _c->tile[0] = map_pos_to_tile(&(wld.map), (_t##_si - 6) / 4, \
152 (_t##_di - 2) / 4); \
153 _c->tile[1] = map_pos_to_tile(&(wld.map), (_t##_si - 2) / 4, \
154 (_t##_di - 2) / 4); \
155 _c->tile[2] = map_pos_to_tile(&(wld.map), (_t##_si - 2) / 4, \
156 (_t##_di + 2) / 4); \
157 _c->tile[3] = map_pos_to_tile(&(wld.map), (_t##_si - 6) / 4, \
158 (_t##_di + 2) / 4); \
159 if (tileset_hex_width(tileset) > 0) { \
160 _e = &_t##_e; \
161 _e->type = EDGE_UD; \
162 _e->tile[0] = _c->tile[0]; \
163 _e->tile[1] = _c->tile[2]; \
164 } else if (tileset_hex_height(tileset) > 0) { \
165 _e = &_t##_e; \
166 _e->type = EDGE_LR; \
167 _e->tile[0] = _c->tile[1]; \
168 _e->tile[1] = _c->tile[3]; \
169 } \
170 } \
171 } else { \
172 /* Edge. */ \
173 _e = &_t##_e; \
174 if (_t##_si % 4 == 0) { \
175 _e->type = EDGE_NS; \
176 _e->tile[0] = map_pos_to_tile(&(wld.map), (_t##_si - 4) / 4, \
177 (_t##_di - 2) / 4); /*N*/ \
178 _e->tile[1] = map_pos_to_tile(&(wld.map), (_t##_si - 4) / 4, \
179 (_t##_di + 2) / 4); /*S*/ \
180 } else { \
181 _e->type = EDGE_WE; \
182 _e->tile[0] = map_pos_to_tile(&(wld.map), (_t##_si - 6) / 4, \
183 _t##_di / 4); /*W*/ \
184 _e->tile[1] = map_pos_to_tile(&(wld.map), (_t##_si - 2) / 4, \
185 _t##_di / 4); /*E*/ \
186 } \
187 } \
188 } else { \
189 if (_t##_si % 2 == 0) { \
190 if (_t##_xi % 2 == 0) { \
191 /* Corner. */ \
192 _c = &_t##_c; \
193 _c->tile[0] = map_pos_to_tile(&(wld.map), _t##_xi / 2 - 1, \
194 _t##_yi / 2 - 1); /*NW*/ \
195 _c->tile[1] = map_pos_to_tile(&(wld.map), _t##_xi / 2, \
196 _t##_yi / 2 - 1); /*NE*/ \
197 _c->tile[2] = map_pos_to_tile(&(wld.map), _t##_xi / 2, \
198 _t##_yi / 2); /*SE*/ \
199 _c->tile[3] = map_pos_to_tile(&(wld.map), _t##_xi / 2 - 1, \
200 _t##_yi / 2); /*SW*/ \
201 } else { \
202 /* Tile. */ \
203 _t = map_pos_to_tile(&(wld.map), (_t##_xi - 1) / 2, \
204 (_t##_yi - 1) / 2); \
205 } \
206 } else { \
207 /* Edge. */ \
208 _e = &_t##_e; \
209 if (_t##_yi % 2 == 0) { \
210 _e->type = EDGE_NS; \
211 _e->tile[0] = map_pos_to_tile(&(wld.map), (_t##_xi - 1) / 2, \
212 _t##_yi / 2 - 1); /*N*/ \
213 _e->tile[1] = map_pos_to_tile(&(wld.map), (_t##_xi - 1) / 2, \
214 _t##_yi / 2); /*S*/ \
215 } else { \
216 _e->type = EDGE_WE; \
217 _e->tile[0] = map_pos_to_tile(&(wld.map), _t##_xi / 2 - 1, \
218 (_t##_yi - 1) / 2); /*W*/ \
219 _e->tile[1] = map_pos_to_tile(&(wld.map), _t##_xi / 2, \
220 (_t##_yi - 1) / 2); /*E*/ \
221 } \
222 } \
223 }
224
225#define gui_rect_iterate_end \
226 } \
227 } \
228}
229
230#define gui_rect_iterate_coord(GRI_x0, GRI_y0, GRI_width, GRI_height, \
231 _t, _e, _c, _x, _y, _zoom) \
232 gui_rect_iterate(GRI_x0, GRI_y0, GRI_width, GRI_height, \
233 _t, _e, _c, _zoom) { \
234 int _x, _y; \
235 \
236 _x = _t##_xi * _t##_w / _t##_r2 - _t##_w / 2; \
237 _y = _t##_yi * _t##_h / _t##_r2 - _t##_h / 2;
238
239#define gui_rect_iterate_coord_end \
240 } gui_rect_iterate_end
241
242void refresh_tile_mapcanvas(struct tile *ptile,
243 bool full_refresh, bool write_to_screen);
244void refresh_unit_mapcanvas(struct unit *punit, struct tile *ptile,
245 bool full_refresh, bool write_to_screen);
246void refresh_city_mapcanvas(struct city *pcity, struct tile *ptile,
247 bool full_refresh, bool write_to_screen);
248
249void unqueue_mapview_updates(bool write_to_screen);
250
251void map_to_gui_vector(const struct tileset *t, float zoom,
252 float *gui_dx, float *gui_dy, int map_dx, int map_dy);
253 bool tile_to_canvas_pos(float *canvas_x, float *canvas_y, float zoom,
254 const struct tile *ptile)
255 fc__attribute((nonnull (1, 2, 4)));
256struct tile *canvas_pos_to_tile(float canvas_x, float canvas_y, float zoom);
257struct tile *canvas_pos_to_nearest_tile(float canvas_x, float canvas_y,
258 float zoom);
259
260void get_mapview_scroll_window(float *xmin, float *ymin,
261 float *xmax, float *ymax,
262 int *xsize, int *ysize);
263void get_mapview_scroll_step(int *xstep, int *ystep);
264void get_mapview_scroll_pos(int *scroll_x, int *scroll_y);
265void set_mapview_scroll_pos(int scroll_x, int scroll_y, float zoom);
266
267void set_mapview_origin(float gui_x0, float gui_y0, float zoom);
268struct tile *get_center_tile_mapcanvas(void);
269void center_tile_mapcanvas(const struct tile *ptile)
270 fc__attribute((nonnull (1)));
271
272bool tile_visible_mapcanvas(struct tile *ptile);
273bool tile_visible_and_not_on_border_mapcanvas(struct tile *ptile);
274
275void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom,
276 int canvas_x, int canvas_y);
277void put_unittype(const struct unit_type *putype, struct canvas *pcanvas, float zoom,
278 int canvas_x, int canvas_y);
279void put_city(struct city *pcity, struct canvas *pcanvas, float zoom,
280 int canvas_x, int canvas_y);
281void put_terrain(struct tile *ptile, struct canvas *pcanvas, float zoom,
282 int canvas_x, int canvas_y);
283
284void put_unit_city_overlays(struct unit *punit,
285 struct canvas *pcanvas,
286 int canvas_x, int canvas_y, int *upkeep_cost,
287 int happy_cost);
288void toggle_city_color(struct city *pcity);
289void toggle_unit_color(struct unit *punit);
290
291void put_nuke_mushroom_pixmaps(struct tile *ptile);
292
293void put_one_element(struct canvas *pcanvas, float zoom,
294 enum mapview_layer layer,
295 const struct tile *ptile,
296 const struct tile_edge *pedge,
297 const struct tile_corner *pcorner,
298 const struct unit *punit, const struct city *pcity,
299 int canvas_x, int canvas_y,
300 const struct city *citymode,
301 const struct unit_type *putype);
302
303void put_drawn_sprites(struct canvas *pcanvas, float zoom,
304 int canvas_x, int canvas_y,
305 int count, struct drawn_sprite *pdrawn,
306 bool fog);
307
308void update_map_canvas(int canvas_x, int canvas_y, int width, int height);
309void update_map_canvas_visible(void);
310void update_city_description(struct city *pcity);
311void update_tile_label(struct tile *ptile);
312
313void show_city_descriptions(int canvas_base_x, int canvas_base_y,
314 int width_base, int height_base);
315void show_tile_labels(int canvas_base_x, int canvas_base_y,
316 int width_base, int height_base);
317bool show_unit_orders(struct unit *punit);
318
319void draw_segment(struct tile *ptile, enum direction8 dir)
320 fc__attribute((nonnull (1)));
321
322void decrease_unit_hp_smooth(struct unit *punit0, int hp0,
323 struct unit *punit1, int hp1);
324void move_unit_map_canvas(struct unit *punit,
325 struct tile *ptile, int dx, int dy);
326
327struct city *find_city_or_settler_near_tile(const struct tile *ptile,
328 struct unit **punit);
329struct city *find_city_near_tile(const struct tile *ptile);
330
331void get_city_mapview_production(struct city *pcity,
332 char *buf, size_t buf_len);
333void get_city_mapview_name_and_growth(struct city *pcity,
334 char *name_buffer,
335 size_t name_buffer_len,
336 char *growth_buffer,
337 size_t growth_buffer_len,
338 enum color_std *growth_color,
339 enum color_std *production_color);
340void get_city_mapview_trade_routes(struct city *pcity,
341 char *trade_routes_buffer,
342 size_t trade_routes_buffer_len,
343 enum color_std *trade_routes_color);
344
345bool map_canvas_resized(int width, int height);
346void init_mapcanvas_and_overview(void);
347void free_mapcanvas_and_overview(void);
348
349void get_spaceship_dimensions(int *width, int *height);
350void put_spaceship(struct canvas *pcanvas, int canvas_x, int canvas_y,
351 const struct player *pplayer);
352
353void link_marks_init(void);
354void link_marks_free(void);
355
356void link_marks_draw_all(void);
357void link_marks_clear_all(void);
358void link_marks_decrease_turn_counters(void);
359
360void link_mark_add_new(enum text_link_type type, int id);
361void link_mark_restore(enum text_link_type type, int id);
362
363 enum topo_comp_lvl { TOPO_COMPATIBLE = 0,
364 TOPO_INCOMP_SOFT = 1,
365 TOPO_INCOMP_HARD = 2};
366
367enum topo_comp_lvl tileset_map_topo_compatible(int topology_id,
368 struct tileset *tset,
369 int *tset_topo);
370const char *describe_topology(int topo);
371
372void animations_init(void);
373void animations_free(void);
374void set_frame_by_frame_animation(void);
375void update_animation(void);
376
377#ifdef __cplusplus
378}
379#endif /* __cplusplus */
380
381#endif /* FC__MAPVIEW_COMMON_H */
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
canvas_y
struct canvas int int canvas_y
Definition canvas_g.h:43
canvas_x
struct canvas int canvas_x
Definition canvas_g.h:43
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
pcanvas
struct canvas * pcanvas
Definition canvas_g.h:42
fog
struct canvas int int struct sprite bool fog
Definition canvas_g.h:51
colors_g.h
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:73
fc_types.h
featured_text.h
text_link_type
text_link_type
Definition featured_text.h:131
type
GType type
Definition repodlgs.c:1312
map.h
mapdeco_set_highlight
void mapdeco_set_highlight(const struct tile *ptile, bool highlight)
Definition mapview_common.c:3340
link_mark_restore
void link_mark_restore(enum text_link_type type, int id)
Definition mapview_common.c:3997
put_nuke_mushroom_pixmaps
void put_nuke_mushroom_pixmaps(struct tile *ptile)
Definition mapview_common.c:1510
init_mapcanvas_and_overview
void init_mapcanvas_and_overview(void)
Definition mapview_common.c:3683
find_city_or_settler_near_tile
struct city * find_city_or_settler_near_tile(const struct tile *ptile, struct unit **punit)
Definition mapview_common.c:2804
put_drawn_sprites
void put_drawn_sprites(struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y, int count, struct drawn_sprite *pdrawn, bool fog)
Definition mapview_common.c:1313
update_map_canvas_visible
void update_map_canvas_visible(void)
Definition mapview_common.c:1843
tile_visible_mapcanvas
bool tile_visible_mapcanvas(struct tile *ptile)
Definition mapview_common.c:1249
set_mapview_origin
void set_mapview_origin(float gui_x0, float gui_y0, float zoom)
Definition mapview_common.c:992
put_terrain
void put_terrain(struct tile *ptile, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
Definition mapview_common.c:1420
map_to_gui_vector
void map_to_gui_vector(const struct tileset *t, float zoom, float *gui_dx, float *gui_dy, int map_dx, int map_dy)
Definition mapview_common.c:553
update_tile_label
void update_tile_label(struct tile *ptile)
Definition mapview_common.c:1871
mapdeco_set_crosshair
void mapdeco_set_crosshair(const struct tile *ptile, bool crosshair)
Definition mapview_common.c:3391
tileset_map_topo_compatible
enum topo_comp_lvl tileset_map_topo_compatible(int topology_id, struct tileset *tset, int *tset_topo)
Definition mapview_common.c:4017
mapview
struct view mapview
Definition mapview_common.c:74
refresh_city_mapcanvas
void refresh_city_mapcanvas(struct city *pcity, struct tile *ptile, bool full_refresh, bool write_to_screen)
Definition mapview_common.c:531
put_city
void put_city(struct city *pcity, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
Definition mapview_common.c:1403
get_center_tile_mapcanvas
struct tile * get_center_tile_mapcanvas(void)
Definition mapview_common.c:1212
put_unit
void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
Definition mapview_common.c:1374
draw_segment
void draw_segment(struct tile *ptile, enum direction8 dir) fc__attribute((nonnull(1)))
Definition mapview_common.c:2508
find_city_near_tile
struct city * find_city_near_tile(const struct tile *ptile)
Definition mapview_common.c:2894
mapdeco_free
void mapdeco_free(void)
Definition mapview_common.c:3320
free_mapcanvas_and_overview
void free_mapcanvas_and_overview(void)
Definition mapview_common.c:3692
get_mapview_scroll_pos
void get_mapview_scroll_pos(int *scroll_x, int *scroll_y)
Definition mapview_common.c:1191
mapdeco_is_highlight_set
bool mapdeco_is_highlight_set(const struct tile *ptile)
Definition mapview_common.c:3363
center_tile_mapcanvas
void center_tile_mapcanvas(const struct tile *ptile) fc__attribute((nonnull(1)))
Definition mapview_common.c:1222
get_mapview_scroll_window
void get_mapview_scroll_window(float *xmin, float *ymin, float *xmax, float *ymax, int *xsize, int *ysize)
Definition mapview_common.c:1093
move_unit_map_canvas
void move_unit_map_canvas(struct unit *punit, struct tile *ptile, int dx, int dy)
Definition mapview_common.c:2684
mapdeco_set_gotoroute
void mapdeco_set_gotoroute(const struct unit *punit)
Definition mapview_common.c:3514
unqueue_mapview_updates
void unqueue_mapview_updates(bool write_to_screen)
Definition mapview_common.c:3067
get_mapview_scroll_step
void get_mapview_scroll_step(int *xstep, int *ystep)
Definition mapview_common.c:1177
get_city_mapview_trade_routes
void get_city_mapview_trade_routes(struct city *pcity, char *trade_routes_buffer, size_t trade_routes_buffer_len, enum color_std *trade_routes_color)
Definition mapview_common.c:2949
get_city_mapview_production
void get_city_mapview_production(struct city *pcity, char *buf, size_t buf_len)
Definition mapview_common.c:2923
show_city_descriptions
void show_city_descriptions(int canvas_base_x, int canvas_base_y, int width_base, int height_base)
Definition mapview_common.c:2345
set_mapview_scroll_pos
void set_mapview_scroll_pos(int scroll_x, int scroll_y, float zoom)
Definition mapview_common.c:1200
mapdeco_init
void mapdeco_init(void)
Definition mapview_common.c:3306
client_infratile_set
void client_infratile_set(struct tile *ptile)
Definition mapview_common.c:4097
put_unittype
void put_unittype(const struct unit_type *putype, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
Definition mapview_common.c:1388
mapdeco_clear_gotoroutes
void mapdeco_clear_gotoroutes(void)
Definition mapview_common.c:3570
show_unit_orders
bool show_unit_orders(struct unit *punit)
Definition mapview_common.c:2464
put_unit_city_overlays
void put_unit_city_overlays(struct unit *punit, struct canvas *pcanvas, int canvas_x, int canvas_y, int *upkeep_cost, int happy_cost)
Definition mapview_common.c:1438
put_one_element
void put_one_element(struct canvas *pcanvas, float zoom, 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, int canvas_x, int canvas_y, const struct city *citymode, const struct unit_type *putype)
Definition mapview_common.c:1349
mapdeco_is_gotoline_set
bool mapdeco_is_gotoline_set(const struct tile *ptile, enum direction8 dir)
Definition mapview_common.c:3549
animations_init
void animations_init(void)
Definition mapview_common.c:178
update_animation
void update_animation(void)
Definition mapview_common.c:428
toggle_city_color
void toggle_city_color(struct city *pcity)
Definition mapview_common.c:1476
canvas_pos_to_nearest_tile
struct tile * canvas_pos_to_nearest_tile(float canvas_x, float canvas_y, float zoom)
Definition mapview_common.c:768
mapdeco_add_gotoline
void mapdeco_add_gotoline(const struct tile *ptile, enum direction8 dir)
Definition mapview_common.c:3444
update_map_canvas
void update_map_canvas(int canvas_x, int canvas_y, int width, int height)
Definition mapview_common.c:1719
link_marks_decrease_turn_counters
void link_marks_decrease_turn_counters(void)
Definition mapview_common.c:3961
topo_comp_lvl
topo_comp_lvl
Definition mapview_common.h:363
TOPO_COMPATIBLE
@ TOPO_COMPATIBLE
Definition mapview_common.h:363
TOPO_INCOMP_HARD
@ TOPO_INCOMP_HARD
Definition mapview_common.h:365
TOPO_INCOMP_SOFT
@ TOPO_INCOMP_SOFT
Definition mapview_common.h:364
mapdeco_clear_crosshairs
void mapdeco_clear_crosshairs(void)
Definition mapview_common.c:3426
link_marks_draw_all
void link_marks_draw_all(void)
Definition mapview_common.c:3942
update_city_description
void update_city_description(struct city *pcity)
Definition mapview_common.c:1863
link_marks_init
void link_marks_init(void)
Definition mapview_common.c:3917
client_infratile
struct tile * client_infratile(void)
Definition mapview_common.c:4089
set_frame_by_frame_animation
void set_frame_by_frame_animation(void)
Definition mapview_common.c:4081
mapdeco_clear_highlights
void mapdeco_clear_highlights(void)
Definition mapview_common.c:3375
link_marks_clear_all
void link_marks_clear_all(void)
Definition mapview_common.c:3952
describe_topology
const char * describe_topology(int topo)
Definition mapview_common.c:4063
toggle_unit_color
void toggle_unit_color(struct unit *punit)
Definition mapview_common.c:1494
animations_free
void animations_free(void)
Definition mapview_common.c:186
tile_to_canvas_pos
bool tile_to_canvas_pos(float *canvas_x, float *canvas_y, float zoom, const struct tile *ptile) fc__attribute((nonnull(1
map_canvas_resized
bool map_canvas_resized(int width, int height)
Definition mapview_common.c:3592
link_mark_add_new
void link_mark_add_new(enum text_link_type type, int id)
Definition mapview_common.c:3975
can_slide
bool can_slide
Definition mapview_common.c:75
refresh_tile_mapcanvas
void refresh_tile_mapcanvas(struct tile *ptile, bool full_refresh, bool write_to_screen)
Definition mapview_common.c:494
refresh_unit_mapcanvas
void refresh_unit_mapcanvas(struct unit *punit, struct tile *ptile, bool full_refresh, bool write_to_screen)
Definition mapview_common.c:510
get_spaceship_dimensions
void get_spaceship_dimensions(int *width, int *height)
Definition mapview_common.c:3701
decrease_unit_hp_smooth
void decrease_unit_hp_smooth(struct unit *punit0, int hp0, struct unit *punit1, int hp1)
Definition mapview_common.c:2546
get_city_mapview_name_and_growth
void get_city_mapview_name_and_growth(struct city *pcity, char *name_buffer, size_t name_buffer_len, char *growth_buffer, size_t growth_buffer_len, enum color_std *growth_color, enum color_std *production_color)
Definition mapview_common.c:3186
tile_visible_and_not_on_border_mapcanvas
bool tile_visible_and_not_on_border_mapcanvas(struct tile *ptile)
Definition mapview_common.c:1267
put_spaceship
void put_spaceship(struct canvas *pcanvas, int canvas_x, int canvas_y, const struct player *pplayer)
Definition mapview_common.c:3714
canvas_pos_to_tile
bool struct tile * canvas_pos_to_tile(float canvas_x, float canvas_y, float zoom)
Definition mapview_common.c:751
mapdeco_remove_gotoline
void mapdeco_remove_gotoline(const struct tile *ptile, enum direction8 dir)
Definition mapview_common.c:3478
mapdeco_is_crosshair_set
bool mapdeco_is_crosshair_set(const struct tile *ptile)
Definition mapview_common.c:3414
link_marks_free
void link_marks_free(void)
Definition mapview_common.c:3929
show_tile_labels
void show_tile_labels(int canvas_base_x, int canvas_base_y, int width_base, int height_base)
Definition mapview_common.c:2419
canvas
Definition canvas.h:21
city
Definition city.h:309
drawn_sprite
Definition tilespec.h:109
player
Definition player.h:249
tile_corner
Definition tilespec.h:104
tile_edge
Definition tilespec.h:96
tile
Definition tile.h:49
tileset
Definition tilespec.c:459
unit_type
Definition unittype.h:481
unit
Definition unit.h:138
view
Definition mapview_common.h:36
view::height
int height
Definition mapview_common.h:38
view::store_width
int store_width
Definition mapview_common.h:40
view::gui_x0
float gui_x0
Definition mapview_common.h:37
view::tile_height
int tile_height
Definition mapview_common.h:39
view::can_do_cached_drawing
bool can_do_cached_drawing
Definition mapview_common.h:41
view::store_height
int store_height
Definition mapview_common.h:40
view::store
struct canvas * store
Definition mapview_common.h:42
view::tmp_store
struct canvas * tmp_store
Definition mapview_common.h:42
view::gui_y0
float gui_y0
Definition mapview_common.h:37
view::width
int width
Definition mapview_common.h:38
view::tile_width
int tile_width
Definition mapview_common.h:39
support.h
fc__attribute
#define fc__attribute(x)
Definition support.h:89
tilespec.h