1
0
Fork 0

(svn r22888) -Doc: Doxygenize Town struct. (adf88)

release/1.2
frosch 2011-09-04 09:06:07 +00:00
parent 85bddaf732
commit a3eb319415
1 changed files with 27 additions and 40 deletions

View File

@ -36,11 +36,10 @@ extern TownPool _town_pool;
/** Town data structure. */ /** Town data structure. */
struct Town : TownPool::PoolItem<&_town_pool> { struct Town : TownPool::PoolItem<&_town_pool> {
TileIndex xy; TileIndex xy; ///< town center tile
/* Current population of people and amount of houses. */ uint32 num_houses; ///< amount of houses
uint32 num_houses; uint32 population; ///< current population of people
uint32 population;
/* Town name */ /* Town name */
uint32 townnamegrfid; uint32 townnamegrfid;
@ -48,8 +47,7 @@ struct Town : TownPool::PoolItem<&_town_pool> {
uint32 townnameparts; uint32 townnameparts;
char *name; char *name;
/* NOSAVE: Location of name sign, UpdateVirtCoord updates this. */ ViewportSign sign; ///< NOSAVE: Location of name sign, UpdateVirtCoord updates this
ViewportSign sign;
/* Makes sure we don't build certain house types twice. /* Makes sure we don't build certain house types twice.
* bit 0 = Building funds received * bit 0 = Building funds received
@ -57,22 +55,19 @@ struct Town : TownPool::PoolItem<&_town_pool> {
* bit 2 = STADIUM */ * bit 2 = STADIUM */
byte flags; byte flags;
/* level of noise that all the airports are generating */ uint16 noise_reached; ///< level of noise that all the airports are generating
uint16 noise_reached;
/* Which companies have a statue? */ CompanyMask statues; ///< which companies have a statue?
CompanyMask statues;
/* Company ratings as well as a mask that determines which companies have a rating. */ /* Company ratings. */
CompanyMask have_ratings; CompanyMask have_ratings; ///< which companies have a rating
uint8 unwanted[MAX_COMPANIES]; ///< how many months companies aren't wanted by towns (bribe) uint8 unwanted[MAX_COMPANIES]; ///< how many months companies aren't wanted by towns (bribe)
CompanyByte exclusivity; ///< which company has exclusivity CompanyByte exclusivity; ///< which company has exclusivity
uint8 exclusive_counter; ///< months till the exclusivity expires uint8 exclusive_counter; ///< months till the exclusivity expires
int16 ratings[MAX_COMPANIES]; ///< Ratings of each company for this town. int16 ratings[MAX_COMPANIES]; ///< ratings of each company for this town
/* Maximum amount of passengers and mail that can be transported. */ uint32 max_pass; ///< maximum amount of passengers that can be transported
uint32 max_pass; uint32 max_mail; ///< maximum amount of mail that can be transported
uint32 max_mail;
uint32 new_max_pass; uint32 new_max_pass;
uint32 new_max_mail; uint32 new_max_mail;
uint32 act_pass; uint32 act_pass;
@ -80,48 +75,40 @@ struct Town : TownPool::PoolItem<&_town_pool> {
uint32 new_act_pass; uint32 new_act_pass;
uint32 new_act_mail; uint32 new_act_mail;
/* Amount of passengers that were transported. */ byte pct_pass_transported; ///< amount of passengers that were transported
byte pct_pass_transported; byte pct_mail_transported; ///< amount of mail that was transported
byte pct_mail_transported;
/* Amount of food and paper that was transported. Actually a bit mask would be enough. */ uint16 act_food; ///< amount of food that was transported
uint16 act_food; uint16 act_water; ///< amount of water that was transported
uint16 act_water;
uint16 new_act_food; uint16 new_act_food;
uint16 new_act_water; uint16 new_act_water;
/* Time until we rebuild a house. */ uint16 time_until_rebuild; ///< time until we rebuild a house
uint16 time_until_rebuild;
/* When to grow town next time. */ uint16 grow_counter; ///< counter to count when to grow
uint16 grow_counter; int16 growth_rate; ///< town growth rate
int16 growth_rate;
/* Fund buildings program in action? */ byte fund_buildings_months; ///< fund buildings program in action?
byte fund_buildings_months; byte road_build_months; ///< fund road reconstruction in action?
/* Fund road reconstruction in action? */ bool larger_town; ///< if this is a larger town and should grow more quickly
byte road_build_months; TownLayoutByte layout; ///< town specific road layout
/* If this is a larger town, and should grow more quickly. */
bool larger_town;
TownLayoutByte layout; ///< town specific road layout
std::list<PersistentStorage *> psa_list; std::list<PersistentStorage *> psa_list;
PartOfSubsidyByte part_of_subsidy; ///< NOSAVE: is this town a source/destination of a subsidy? PartOfSubsidyByte part_of_subsidy; ///< NOSAVE: is this town a source/destination of a subsidy?
/* NOSAVE: UpdateTownRadius updates this given the house count. */ uint32 squared_town_zone_radius[HZB_END]; ///< NOSAVE: UpdateTownRadius updates this given the house count
uint32 squared_town_zone_radius[HZB_END];
BuildingCounts<uint16> building_counts; ///< NOSAVE: The number of each type of building in the town. BuildingCounts<uint16> building_counts; ///< NOSAVE: the number of each type of building in the town
/** /**
* Creates a new town * Creates a new town.
* @param tile center tile of the town
*/ */
Town(TileIndex tile = INVALID_TILE) : xy(tile) { } Town(TileIndex tile = INVALID_TILE) : xy(tile) { }
/** Destroy the town */ /** Destroy the town. */
~Town(); ~Town();
void InitializeLayout(TownLayout layout); void InitializeLayout(TownLayout layout);