Project

General

Profile

Feature #1169 » 0024-Unhardcode-wld.map-from-city_support.patch

S3_2, S3_1 - Marko Lindqvist, 11/30/2024 01:56 AM

View differences:

common/city.c
}
/**********************************************************************//**
Calculate upkeep costs. This builds the pcity->usage[] array as well
Calculate upkeep costs. This builds the pcity->usage[] array as well
as setting some happiness values.
**************************************************************************/
static inline void city_support(struct city *pcity)
static inline void city_support(const struct civ_map *nmap,
struct city *pcity)
{
int free_unhappy, martial_law_each;
const struct civ_map *nmap = &(wld.map);
/* Clear all usage values. */
memset(pcity->usage, 0, O_LAST * sizeof(*pcity->usage));
......
/* Calculate the tile_cache[] values. */
city_tile_cache_update(nmap, pcity);
/* manage settlers, and units */
city_support(pcity);
city_support(nmap, pcity);
}
/* Calculate output from citizens (uses city_tile_cache_get_output()). */
(2-2/2)