63#define SPECHASH_TAG gotoline
64#define SPECHASH_IKEY_TYPE struct tile *
65#define SPECHASH_IDATA_TYPE struct gotoline_counter *
66#define SPECHASH_IDATA_FREE gotoline_counter_destroy
68#define gotoline_hash_iterate(hash, ptile, pglc) \
69 TYPED_HASH_ITERATE(struct tile *, struct gotoline_counter *, \
71#define gotoline_hash_iterate_end HASH_ITERATE_END
171#define SPECLIST_TAG animation
172#define SPECLIST_TYPE struct animation
194 for (
i = 0;
i < last;
i++) {
197 switch (
anim->type) {
263 if (
anim->old_x >= 0) {
294 *
anim->battle.steps / 1000.0;
309 anim->battle.virt_loser->hp
310 =
anim->battle.loser_hp_start - (
anim->battle.loser_hp_start
326 anim->battle.virt_winner->hp
327 =
anim->battle.winner_hp_start - ((
anim->battle.winner_hp_start
328 -
anim->battle.winner_hp_end)
353 if (
anim->expl.sprite_count <= 0) {
358 *
anim->expl.sprite_count / 1000.0;
366 frame =
MIN(frame,
anim->expl.sprite_count - 1);
368 if (
anim->old_x >= 0) {
402 if (!
anim->nuke.shown) {
444 if (
anim->finished) {
448 if (
anim->old_x >= 0) {
462 switch (
anim->type) {
613 if (
HH > 0 ||
HW > 0) {
630 xmult = (dx >=
W / 2) ? -1 : 1;
631 ymult = (dy >=
H / 2) ? -1 : 1;
632 dx = (dx >=
W / 2) ? (
W - 1 - dx) : dx;
633 dy = (dy >=
H / 2) ? (
H - 1 - dy) : dy;
637 compar = (dx -
HW / 2) * (
H / 2) - (
H / 2 - 1 - dy) * (
W / 2 -
HW);
639 compar = (dy -
HH / 2) * (
W / 2) - (
W / 2 - 1 - dx) * (
H / 2 -
HH);
641 mod = (
compar < 0) ? -1 : 0;
707 const struct tile *ptile)
798 float gui_x0, gui_y0;
832 float gui_x0,
float gui_y0,
1066 log_debug(
"Got %d frames in %f seconds: %f FPS (avg %f).",
1110 int *xsize,
int *ysize)
1175 *
xmax += (diff + 1) / 2;
1181 *
ymax += (diff + 1) / 2;
1184 log_debug(
"x: %f<-%d->%f; y: %f<-%f->%d",
1241 static bool first =
TRUE;
1335 for (
i = 0;
i < count;
i++) {
1341 if (fog &&
pdrawn[
i].foggable) {
1366 const struct tile *ptile,
1483#define NUM_CITY_COLORS tileset_num_city_colors(tileset)
1539 anim->nuke.nuke_tile = ptile;
1668 for (
i = 0;
i < line_count;
i++) {
1769 log_debug(
"update_map_canvas(pos=(%d,%d), size=(%d,%d))",
2347#define COLOR_MAPVIEW_TILELABEL COLOR_MAPVIEW_CITYTEXT
2357#undef COLOR_MAPVIEW_TILELABEL
2451 if (ptile && ptile->label !=
NULL) {
2456 log_debug(
"Drawing label %s.", ptile->label);
2463 log_debug(
"Re-queuing tile label %s drawing.", ptile->label);
2497 if (ptile ==
NULL) {
2500 log_warn(
"Unit orders with illegal tile.");
2506 switch (
order->order) {
2701 struct tile *src_tile,
int dx,
int dy)
2703 struct tile *dest_tile;
2726 float canvas_dx, canvas_dy;
2756 anim->movement.src = src_tile;
2757 anim->movement.dest = dest_tile;
2833 if (pcity && pcity->
tile) {
3110 {-
W / 2, -
H / 2, 2 *
W, 2 *
H},
3126 log_debug(
"unqueue_mapview_update: needed_updates=%d",
3160 xr =
xl + area[
i].w;
3161 yb =
yt + area[
i].h;
3358 bool changed =
FALSE;
3479 changed = (
pglc->line_count[dir] < 1);
3480 pglc->line_count[dir]++;
3498 bool changed =
FALSE;
3510 if (
pglc->line_count[dir] <= 0) {
3511 pglc->line_count[dir] = 0;
3519 if (ptile !=
NULL) {
3533 const struct tile *ptile;
3595 if (
pglc->line_count[dir] > 0) {
3731 const struct player *pplayer)
3744 0, 0, w * 7, h * 7);
3747 const int j =
i / 3;
3748 const int k =
i % 3;
3750 if ((k == 0 && j >=
ship->habitation)
3751 || (k == 1 && j >=
ship->life_support)
3752 || (k == 2 && j >=
ship->solar_panels)) {
3765 const int j =
i / 2;
3766 const int k =
i % 2;
3768 if ((k == 0 && j >=
ship->fuel)
3769 || (k == 1 && j >=
ship->propulsion)) {
3808#define SPECLIST_TAG link_mark
3809#define SPECLIST_TYPE struct link_mark
3811#define link_marks_iterate(pmark) \
3812 TYPED_LIST_ITERATE(struct link_mark, link_marks, pmark)
3813#define link_marks_iterate_end LIST_ITERATE_END
3841 pmark->turn_counter = turns;
3859 switch (
pmark->type) {
3882 switch (
pmark->type) {
3990 if (--
pmark->turn_counter <= 0) {
4074 if (topology_id &
TF_HEX) {
4093 return _(
"ISO|Hex");
4101 return _(
"Overhead");
4132 if (ptile !=
NULL) {
#define BV_ISSET(bv, bit)
struct canvas int int struct sprite int int int int height
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
struct canvas int int int int struct sprite *sprite canvas_put_rectangle
struct canvas int int canvas_y
struct canvas int canvas_x
struct canvas int int int int struct sprite *sprite struct canvas struct color int int int int height canvas_put_line
struct canvas int int struct sprite int int offset_y
struct canvas int int struct sprite int offset_x
struct canvas int int struct sprite int int int width
const char * city_name_get(const struct city *pcity)
int city_production_turns_to_build(const struct city *pcity, bool include_shield_stock)
bool city_can_be_built_here(const struct civ_map *nmap, const struct tile *ptile, const struct unit *punit, bool hut_test)
int rs_max_city_radius_sq(void)
bool city_production_is_genus(const struct city *pcity, enum impr_genus_id genus)
int city_turns_to_grow(const struct city *pcity)
#define cities_iterate_end
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
#define cities_iterate(pcity)
static citizens city_size_get(const struct city *pcity)
#define output_type_iterate(output)
#define city_owner(_pcity_)
#define city_list_iterate_end
#define city_tile_iterate(_nmap, _radius_sq, _city_tile, _tile)
#define city_tile_iterate_end
#define output_type_iterate_end
int get_citydlg_canvas_width(void)
bool city_can_buy(const struct city *pcity)
int get_citydlg_canvas_height(void)
bool client_is_global_observer(void)
bool can_client_change_view(void)
enum known_type client_tile_get_known(const struct tile *ptile)
bool client_city_can_work_tile(const struct city *pcity, const struct tile *ptile)
struct color * color_best_contrast(struct color *subject, struct color **candidates, int ncandidates)
struct color * get_player_color(const struct tileset *t, const struct player *pplayer)
struct color * get_color(const struct tileset *t, enum color_std stdcolor)
void set_units_in_combat(struct unit *pattacker, struct unit *pdefender)
enum cursor_hover_state hover_state
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
bool editor_is_active(void)
bool editor_tile_is_selected(const struct tile *ptile)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
void canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
void canvas_set_zoom(struct canvas *store, float zoom)
void canvas_mapview_init(struct canvas *store)
void get_text_size(int *width, int *height, enum client_font font, const char *text)
void canvas_free(struct canvas *store)
void canvas_copy(struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
struct canvas * canvas_create(int width, int height)
void canvas_put_sprite_fogged(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, bool fog, int fog_x, int fog_y)
void add_idle_callback(void(callback)(void *), void *data)
void create_line_at_mouse_pos(void)
void update_rect_at_mouse_pos(void)
void update_map_canvas_scrollbars_size(void)
void update_map_canvas_scrollbars(void)
#define fc_assert_ret(condition)
#define log_warn(message,...)
#define fc_assert(condition)
#define log_debug(message,...)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
struct tile * map_pos_to_tile(const struct civ_map *nmap, int map_x, int map_y)
void base_map_distance_vector(int *dx, int *dy, int x0dv, int y0dv, int x1dv, int y1dv)
struct tile * mapstep(const struct civ_map *nmap, const struct tile *ptile, enum direction8 dir)
struct tile * nearest_real_tile(const struct civ_map *nmap, int x, int y)
bool normalize_map_pos(const struct civ_map *nmap, int *x, int *y)
#define current_topo_has_flag(flag)
#define adjc_dir_iterate(nmap, center_tile, itr_tile, dir_itr)
#define MAP_TO_NATIVE_POS(pnat_x, pnat_y, map_x, map_y)
#define NATIVE_TO_MAP_POS(pmap_x, pmap_y, nat_x, nat_y)
#define adjc_dir_iterate_end
#define current_wrap_has_flag(flag)
#define adjc_dir_base_iterate(nmap, center_tile, dir_itr)
#define adjc_dir_base_iterate_end
#define index_to_map_pos(pmap_x, pmap_y, mindex)
void mapdeco_set_highlight(const struct tile *ptile, bool highlight)
void link_mark_restore(enum text_link_type type, int id)
void put_nuke_mushroom_pixmaps(struct tile *ptile)
void init_mapcanvas_and_overview(void)
static struct gotoline_counter * gotoline_counter_new(void)
struct city * find_city_or_settler_near_tile(const struct tile *ptile, struct unit **punit)
void put_drawn_sprites(struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y, int count, struct drawn_sprite *pdrawn, bool fog)
void update_map_canvas_visible(void)
static void anim_timer_renew(void)
bool tile_visible_mapcanvas(struct tile *ptile)
void set_mapview_origin(float gui_x0, float gui_y0, float zoom)
void put_terrain(struct tile *ptile, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
static const int MAX_TRADE_ROUTE_DRAW_LINES
void map_to_gui_vector(const struct tileset *t, float zoom, float *gui_dx, float *gui_dy, int map_dx, int map_dy)
void update_tile_label(struct tile *ptile)
@ TILE_UPDATE_TILE_SINGLE
#define COLOR_MAPVIEW_TILELABEL
#define gotoline_hash_iterate(hash, ptile, pglc)
void mapdeco_set_crosshair(const struct tile *ptile, bool crosshair)
enum topo_comp_lvl tileset_map_topo_compatible(int topology_id, struct tileset *tset, int *tset_topo)
static int max_desc_width
static void link_mark_draw(const struct link_mark *pmark)
static void base_set_mapview_origin(float gui_x0, float gui_y0, float zoom)
static void queue_callback(void *data)
void refresh_city_mapcanvas(struct city *pcity, struct tile *ptile, bool full_refresh, bool write_to_screen)
static void draw_trade_routes(void)
static void draw_trade_routes_for_city(const struct city *pcity_src)
void put_city(struct city *pcity, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
struct tile * get_center_tile_mapcanvas(void)
static struct link_mark * link_mark_new(enum text_link_type type, int id, int turns)
struct tile * canvas_pos_to_tile(float canvas_x, float canvas_y, float zoom)
@ UPDATE_CITY_DESCRIPTIONS
@ UPDATE_MAP_CANVAS_VISIBLE
void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
struct city * find_city_near_tile(const struct tile *ptile)
void free_mapcanvas_and_overview(void)
struct gotoline_hash * mapdeco_gotoline_table
static bool movement_animation(struct animation *anim, double time_gone)
void get_mapview_scroll_pos(int *scroll_x, int *scroll_y)
bool mapdeco_is_highlight_set(const struct tile *ptile)
static void put_one_tile(struct canvas *pcanvas, enum mapview_layer layer, struct tile *ptile, int canvas_x, int canvas_y, const struct city *citymode)
void get_mapview_scroll_window(float *xmin, float *ymin, float *xmax, float *ymax, int *xsize, int *ysize)
static void show_small_citybar(struct canvas *pcanvas, int canvas_x, int canvas_y, struct city *pcity, int *width, int *height)
static bool frame_by_frame_animation
void move_unit_map_canvas(struct unit *punit, struct tile *src_tile, int dx, int dy)
static void link_mark_destroy(struct link_mark *pmark)
void mapdeco_set_gotoroute(const struct unit *punit)
void unqueue_mapview_updates(bool write_to_screen)
void get_mapview_scroll_step(int *xstep, int *ystep)
void draw_segment(struct tile *src_tile, enum direction8 dir)
void show_city_descriptions(int canvas_base_x, int canvas_base_y, int width_base, int height_base)
void set_mapview_scroll_pos(int scroll_x, int scroll_y, float zoom)
static void gui_distance_vector(const struct tileset *t, float zoom, float *gui_dx, float *gui_dy, float gui_x0, float gui_y0, float gui_x1, float gui_y1)
void client_infratile_set(struct tile *ptile)
static void queue_add_callback(void)
static void static void show_city_desc(struct canvas *pcanvas, int canvas_x, int canvas_y, struct city *pcity, int *width, int *height) fc__attribute((nonnull(5
void get_city_mapview_trade_routes(struct city *pcity, char *trade_routes_buffer, size_t trade_routes_buffer_len, enum color_std *pcolor)
void put_unittype(const struct unit_type *putype, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
void mapdeco_clear_gotoroutes(void)
bool show_unit_orders(struct unit *punit)
static enum update_type needed_updates
void put_unit_city_overlays(struct unit *punit, struct canvas *pcanvas, int canvas_x, int canvas_y, int *upkeep_cost, int happy_cost)
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)
bool mapdeco_is_gotoline_set(const struct tile *ptile, enum direction8 dir)
#define link_marks_iterate(pmark)
static bool nuke_animation(struct animation *anim, double time_gone)
void center_tile_mapcanvas(const struct tile *ptile)
void animations_init(void)
static int max_label_height
static bool battle_animation(struct animation *anim, double time_gone)
void update_animation(void)
void toggle_city_color(struct city *pcity)
struct tile * canvas_pos_to_nearest_tile(float canvas_x, float canvas_y, float zoom)
void mapdeco_add_gotoline(const struct tile *ptile, enum direction8 dir)
void update_map_canvas(int canvas_x, int canvas_y, int width, int height)
static struct color * link_mark_color(const struct link_mark *pmark)
const struct tile * center_tile
void link_marks_decrease_turn_counters(void)
static void normalize_gui_pos(const struct tileset *t, float zoom, float *gui_x, float *gui_y)
#define link_marks_iterate_end
void mapdeco_clear_crosshairs(void)
void get_city_mapview_production(struct city *pcity, char *buffer, size_t buffer_len)
static void base_canvas_to_map_pos(float zoom, int *map_x, int *map_y, float canvas_x, float canvas_y)
void link_marks_draw_all(void)
void update_city_description(struct city *pcity)
void link_marks_init(void)
struct tile * client_infratile(void)
void set_frame_by_frame_animation(void)
void mapdeco_clear_highlights(void)
void link_marks_clear_all(void)
const char * describe_topology(int topo)
static int trade_route_to_canvas_lines(const struct tile *ptile1, const struct tile *ptile2, struct trade_route_line *lines)
static void queue_mapview_update(enum update_type update)
static int max_label_width
struct animation_list * animations
void toggle_unit_color(struct unit *punit)
static struct link_mark * link_mark_find(enum text_link_type type, int id)
void animations_free(void)
struct tile_hash * mapdeco_highlight_table
static struct timer * anim_timer
static void queue_mapview_tile_update(struct tile *ptile, enum tile_update_type type)
static bool callback_queued
static void show_full_citybar(struct canvas *pcanvas, const int canvas_x0, const int canvas_y0, struct city *pcity, int *width, int *height) fc__attribute((nonnull(5
static void map_to_gui_pos(const struct tileset *t, float zoom, float *gui_x, float *gui_y, int map_x, int map_y)
static int max_desc_height
bool map_canvas_resized(int width, int height)
void link_mark_add_new(enum text_link_type type, int id)
void refresh_tile_mapcanvas(struct tile *ptile, bool full_refresh, bool write_to_screen)
static void draw_trade_route_line(const struct tile *ptile1, const struct tile *ptile2, enum color_std color)
void refresh_unit_mapcanvas(struct unit *punit, struct tile *ptile, bool full_refresh, bool write_to_screen)
static bool explosion_animation(struct animation *anim, double time_gone)
struct tile_list * tile_updates[TILE_UPDATE_COUNT]
bool tile_to_canvas_pos(float *canvas_x, float *canvas_y, float zoom, const struct tile *ptile)
static struct link_mark_list * link_marks
void get_spaceship_dimensions(int *width, int *height)
void decrease_unit_hp_smooth(struct unit *punit0, int hp0, struct unit *punit1, int hp1)
static void show_tile_label(struct canvas *pcanvas, int canvas_x, int canvas_y, struct tile *ptile, int *width, int *height)
static void animation_add(struct animation *anim)
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)
bool tile_visible_and_not_on_border_mapcanvas(struct tile *ptile)
struct tile_hash * mapdeco_crosshair_table
void put_spaceship(struct canvas *pcanvas, int canvas_x, int canvas_y, const struct player *pplayer)
static struct tile * link_mark_tile(const struct link_mark *pmark)
static void append_city_buycost_string(const struct city *pcity, char *buffer, int buffer_len)
void mapdeco_remove_gotoline(const struct tile *ptile, enum direction8 dir)
#define gotoline_hash_iterate_end
static bool can_do_cached_drawing(void)
bool mapdeco_is_crosshair_set(const struct tile *ptile)
void link_marks_free(void)
void show_tile_labels(int canvas_base_x, int canvas_base_y, int width_base, int height_base)
static bool calc_mapview_origin(float *gui_x0, float *gui_y0, float zoom)
static void gotoline_counter_destroy(struct gotoline_counter *pglc)
static void gui_to_map_pos(const struct tileset *t, float zoom, int *map_x, int *map_y, float gui_x, float gui_y)
#define gui_rect_iterate_coord(GRI_x0, GRI_y0, GRI_width, GRI_height, _t, _e, _c, _x, _y, _zoom)
#define gui_rect_iterate_coord_end
#define gui_rect_iterate_end
#define gui_rect_iterate(GRI_x0, GRI_y0, GRI_width, GRI_height, _t, _e, _c, _zoom)
#define fc_calloc(n, esz)
struct client_options gui_options
void flush_dirty_overview(void)
void refresh_overview_canvas(void)
void center_tile_overviewcanvas(void)
void overview_update_tile(struct tile *ptile)
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
const char * universal_name_translation(const struct universal *psource, char *buf, size_t bufsz)
#define CLIP(lower, current, upper)
#define FC_WRAP(value, range)
const struct sship_part_info structurals_info[NUM_SS_STRUCTURALS]
const struct sship_part_info modules_info[NUM_SS_MODULES]
const struct sship_part_info components_info[NUM_SS_COMPONENTS]
#define NUM_SS_COMPONENTS
#define NUM_SS_STRUCTURALS
struct sprite int int int int struct sprite int int float bool smooth get_sprite_dimensions
const struct sprite_vector * sprites
struct animation::@201::@203 movement
struct tile * winner_tile
struct animation::@201::@204 battle
struct animation::@201::@205 expl
struct unit * virt_winner
struct animation::@201::@206 nuke
struct trade_route_list * routes
struct universal production
struct city::@17::@20 client
struct sprite * background
struct sprite_vector occupancy
struct packet_scenario_info scenario
int smooth_center_slide_msec
bool draw_city_productions
int smooth_move_unit_msec
bool draw_city_trade_routes
int smooth_combat_step_msec
int line_count[DIR8_MAGIC_MAX]
struct city_list * cities
struct player_spaceship spaceship
struct veteran_system * veteran
struct unit::@81::@83 client
bool can_do_cached_drawing
struct canvas * tmp_store
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
void fc_usleep(unsigned long usec)
int cat_snprintf(char *str, size_t n, const char *format,...)
void canvas_put_flag_sprite(struct canvas *pcanvas, int canvas_x, int canvas_y, int canvas_w, int canvas_h, struct sprite *flag)
void get_flag_dimensions(struct sprite *flag, struct area_rect *rect, int svg_height)
struct city * tile_city(const struct tile *ptile)
#define tile_hash_iterate(hash, ptile)
#define tile_worked(_tile)
#define tile_list_iterate(tile_list, ptile)
#define tile_hash_iterate_end
#define tile_list_iterate_end
struct sprite * get_nuke_explode_sprite(const struct tileset *t)
int tileset_hex_width(const struct tileset *t)
int tileset_unit_width(const struct tileset *t)
struct unit * get_drawable_unit(const struct tileset *t, struct tile *ptile, const struct city *citymode)
int tileset_unit_height(const struct tileset *t)
int tileset_svg_flag_height(struct tileset *t)
struct sprite * get_city_flag_sprite(const struct tileset *t, const struct city *pcity)
int tileset_full_tile_height(const struct tileset *t)
struct sprite * get_unit_upkeep_sprite(const struct tileset *t, Output_type_id otype, const struct unit *punit, const int *upkeep_cost)
int tileset_citybar_offset_y(const struct tileset *t)
bool unit_drawn_with_city_outline(const struct unit *punit, bool check_focus)
const struct sprite_vector * get_unit_explode_animation(const struct tileset *t)
bool tileset_is_isometric(const struct tileset *t)
int tileset_tile_height(const struct tileset *t)
struct sprite * get_spaceship_sprite(const struct tileset *t, enum spaceship_part part)
int tileset_hex_height(const struct tileset *t)
const struct citybar_sprites * get_citybar_sprites(const struct tileset *t)
struct sprite * get_unit_unhappy_sprite(const struct tileset *t, const struct unit *punit, int happy_cost)
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)
int tileset_tile_width(const struct tileset *t)
int tileset_tilelabel_offset_y(const struct tileset *t)
#define mapview_layer_iterate(layer)
#define mapview_layer_iterate_end
void timer_usleep_since_start(struct timer *t, long usec)
void timer_start(struct timer *t)
double timer_read_seconds(struct timer *t)
struct timer * timer_renew(struct timer *t, enum timer_timetype type, enum timer_use use, const char *name)
unsigned max_trade_routes(const struct city *pcity)
#define trade_partners_iterate_end
#define trade_partners_iterate(c, p)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
void unit_virtual_destroy(struct unit *punit)
bool unit_has_orders(const struct unit *punit)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
#define zoom_is_enabled()