@@ -21,31 +21,31 @@
|
||||
|
||||
/** Statistics about the economy. */
|
||||
struct CompanyEconomyEntry {
|
||||
Money income; ///< The amount of income.
|
||||
Money expenses; ///< The amount of expenses.
|
||||
Money income; ///< The amount of income.
|
||||
Money expenses; ///< The amount of expenses.
|
||||
CargoArray delivered_cargo{}; ///< The amount of delivered cargo.
|
||||
int32 performance_history; ///< Company score (scale 0-1000)
|
||||
Money company_value; ///< The value of the company.
|
||||
int32_t performance_history; ///< Company score (scale 0-1000)
|
||||
Money company_value; ///< The value of the company.
|
||||
};
|
||||
|
||||
struct CompanyInfrastructure {
|
||||
uint32 road[ROADTYPE_END]; ///< Count of company owned track bits for each road type.
|
||||
uint32 signal; ///< Count of company owned signals.
|
||||
uint32 rail[RAILTYPE_END]; ///< Count of company owned track bits for each rail type.
|
||||
uint32 water; ///< Count of company owned track bits for canals.
|
||||
uint32 station; ///< Count of company owned station tiles.
|
||||
uint32 airport; ///< Count of company owned airports.
|
||||
uint32_t road[ROADTYPE_END]; ///< Count of company owned track bits for each road type.
|
||||
uint32_t signal; ///< Count of company owned signals.
|
||||
uint32_t rail[RAILTYPE_END]; ///< Count of company owned track bits for each rail type.
|
||||
uint32_t water; ///< Count of company owned track bits for canals.
|
||||
uint32_t station; ///< Count of company owned station tiles.
|
||||
uint32_t airport; ///< Count of company owned airports.
|
||||
|
||||
/** Get total sum of all owned track bits. */
|
||||
uint32 GetRailTotal() const
|
||||
uint32_t GetRailTotal() const
|
||||
{
|
||||
uint32 total = 0;
|
||||
uint32_t total = 0;
|
||||
for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) total += this->rail[rt];
|
||||
return total;
|
||||
}
|
||||
|
||||
uint32 GetRoadTotal() const;
|
||||
uint32 GetTramTotal() const;
|
||||
uint32_t GetRoadTotal() const;
|
||||
uint32_t GetTramTotal() const;
|
||||
|
||||
char *Dump(char *buffer, const char *last) const;
|
||||
};
|
||||
@@ -63,12 +63,12 @@ extern CompanyPool _company_pool;
|
||||
|
||||
/** Statically loadable part of Company pool item */
|
||||
struct CompanyProperties {
|
||||
uint32 name_2; ///< Parameter of #name_1.
|
||||
uint32_t name_2; ///< Parameter of #name_1.
|
||||
StringID name_1; ///< Name of the company if the user did not change it.
|
||||
std::string name; ///< Name of the company if the user changed it.
|
||||
|
||||
StringID president_name_1; ///< Name of the president if the user did not change it.
|
||||
uint32 president_name_2; ///< Parameter of #president_name_1
|
||||
uint32_t president_name_2; ///< Parameter of #president_name_1
|
||||
std::string president_name; ///< Name of the president if the user changed it.
|
||||
|
||||
CompanyManagerFace face; ///< Face description of the president.
|
||||
@@ -92,14 +92,14 @@ struct CompanyProperties {
|
||||
CompanyID bankrupt_last_asked; ///< Which company was most recently asked about buying it?
|
||||
CompanyBankruptcyFlags bankrupt_flags; ///< bankruptcy flags
|
||||
CompanyMask bankrupt_asked; ///< which companies were asked about buying it?
|
||||
int16 bankrupt_timeout; ///< If bigger than \c 0, amount of time to wait for an answer on an offer to buy this company.
|
||||
int16_t bankrupt_timeout; ///< If bigger than \c 0, amount of time to wait for an answer on an offer to buy this company.
|
||||
Money bankrupt_value;
|
||||
|
||||
uint32 terraform_limit; ///< Amount of tileheights we can (still) terraform (times 65536).
|
||||
uint32 clear_limit; ///< Amount of tiles we can (still) clear (times 65536).
|
||||
uint32 tree_limit; ///< Amount of trees we can (still) plant (times 65536).
|
||||
uint32 purchase_land_limit; ///< Amount of tiles we can (still) purchase (times 65536).
|
||||
uint32 build_object_limit; ///< Amount of tiles we can (still) build objects on (times 65536).
|
||||
uint32_t terraform_limit; ///< Amount of tileheights we can (still) terraform (times 65536).
|
||||
uint32_t clear_limit; ///< Amount of tiles we can (still) clear (times 65536).
|
||||
uint32_t tree_limit; ///< Amount of trees we can (still) plant (times 65536).
|
||||
uint32_t purchase_land_limit; ///< Amount of tiles we can (still) purchase (times 65536).
|
||||
uint32_t build_object_limit; ///< Amount of tiles we can (still) build objects on (times 65536).
|
||||
|
||||
/**
|
||||
* If \c true, the company is (also) controlled by the computer (a NoAI program).
|
||||
@@ -127,7 +127,7 @@ struct CompanyProperties {
|
||||
};
|
||||
|
||||
struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties {
|
||||
Company(uint16 name_1 = 0, bool is_ai = false);
|
||||
Company(uint16_t name_1 = 0, bool is_ai = false);
|
||||
~Company();
|
||||
|
||||
RailTypes avail_railtypes; ///< Rail types available to this company.
|
||||
|
||||
Reference in New Issue
Block a user