Freeciv-3.3
|
#include <stdio.h>
#include <string.h>
#include "log.h"
#include "mem.h"
#include "support.h"
#include "city.h"
#include "game.h"
#include "map.h"
#include "unit.h"
#include "unitlist.h"
#include "unittype.h"
#include "citymap.h"
Go to the source code of this file.
Macros | |
#define | log_citymap log_debug |
Functions | |
void | citymap_turn_init (struct player *pplayer) |
void | citymap_free (void) |
void | citymap_reserve_city_spot (struct tile *ptile, int id) |
void | citymap_free_city_spot (struct tile *ptile, int id) |
void | citymap_reserve_tile (struct tile *ptile, int id) |
int | citymap_read (struct tile *ptile) |
bool | citymap_is_reserved (struct tile *ptile) |
Variables | |
static int * | citymap = NULL |
Free resources allocated for citymap.
Definition at line 110 of file citymap.c.
Referenced by server_game_free().
Reverse any reservations we have made in the surrounding area.
Definition at line 150 of file citymap.c.
Referenced by dai_unit_new_task().
A tile is reserved if it contains a city or unit id, or a worker is assigned to it.
Definition at line 190 of file citymap.c.
Referenced by city_desirability(), and citymap_reserve_tile().
Returns a positive value if within a city radius, which is 1 x number of cities you are within the radius of, or zero or less if not. A negative value means this tile is reserved by a city and should not be taken.
Definition at line 181 of file citymap.c.
Referenced by cityresult_fill().
This function reserves a single tile for a (possibly virtual) city with a settler's or a city's id. Then it 'crowds' tiles that this city can use to make them less attractive to other cities we may consider making.
Definition at line 122 of file citymap.c.
Referenced by dai_unit_new_task().
Reserve additional tiles as desired (eg I would reserve best available food tile in addition to adjacent tiles)
Definition at line 167 of file citymap.c.
Referenced by dai_auto_settler_run().
Initialize citymap by reserving worked tiles and establishing the crowdedness of (virtual) cities.
Definition at line 61 of file citymap.c.
Referenced by auto_workers_player().
Definition at line 53 of file citymap.c.
Referenced by citymap_free(), citymap_free_city_spot(), citymap_is_reserved(), citymap_read(), citymap_reserve_city_spot(), citymap_reserve_tile(), and citymap_turn_init().