57 double *ntl_x,
double *ntl_y,
60 const double gui_xd = gui_x, gui_yd = gui_y;
69 map_x = (gui_xd *
H + gui_yd * W) / (W *
H);
70 map_y = (gui_yd * W - gui_xd *
H) / (W *
H);
86 int *ovr_x,
int *ovr_y,
217 canvas_copy(dst, src, 0, 0, ix, iy, x_left, y_top);
218 canvas_copy(dst, src, 0, y_top, ix, 0, x_left, iy);
219 canvas_copy(dst, src, x_left, 0, 0, iy, ix, y_top);
220 canvas_copy(dst, src, x_left, y_top, 0, 0, ix, iy);
233 for (i = 0; i < 4; i++) {
236 int dst_x = x[(i + 1) % 4];
237 int dst_y = y[(i + 1) % 4];
242 src_x, src_y, dst_x - src_x, dst_y - src_y);
278 while (value >= wrap) {
323 int map_x,
int map_y)
357 int overview_x,
int overview_y)
394 int x,
int y,
int w,
int h)
438 overview_x, overview_y,
#define city_owner(_pcity_)
bool can_client_change_view(void)
enum known_type client_tile_get_known(const struct tile *ptile)
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)
struct color * get_terrain_color(const struct tileset *t, const struct terrain *pterrain)
struct unit * find_visible_unit(struct tile *ptile)
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
void canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
void canvas_free(struct canvas *store)
void canvas_put_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
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 update_map_canvas_scrollbars_size(void)
void get_overview_area_dimensions(int *width, int *height)
void update_overview_scroll_window_pos(int x, int y)
void overview_size_changed(void)
struct canvas * get_overview_window(void)
#define fc_assert(condition)
#define log_debug(message,...)
bool normalize_map_pos(const struct civ_map *nmap, int *x, int *y)
#define current_topo_has_flag(flag)
#define NATURAL_TO_MAP_POS(pmap_x, pmap_y, nat_x, nat_y)
#define do_in_natural_pos(ntl_x, ntl_y, map_x, map_y)
#define MAP_TO_NATURAL_POS(pnat_x, pnat_y, map_x, map_y)
#define whole_map_iterate(_map, _tile)
#define do_in_natural_pos_end
#define whole_map_iterate_end
#define index_to_map_pos(pmap_x, pmap_y, mindex)
struct client_options gui_options
@ OLAYER_BORDERS_ON_OCEAN
static double wrap_double(double value, double wrap)
static void gui_to_overview_pos(const struct tileset *t, int *ovr_x, int *ovr_y, int gui_x, int gui_y)
void flush_dirty_overview(void)
void overview_to_map_pos(int *map_x, int *map_y, int overview_x, int overview_y)
static void gui_to_natural_pos(const struct tileset *t, double *ntl_x, double *ntl_y, int gui_x, int gui_y)
void overview_redraw_callback(struct option *option)
void refresh_overview_canvas(void)
static bool overview_dirty
void center_tile_overviewcanvas(void)
void refresh_overview_from_canvas(void)
static void redraw_overview(void)
static struct color * overview_tile_color(struct tile *ptile)
void overview_update_tile(struct tile *ptile)
static void put_overview_tile_area(struct canvas *pcanvas, struct tile *ptile, int x, int y, int w, int h)
void calculate_overview_dimensions(void)
static void dirty_overview(void)
void map_to_overview_pos(int *overview_x, int *overview_y, int map_x, int map_y)
#define OVERVIEW_TILE_WIDTH
#define OVERVIEW_TILE_HEIGHT
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
#define FC_WRAP(value, range)
static int recursion[AIT_LAST]
bool layers[OLAYER_COUNT]
#define is_ocean_tile(ptile)
#define terrain_has_flag(terr, flag)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_owner(_tile)
struct sprite * get_basic_fog_sprite(const struct tileset *t)
bool tileset_is_isometric(const struct tileset *t)
int tileset_tile_height(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)