--- a/src/ai/api/ai_company.hpp Sat Jun 07 23:06:36 2008 +0000
+++ b/src/ai/api/ai_company.hpp Sat Jun 07 23:08:42 2008 +0000
@@ -14,12 +14,12 @@
public:
static const char *GetClassName() { return "AICompany"; }
- /** Different constants related to CompanyIndex. */
- enum CompanyIndex {
+ /** Different constants related to CompanyID. */
+ enum CompanyID {
+ INVALID_COMPANY = -1, //!< An invalid company.
FIRST_COMPANY = 0, //!< The first available company.
LAST_COMPANY = 7, //!< The last available company.
MY_COMPANY = 8, //!< Constant that gets resolved to the correct company index for your company.
- INVALID_COMPANY = 9, //!< An invalid company.
};
/**
@@ -30,7 +30,7 @@
* @param company The company index to resolve.
* @return The resolved company index.
*/
- static CompanyIndex ResolveCompanyIndex(CompanyIndex company);
+ static CompanyID ResolveCompanyID(CompanyID company);
/**
* Set the name of your company.
@@ -44,10 +44,10 @@
/**
* Get the name of the given company.
* @param company The company to get the name for.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY
* @return The name of the given company.
*/
- static char *GetCompanyName(CompanyIndex company);
+ static char *GetCompanyName(CompanyID company);
/**
* Set the name of your president.
@@ -61,10 +61,10 @@
/**
* Get the name of the president of the given company.
* @param company The company to get the president's name for.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY
* @return The name of the president of the given company.
*/
- static char *GetPresidentName(CompanyIndex company);
+ static char *GetPresidentName(CompanyID company);
/**
* Sets the amount to loan.
@@ -112,18 +112,18 @@
/**
* Gets the current value of the given company.
* @param company The company to get the company value of.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY
* @return The current value of the given company.
*/
- static Money GetCompanyValue(CompanyIndex company);
+ static Money GetCompanyValue(CompanyID company);
/**
* 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
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY
* @return The actual bank balance.
*/
- static Money GetBankBalance(CompanyIndex company);
+ static Money GetBankBalance(CompanyID company);
/**
* Build your company's HQ on the given tile.
@@ -140,10 +140,10 @@
/**
* Return the location of a company's HQ.
* @param company The company the get the HQ of.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY.
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY.
* @return The tile of the company's HQ, this tile is the most nothern tile of that HQ, or INVALID_TILE if there is no HQ yet.
*/
- static TileIndex GetCompanyHQ(CompanyIndex company);
+ static TileIndex GetCompanyHQ(CompanyID company);
/**
* Set whether autorenew is enabled for your company.
@@ -155,10 +155,10 @@
/**
* Return whether autorenew is enabled for a company.
* @param company The company to get the autorenew status of.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY.
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY.
* @return True if autorenew is enabled.
*/
- static bool GetAutoRenewStatus(CompanyIndex company);
+ static bool GetAutoRenewStatus(CompanyID company);
/**
* Set the number of months before/after max age to autorenew an engine for your company.
@@ -170,10 +170,10 @@
/**
* Return the number of months before/after max age to autorenew an engine for a company.
* @param company The company to get the autorenew months of.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY.
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY.
* @return The months before/after max age of engine.
*/
- static int16 GetAutoRenewMonths(CompanyIndex company);
+ static int16 GetAutoRenewMonths(CompanyID company);
/**
* Set the minimum money needed to autorenew an engine for your company.
@@ -185,12 +185,12 @@
/**
* Return the minimum money needed to autorenew an engine for a company.
* @param company The company to get the autorenew money of.
- * @pre ResolveCompanyIndex(company) != INVALID_COMPANY.
+ * @pre ResolveCompanyID(company) != INVALID_COMPANY.
* @return The minimum required money for autorenew to work.
*/
- static uint32 GetAutoRenewMoney(CompanyIndex company);
+ static uint32 GetAutoRenewMoney(CompanyID company);
};
-DECLARE_POSTFIX_INCREMENT(AICompany::CompanyIndex);
+DECLARE_POSTFIX_INCREMENT(AICompany::CompanyID);
#endif /* AI_COMPANY_HPP */