Freeciv21
Develop your civilization from humble roots to a global empire
overview_common.h File Reference
+ This graph shows which files directly or indirectly include this file:

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 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. More...
 
void refresh_overview_canvas ()
 Redraw the entire backing store for the overview minimap. More...
 
void calculate_overview_dimensions ()
 Called if the map size is know or changes. More...
 
void overview_init ()
 Allocates overview resources. More...
 
void overview_free ()
 Free overview resources. More...
 
void flush_dirty_overview ()
 Redraw the overview if it is "dirty". More...
 
void overview_redraw_callback (struct option *option)
 Callback to be called when an overview option is changed. More...
 
void gui_to_natural_pos (const struct tileset *t, double *ntl_x, double *ntl_y, int gui_x, int gui_y)
 Translate from gui to natural coordinate systems. More...
 
void gui_to_overview_pos (const struct tileset *t, int *ovr_x, int *ovr_y, int gui_x, int gui_y)
 Translate from gui to overview coordinate systems. More...
 

Variables

int OVERVIEW_TILE_SIZE
 

Macro Definition Documentation

◆ OVERVIEW_TILE_HEIGHT

#define OVERVIEW_TILE_HEIGHT   OVERVIEW_TILE_SIZE

Definition at line 19 of file overview_common.h.

◆ OVERVIEW_TILE_WIDTH

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

Definition at line 18 of file overview_common.h.

Function Documentation

◆ calculate_overview_dimensions()

void calculate_overview_dimensions ( )

Called if the map size is know or changes.

Definition at line 357 of file overview_common.cpp.

Referenced by handle_map_info().

◆ flush_dirty_overview()

void flush_dirty_overview ( )

Redraw the overview if it is "dirty".

This module contains various general - mostly highlevel - functions used throughout the client.

Definition at line 249 of file overview_common.cpp.

◆ gui_to_natural_pos()

void gui_to_natural_pos ( const struct tileset t,
double *  ntl_x,
double *  ntl_y,
int  gui_x,
int  gui_y 
)

Translate from gui to natural coordinate systems.

This provides natural coordinates as a floating-point value so there is no loss of information in the resulting values.

Definition at line 64 of file overview_common.cpp.

Referenced by gui_to_overview_pos().

◆ gui_to_overview_pos()

void gui_to_overview_pos ( const struct tileset t,
int *  ovr_x,
int *  ovr_y,
int  gui_x,
int  gui_y 
)

Translate from gui to overview coordinate systems.

Definition at line 91 of file overview_common.cpp.

Referenced by redraw_overview().

◆ overview_free()

void overview_free ( )

Free overview resources.

Definition at line 445 of file overview_common.cpp.

Referenced by client_exit().

◆ overview_init()

void overview_init ( )

Allocates overview resources.

Definition at line 434 of file overview_common.cpp.

Referenced by init_mapcanvas_and_overview().

◆ overview_redraw_callback()

void overview_redraw_callback ( struct option option)

Callback to be called when an overview option is changed.

Definition at line 459 of file overview_common.cpp.

Referenced by init_client_options().

◆ 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 261 of file overview_common.cpp.

Referenced by minimap_view::mousePressEvent().

◆ refresh_overview_canvas()

void refresh_overview_canvas ( )

Redraw the entire backing store for the overview minimap.

Definition at line 281 of file overview_common.cpp.

Referenced by calculate_overview_dimensions(), client_state(), overview_redraw_callback(), and minimap_panel::setup_minimap_menu().

Variable Documentation

◆ OVERVIEW_TILE_SIZE