1 /**********************************************************************
2 Freeciv - Copyright (C) 1996-2005 - Freeciv Development Team
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)
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 ***********************************************************************/
14 #ifndef FC__OVERVIEW_COMMON_H
15 #define FC__OVERVIEW_COMMON_H
19 #endif /* __cplusplus */
27 /* The overview tile width and height are defined in terms of the base
28 * size. For iso-maps the width is twice the height since "natural"
29 * coordinates are used. For classical maps the width and height are
30 * equal. The base size may be adjusted to get the correct scale. */
31 extern int OVERVIEW_TILE_SIZE
;
32 #define OVERVIEW_TILE_WIDTH ((MAP_IS_ISOMETRIC ? 2 : 1) * OVERVIEW_TILE_SIZE)
33 #define OVERVIEW_TILE_HEIGHT OVERVIEW_TILE_SIZE
35 void map_to_overview_pos(int *overview_x
, int *overview_y
,
36 int map_x
, int map_y
);
37 void overview_to_map_pos(int *map_x
, int *map_y
,
38 int overview_x
, int overview_y
);
40 void refresh_overview_canvas(void);
41 void refresh_overview_from_canvas(void);
42 void overview_update_tile(struct tile
*ptile
);
43 void calculate_overview_dimensions(void);
44 void overview_free(void);
46 void center_tile_overviewcanvas(void);
48 void flush_dirty_overview(void);
50 void overview_redraw_callback(struct option
*option
);
54 #endif /* __cplusplus */
56 #endif /* FC__OVERVIEW_COMMON_H */