diff -r 38be66875b45 -r 80fbe02a4184 src/ai/api/ai_company.hpp --- a/src/ai/api/ai_company.hpp Sun Mar 30 20:58:41 2008 +0000 +++ b/src/ai/api/ai_company.hpp Mon Mar 31 06:32:27 2008 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ -/** @file ai_company.hpp Everything to query a company's financials and statistics */ +/** @file ai_company.hpp Everything to query a company's financials and statistics or build company related buildings. */ #ifndef AI_COMPANY_HPP #define AI_COMPANY_HPP @@ -12,9 +12,6 @@ */ class AICompany : public AIObject { public: - /** - * The name of the class, needed by several sub-processes. - */ static const char *GetClassName() { return "AICompany"; } /** Different constants related to companies */ @@ -71,20 +68,24 @@ static char *GetPresidentName(CompanyIndex company); /** - * Gets the current value of the given company. - * @param company the company to get the company value of. - * @pre ResolveCompanyIndex(company) != INVALID_COMPANY - * @return the current value of the given company. + * Sets the amount to loan. + * @param loan the amount to loan (multiplier of GetLoanInterval()). + * @pre loan must be non-negative. + * @pre GetLoanInterval must be a multiplier of loan. + * @pre loan must be below GetMaxLoan(). + * @pre loan - GetLoanAmount() + GetBankBalance() must be non-negative. + * @return true if the loan could be set to your requested amount. */ - static int32 GetCompanyValue(CompanyIndex company); + static bool SetLoanAmount(int32 loan); /** - * Gets the bank balance. In other words, the amount of money the given company can spent. - * @param company the company to get the bank balance of. - * @pre ResolveCompanyIndex(company) != INVALID_COMPANY - * @return the actual bank balance. + * Sets the minimum amount to loan, i.e. the given amount of loan rounded up. + * @param loan the amount to loan (any positive number). + * @pre loan must be non-negative. + * @pre loan must be below GetMaxLoan(). + * @return true if we could allocate a minimum of "loan" loan. */ - static int32 GetBankBalance(CompanyIndex company); + static bool SetMinimumLoanAmount(int32 loan); /** * Gets the amount your company have loaned. @@ -110,24 +111,20 @@ static int32 GetLoanInterval(); /** - * Sets the amount to loan. - * @param loan the amount to loan (multiplier of GetLoanInterval()). - * @pre loan must be non-negative. - * @pre GetLoanInterval must be a multiplier of loan. - * @pre loan must be below GetMaxLoan(). - * @pre loan - GetLoanAmount() + GetBankBalance() must be non-negative. - * @return true if the loan could be set to your requested amount. + * Gets the current value of the given company. + * @param company the company to get the company value of. + * @pre ResolveCompanyIndex(company) != INVALID_COMPANY + * @return the current value of the given company. */ - static bool SetLoanAmount(int32 loan); + static int32 GetCompanyValue(CompanyIndex company); /** - * Sets the minimum amount to loan, i.e. the given amount of loan rounded up. - * @param loan the amount to loan (any positive number). - * @pre loan must be non-negative. - * @pre loan must be below GetMaxLoan(). - * @return true if we could allocate a minimum of "loan" loan. + * Gets the bank balance. In other words, the amount of money the given company can spent. + * @param company the company to get the bank balance of. + * @pre ResolveCompanyIndex(company) != INVALID_COMPANY + * @return the actual bank balance. */ - static bool SetMinimumLoanAmount(int32 loan); + static int32 GetBankBalance(CompanyIndex company); /** * Build your company's HQ on the given tile.