Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Functions | Variables
overview_common.h File Reference
#include "fc_types.h"
#include "canvas_g.h"
#include "options.h"

Go to the source code of this file.

Macros

#define OVERVIEW_TILE_WIDTH   ((MAP_IS_ISOMETRIC ? 2 : 1) * OVERVIEW_TILE_SIZE)
 
#define OVERVIEW_TILE_HEIGHT   OVERVIEW_TILE_SIZE
 

Functions

void map_to_overview_pos (int *overview_x, int *overview_y, int map_x, int map_y)
 
void overview_to_map_pos (int *map_x, int *map_y, int overview_x, int overview_y)
 
void refresh_overview_canvas (void)
 
void refresh_overview_from_canvas (void)
 
void overview_update_tile (struct tile *ptile)
 
void calculate_overview_dimensions (void)
 
void overview_free (void)
 
void center_tile_overviewcanvas (void)
 
void flush_dirty_overview (void)
 
void overview_redraw_callback (struct option *option)
 

Variables

int OVERVIEW_TILE_SIZE
 

Macro Definition Documentation

◆ OVERVIEW_TILE_HEIGHT

#define OVERVIEW_TILE_HEIGHT   OVERVIEW_TILE_SIZE

Definition at line 33 of file overview_common.h.

◆ OVERVIEW_TILE_WIDTH

#define OVERVIEW_TILE_WIDTH   ((MAP_IS_ISOMETRIC ? 2 : 1) * OVERVIEW_TILE_SIZE)

Definition at line 32 of file overview_common.h.

Function Documentation

◆ calculate_overview_dimensions()

void calculate_overview_dimensions ( void  )

Called if the map size is know or changes.

Definition at line 449 of file overview_common.c.

Referenced by handle_map_info().

◆ center_tile_overviewcanvas()

void center_tile_overviewcanvas ( void  )

Center the overview around the mapview.

Definition at line 288 of file overview_common.c.

Referenced by base_set_mapview_origin(), and map_canvas_resized().

◆ flush_dirty_overview()

void flush_dirty_overview ( void  )

Redraw the overview if it is "dirty".

Definition at line 262 of file overview_common.c.

Referenced by unqueue_mapview_updates().

◆ map_to_overview_pos()

void map_to_overview_pos ( int overview_x,
int overview_y,
int  map_x,
int  map_y 
)

Finds the overview (canvas) coordinates for a given map position.

Definition at line 323 of file overview_common.c.

◆ overview_free()

void overview_free ( void  )

Free overview resources.

Definition at line 510 of file overview_common.c.

Referenced by client_exit().

◆ overview_redraw_callback()

void overview_redraw_callback ( struct option option)

Callback to be called when an overview option is changed.

Definition at line 523 of file overview_common.c.

◆ overview_to_map_pos()

void overview_to_map_pos ( int map_x,
int map_y,
int  overview_x,
int  overview_y 
)

Finds the map coordinates for a given overview (canvas) position.

Definition at line 357 of file overview_common.c.

Referenced by butt_down_overviewcanvas(), left_butt_down_overviewcanvas(), minimap_window_callback(), minimap_view::mousePressEvent(), overview_update_line(), and right_butt_down_overviewcanvas().

◆ overview_update_tile()

void overview_update_tile ( struct tile ptile)

Redraw the given map position in the overview canvas.

Definition at line 410 of file overview_common.c.

Referenced by refresh_overview_canvas(), and unqueue_mapview_updates().

◆ refresh_overview_canvas()

void refresh_overview_canvas ( void  )

Redraw the entire backing store for the overview minimap.

Definition at line 376 of file overview_common.c.

Referenced by calculate_overview_dimensions(), overview_redraw_callback(), request_toggle_fog_of_war(), set_client_state(), and unqueue_mapview_updates().

◆ refresh_overview_from_canvas()

void refresh_overview_from_canvas ( void  )

Copies the current centred image + viewrect unchanged to the client's overview window (for expose events etc).

Definition at line 186 of file overview_common.c.

Referenced by redraw_overview().

Variable Documentation

◆ OVERVIEW_TILE_SIZE

int OVERVIEW_TILE_SIZE
extern