Freeciv21
Develop your civilization from humble roots to a global empire
citymap.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  __ __ part of Freeciv21. Freeciv21 is free software: you can
4 / \\..// \ redistribute it and/or modify it under the terms of the GNU
5  ( oo ) General Public License as published by the Free Software
6  \__/ Foundation, either version 3 of the License, or (at your
7  option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10 **************************************************************************/
11 #pragma once
12 
13 void citymap_turn_init(struct player *pplayer);
14 void citymap_reserve_city_spot(struct tile *ptile, int id);
15 void citymap_free_city_spot(struct tile *ptile, int id);
16 void citymap_reserve_tile(struct tile *ptile, int id);
17 int citymap_read(struct tile *ptile);
18 bool citymap_is_reserved(struct tile *ptile);
19 
20 void citymap_free();
void citymap_free_city_spot(struct tile *ptile, int id)
Reverse any reservations we have made in the surrounding area.
Definition: citymap.cpp:141
void citymap_reserve_tile(struct tile *ptile, int id)
Reserve additional tiles as desired (eg I would reserve best available food tile in addition to adjac...
Definition: citymap.cpp:158
void citymap_reserve_city_spot(struct tile *ptile, int id)
This function reserves a single tile for a (possibly virtual) city with a settler's or a city's id.
Definition: citymap.cpp:113
bool citymap_is_reserved(struct tile *ptile)
A tile is reserved if it contains a city or unit id, or a worker is assigned to it.
Definition: citymap.cpp:178
int citymap_read(struct tile *ptile)
Returns a positive value if within a city radius, which is 1 x number of cities you are within the ra...
Definition: citymap.cpp:172
void citymap_free()
Free resources allocated for citymap.
Definition: citymap.cpp:106
void citymap_turn_init(struct player *pplayer)
Initialize citymap by reserving worked tiles and establishing the crowdedness of (virtual) cities.
Definition: citymap.cpp:51
Definition: player.h:231
Definition: tile.h:42