28 std::unique_ptr<vision_site>
site;
72 bool can_reveal_tiles);
77 const struct player *pplayer,
78 enum vision_layer vlayer);
90 const struct player *pplayer);
92 const struct player *pplayer);
94 const struct player *pplayer);
114 struct tile *psource,
bool claim_bases);
117 int old_radius_sq,
int new_radius_sq);
void disable_fog_of_war()
Turns FoW off for everyone.
void player_map_init(struct player *pplayer)
Allocate space for map, and initialise the tiles.
void update_player_tile_last_seen(struct player *pplayer, struct tile *ptile)
Remember that tile was last seen this year.
void vision_clear_sight(struct vision *vision)
Clear all sight points from this vision source.
void map_calculate_borders()
Update borders for all sources.
void map_show_tile(struct player *pplayer, struct tile *ptile)
Shows the area to the player.
void map_set_border_vision(struct player *pplayer, const bool is_enabled)
Turn a players ability to see inside his borders on or off.
void map_claim_ownership(struct tile *ptile, struct player *powner, struct tile *psource, bool claim_bases)
Claim ownership of a single tile.
bool map_is_known(const struct tile *ptile, const struct player *pplayer)
Return whether the player knows the tile.
void send_map_info(struct conn_list *dest)
Send basic map information: map size, topology, and is_earth.
bool send_tile_suppression(bool now)
Suppress send_tile_info() during game_load()
void destroy_extra(struct tile *ptile, struct extra_type *pextra)
Remove extra from tile.
void map_claim_base(struct tile *ptile, const extra_type *pextra, struct player *powner, struct player *ploser)
Claim base to player's ownership.
bool really_gives_vision(struct player *me, struct player *them)
Return TRUE iff the player me really gives shared vision to player them.
void map_know_and_see_all(struct player *pplayer)
Call this function to unfog all tiles.
void send_tile_info(struct conn_list *dest, struct tile *ptile, bool send_unknown)
Send tile information to all the clients in dest which know and see the tile.
bool update_player_tile_knowledge(struct player *pplayer, struct tile *ptile)
Give pplayer the correct knowledge about tile; return TRUE iff knowledge changed.
void give_map_from_player_to_player(struct player *pfrom, struct player *pdest)
Give information about whole map (all tiles) from player to player.
void send_all_known_tiles(struct conn_list *dest)
Send all tiles known to specified clients.
void bounce_units_on_terrain_change(struct tile *ptile)
Check ptile and nearby tiles to see if all units can remain at their current locations,...
void give_seamap_from_player_to_player(struct player *pfrom, struct player *pdest)
Give information about all oceanic tiles from player to player.
void remove_shared_vision(struct player *pfrom, struct player *pto)
Removes shared vision from between two players.
bool need_to_reassign_continents(const struct terrain *oldter, const struct terrain *newter)
Returns TRUE if the terrain change from 'oldter' to 'newter' may require expensive reassignment of co...
void give_distorted_map(struct player *pfrom, struct player *pto, int prob, bool reveal_cities)
Transfer (random parts of) player pfrom's world map to pto.
void show_map_to_all()
Unfogs all tiles for all players.
void tile_claim_bases(struct tile *ptile, struct player *powner)
Claim ownership of bases on single tile.
void disable_fog_of_war_player(struct player *pplayer)
Turns FoW off for player.
void climate_change(bool warming, int effect)
Do a climate change.
void upgrade_all_city_extras(struct player *pplayer, bool discovery)
To be called when a player gains some better extra building tech for the first time.
void map_update_border(struct tile *ptile, struct player *owner, int old_radius_sq, int new_radius_sq)
Update borders for this source.
void map_set_known(struct tile *ptile, struct player *pplayer)
Set known status of the tile.
void enable_fog_of_war()
Turns FoW on for everyone.
void map_show_all(struct player *pplayer)
Shows the area to the player.
void map_hide_tile(struct player *pplayer, struct tile *ptile)
Hides the area to the player.
void give_citymap_from_player_to_player(struct city *pcity, struct player *pfrom, struct player *pdest)
Give information about tiles within city radius from player to player.
void nuclear_winter(int effect)
Wrapper for climate_change().
void create_extra(struct tile *ptile, const extra_type *pextra, struct player *pplayer)
Create extra to tile.
void terrain_changed(struct tile *ptile)
Handle local side effects for a terrain change.
void player_map_free(struct player *pplayer)
Free a player's private map.
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
Returns whether the layer 'vlayer' of the tile 'ptile' is known and seen by the player 'pplayer'.
void change_playertile_site(struct player_tile *ptile, struct vision_site *new_site)
Changes site information for player tile.
void fix_tile_on_terrain_change(struct tile *ptile, struct terrain *oldter, bool extend_rivers)
Handles local side effects for a terrain change (tile and its surroundings).
void enable_fog_of_war_player(struct player *pplayer)
Turns FoW on for player.
void map_show_circle(struct player *pplayer, struct tile *ptile, int radius_sq)
Shows the area to the player.
void map_vision_update(struct player *pplayer, struct tile *ptile, const v_radius_t old_radius_sq, const v_radius_t new_radius_sq, bool can_reveal_tiles)
There doesn't have to be a city.
void update_tile_knowledge(struct tile *ptile)
Update playermap knowledge for everybody who sees the tile, and send a packet to everyone whose info ...
void map_claim_border(struct tile *ptile, struct player *powner, int radius_sq)
Update borders for this source.
void remove_player_from_maps(struct player *pplayer)
Remove all knowledge of a player from main map and other players' private maps, and send updates to c...
void give_shared_vision(struct player *pfrom, struct player *pto)
Starts shared vision between two players.
void check_terrain_change(struct tile *ptile, struct terrain *oldter)
Handles local and global side effects for a terrain change for a single tile.
struct player_tile * map_get_player_tile(const struct tile *ptile, const struct player *pplayer)
Players' information of tiles is tracked so that fogged area can be kept consistent even when the cli...
struct vision_site * map_get_player_site(const struct tile *ptile, const struct player *pplayer)
Returns site located at given tile from player map.
struct vision_site * map_get_player_city(const struct tile *ptile, const struct player *pplayer)
Returns city located at given tile from player map.
void global_warming(int effect)
Wrapper for climate_change().
bool upgrade_city_extras(struct city *pcity, struct extra_type **gained)
Check city for extra upgrade.
void map_clear_border(struct tile *ptile)
Remove border for this source.
void map_clear_known(struct tile *ptile, struct player *pplayer)
Clear known status of the tile.
void vision_change_sight(struct vision *vision, const v_radius_t radius_sq)
Change the sight points for the vision source, fogging or unfogging tiles as needed.
struct player * extras_owner
std::unique_ptr< vision_site > site
struct extra_type * resource
short int v_radius_t[V_COUNT]