Freeciv-3.3
|
#include "map.h"
#include "shared.h"
#include "client_main.h"
#include "climap.h"
#include "tilespec.h"
Go to the source code of this file.
Functions | |
enum known_type | client_tile_get_known (const struct tile *ptile) |
enum direction8 | gui_to_map_dir (enum direction8 gui_dir) |
enum direction8 | map_to_gui_dir (enum direction8 map_dir) |
struct tile * | client_city_tile (const struct city *pcity) |
bool | client_city_can_work_tile (const struct city *pcity, const struct tile *ptile) |
Returns TRUE when a tile is available to be worked, or the city itself is currently working the tile (and can continue).
See also city_can_work_tile() (common/city.[ch]).
Definition at line 133 of file climap.c.
Referenced by fill_grid_sprite_array(), and find_city_or_settler_near_tile().
Client variant of city_tile(). This include the case of this could a ghost city (see client/packhand.c). In a such case, the returned tile is an approximative position of the city on the map.
Definition at line 87 of file climap.c.
Referenced by chatwdg::anchor_clicked(), event_after(), and event_after().
enum known_type client_tile_get_known | ( | const struct tile * | ptile | ) |
A tile's "known" field is used by the server to store whether each player knows the tile. Client-side, it's used as an enum known_type to track whether the tile is known/fogged/unknown.
Judicious use of this function also makes things very convenient for civworld, since it uses both client and server-style storage; since it uses the stock tilespec.c file, this function serves as a wrapper.
Definition at line 36 of file climap.c.
Referenced by build_tile_data(), center_on_something(), fill_city_overlays_sprite_array(), fill_fog_sprite_array(), fill_grid_sprite_array(), fill_sprite_array(), fill_terrain_sprite_blending(), handle_tile_info(), popit(), popit(), popup_advanced_terrain_dialog(), popup_info_text(), fc_client::popup_tile_info(), put_one_element(), put_one_tile(), put_overview_tile_area(), and unit_drawn_with_city_outline().
enum direction8 gui_to_map_dir | ( | enum direction8 | gui_dir | ) |
Convert the given GUI direction into a map direction.
GUI directions correspond to the current viewing interface, so that DIR8_NORTH is up on the mapview. map directions correspond to the underlying map tiles, so that DIR8_NORTH means moving with a vector of (0,-1). Neither necessarily corresponds to "north" on the underlying world (once iso-maps are possible).
See also map_to_gui_dir().
Definition at line 59 of file climap.c.
Referenced by key_unit_move().
enum direction8 map_to_gui_dir | ( | enum direction8 | map_dir | ) |
Convert the given GUI direction into a map direction.
See also gui_to_map_dir().