1
0
Fork 0

(svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb)

release/1.3
alberth 2012-12-01 13:12:39 +00:00
parent 01d023ad3b
commit 732e073261
23 changed files with 79 additions and 70 deletions

View File

@ -157,8 +157,18 @@ static inline bool IsCargoInClass(CargoID c, CargoClass cc)
#define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, uint, cargo_bits) #define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, uint, cargo_bits)
/**
* Loop header for iterating over cargoes, sorted by name. This includes phony cargoes like regearing cargoes.
* @param var Reference getting the cargospec.
* @see CargoSpec
*/
#define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_cargo_specs_size; index++) #define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_cargo_specs_size; index++)
/**
* Loop header for iterating over 'real' cargoes, sorted by name. Phony cargoes like regearing cargoes are skipped.
* @param var Reference getting the cargospec.
* @see CargoSpec
*/
#define FOR_ALL_SORTED_STANDARD_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_standard_cargo_specs_size; index++) #define FOR_ALL_SORTED_STANDARD_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_standard_cargo_specs_size; index++)
#endif /* CARGOTYPE_H */ #endif /* CARGOTYPE_H */

View File

@ -13,18 +13,18 @@
#define BITMATH_FUNC_HPP #define BITMATH_FUNC_HPP
/** /**
* Fetch n bits from x, started at bit s. * Fetch \a n bits from \a x, started at bit \a s.
* *
* This function can be used to fetch n bits from the value x. The * This function can be used to fetch \a n bits from the value \a x. The
* s value set the startposition to read. The startposition is * \a s value set the start position to read. The start position is
* count from the LSB and starts at 0. The result starts at a * count from the LSB and starts at \c 0. The result starts at a
* LSB, as this isn't just an and-bitmask but also some * LSB, as this isn't just an and-bitmask but also some
* bit-shifting operations. GB(0xFF, 2, 1) will so * bit-shifting operations. GB(0xFF, 2, 1) will so
* return 0x01 (0000 0001) instead of * return 0x01 (0000 0001) instead of
* 0x04 (0000 0100). * 0x04 (0000 0100).
* *
* @param x The value to read some bits. * @param x The value to read some bits.
* @param s The startposition to read some bits. * @param s The start position to read some bits.
* @param n The number of bits to read. * @param n The number of bits to read.
* @return The selected bits, aligned to a LSB. * @return The selected bits, aligned to a LSB.
*/ */
@ -44,10 +44,10 @@ static inline uint GB(const T x, const uint8 s, const uint8 n)
* This is not a bug, its a feature. * This is not a bug, its a feature.
* *
* @note Parameter \a x must be a variable as the result is saved there. * @note Parameter \a x must be a variable as the result is saved there.
* @note To avoid unexpecting results the value of \a d should not use more * @note To avoid unexpected results the value of \a d should not use more
* space as the provided space of \a n bits (log2) * space as the provided space of \a n bits (log2)
* @param x The variable to change some bits * @param x The variable to change some bits
* @param s The startposition for the new bits * @param s The start position for the new bits
* @param n The size/window for the new bits * @param n The size/window for the new bits
* @param d The actually new bits to save in the defined position. * @param d The actually new bits to save in the defined position.
* @return The new value of \a x * @return The new value of \a x
@ -61,19 +61,19 @@ static inline T SB(T &x, const uint8 s, const uint8 n, const U d)
} }
/** /**
* Add i to n bits of x starting at bit s. * Add \a i to \a n bits of \a x starting at bit \a s.
* *
* This add the value of i on n bits of x starting at bit s. The parameters x, * This adds the value of \a i on \a n bits of \a x starting at bit \a s. The parameters \a x,
* s, i are similar to #GB besides x must be a variable as the result are * \a s, \a i are similar to #GB. Besides, \ a x must be a variable as the result are
* saved there. An overflow does not affect the following bits of the given * saved there. An overflow does not affect the following bits of the given
* bit window and is simply ignored. * bit window and is simply ignored.
* *
* @note Parameter x must be a variable as the result is saved there. * @note Parameter x must be a variable as the result is saved there.
* @param x The variable to add some bits at some position * @param x The variable to add some bits at some position
* @param s The startposition of the addition * @param s The start position of the addition
* @param n The size/window for the addition * @param n The size/window for the addition
* @param i The value to add at the given startposition in the given window. * @param i The value to add at the given start position in the given window.
* @return The new value of x * @return The new value of \a x
*/ */
template <typename T, typename U> template <typename T, typename U>
static inline T AB(T &x, const uint8 s, const uint8 n, const U i) static inline T AB(T &x, const uint8 s, const uint8 n, const U i)
@ -87,8 +87,8 @@ static inline T AB(T &x, const uint8 s, const uint8 n, const U i)
* Checks if a bit in a value is set. * Checks if a bit in a value is set.
* *
* This function checks if a bit inside a value is set or not. * This function checks if a bit inside a value is set or not.
* The y value specific the position of the bit, started at the * The \a y value specific the position of the bit, started at the
* LSB and count from 0. * LSB and count from \c 0.
* *
* @param x The value to check * @param x The value to check
* @param y The position of the bit to check, started from the LSB * @param y The position of the bit to check, started from the LSB
@ -165,7 +165,7 @@ static inline T ClrBit(T &x, const uint8 y)
* changed and the value is also returned. Parameter y defines the bit * changed and the value is also returned. Parameter y defines the bit
* to toggle and starts at the LSB with 0. * to toggle and starts at the LSB with 0.
* *
* @param x The varliable to toggle the bit * @param x The variable to toggle the bit
* @param y The bit position to toggle * @param y The bit position to toggle
* @return The new value of the old value with the bit toggled * @return The new value of the old value with the bit toggled
*/ */
@ -281,11 +281,11 @@ static inline bool HasAtMostOneBit(T value)
} }
/** /**
* ROtate x Left by n * ROtate \a x Left by \a n
* *
* @note Assumes a byte has 8 bits * @note Assumes a byte has 8 bits
* @param x The value which we want to rotate * @param x The value which we want to rotate
* @param n The number how many we waht to rotate * @param n The number how many we want to rotate
* @return A bit rotated number * @return A bit rotated number
*/ */
template <typename T> template <typename T>
@ -295,11 +295,11 @@ static inline T ROL(const T x, const uint8 n)
} }
/** /**
* ROtate x Right by n * ROtate \a x Right by \a n
* *
* @note Assumes a byte has 8 bits * @note Assumes a byte has 8 bits
* @param x The value which we want to rotate * @param x The value which we want to rotate
* @param n The number how many we waht to rotate * @param n The number how many we want to rotate
* @return A bit rotated number * @return A bit rotated number
*/ */
template <typename T> template <typename T>

View File

@ -15,7 +15,7 @@
/** /**
* Overflow safe template for integers, i.e. integers that will never overflow * Overflow safe template for integers, i.e. integers that will never overflow
* you multiply the maximum value with 2, or add 2, or substract somethng from * you multiply the maximum value with 2, or add 2, or subtract something from
* the minimum value, etc. * the minimum value, etc.
* @param T the type these integers are stored with. * @param T the type these integers are stored with.
* @param T_MAX the maximum value for the integers. * @param T_MAX the maximum value for the integers.
@ -54,7 +54,7 @@ public:
return *this; return *this;
} }
/* Operators for addition and substraction */ /* Operators for addition and subtraction */
inline OverflowSafeInt operator + (const OverflowSafeInt& other) const { OverflowSafeInt result = *this; result += other; return result; } inline OverflowSafeInt operator + (const OverflowSafeInt& other) const { OverflowSafeInt result = *this; result += other; return result; }
inline OverflowSafeInt operator + (const int other) const { OverflowSafeInt result = *this; result += (int64)other; return result; } inline OverflowSafeInt operator + (const int other) const { OverflowSafeInt result = *this; result += (int64)other; return result; }
inline OverflowSafeInt operator + (const uint other) const { OverflowSafeInt result = *this; result += (int64)other; return result; } inline OverflowSafeInt operator + (const uint other) const { OverflowSafeInt result = *this; result += (int64)other; return result; }

View File

@ -135,7 +135,7 @@ static inline bool Chance16(const uint a, const uint b)
* This function uses the same parameters as Chance16. The third parameter * This function uses the same parameters as Chance16. The third parameter
* must be a variable the randomize-number from Random() is saved in. * must be a variable the randomize-number from Random() is saved in.
* *
* The low 16 bits of r will already be used and can therefor not be passed to * The low 16 bits of r will already be used and can therefore not be passed to
* Chance16I. One can only send the high 16 bits to Chance16I. * Chance16I. One can only send the high 16 bits to Chance16I.
* *
* @see Chance16I() * @see Chance16I()

View File

@ -62,7 +62,7 @@ static const byte SHADOW_COLOUR = 2;
/** /**
* Get the font loaded into a Freetype face by using a font-name. * Get the font loaded into a Freetype face by using a font-name.
* If no appropiate font is found, the function returns an error * If no appropriate font is found, the function returns an error
*/ */
/* ======================================================================================== /* ========================================================================================

View File

@ -109,7 +109,7 @@ static inline void GetAllCargoSuffixes(uint cb_offset, CargoSuffixType cst, cons
} }
} }
IndustryType _sorted_industry_types[NUM_INDUSTRYTYPES]; IndustryType _sorted_industry_types[NUM_INDUSTRYTYPES]; ///< Industry types sorted by name.
/** Sort industry types by their name. */ /** Sort industry types by their name. */
static int CDECL IndustryTypeNameSorter(const IndustryType *a, const IndustryType *b) static int CDECL IndustryTypeNameSorter(const IndustryType *a, const IndustryType *b)

View File

@ -441,7 +441,7 @@ struct MainWindow : Window
virtual void OnInvalidateData(int data = 0, bool gui_scope = true) virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{ {
if (!gui_scope) return; if (!gui_scope) return;
/* Forward the message to the appropiate toolbar (ingame or scenario editor) */ /* Forward the message to the appropriate toolbar (ingame or scenario editor) */
InvalidateWindowData(WC_MAIN_TOOLBAR, 0, data, true); InvalidateWindowData(WC_MAIN_TOOLBAR, 0, data, true);
} }

View File

@ -37,7 +37,7 @@ struct TileExtended {
/** /**
* An offset value between to tiles. * An offset value between to tiles.
* *
* This value is used fro the difference between * This value is used for the difference between
* to tiles. It can be added to a tileindex to get * to tiles. It can be added to a tileindex to get
* the resulting tileindex of the start tile applied * the resulting tileindex of the start tile applied
* with this saved difference. * with this saved difference.

View File

@ -29,7 +29,7 @@ enum PacketGameType {
/* /*
* These first three pair of packets (thus six in * These first three pair of packets (thus six in
* total) must remain in this order for backward * total) must remain in this order for backward
* and forward compatability between clients that * and forward compatibility between clients that
* are trying to join directly. * are trying to join directly.
*/ */

View File

@ -171,7 +171,7 @@ void NetworkGameListRequery()
void NetworkAfterNewGRFScan() void NetworkAfterNewGRFScan()
{ {
for (NetworkGameList *item = _network_game_list; item != NULL; item = item->next) { for (NetworkGameList *item = _network_game_list; item != NULL; item = item->next) {
/* Reset compatability state */ /* Reset compatibility state */
item->info.compatible = item->info.version_compatible; item->info.compatible = item->info.version_compatible;
for (GRFConfig *c = item->info.grfconfig; c != NULL; c = c->next) { for (GRFConfig *c = item->info.grfconfig; c != NULL; c = c->next) {
@ -181,13 +181,13 @@ void NetworkAfterNewGRFScan()
if (f == NULL) { if (f == NULL) {
/* Don't know the GRF, so mark game incompatible and the (possibly) /* Don't know the GRF, so mark game incompatible and the (possibly)
* already resolved name for this GRF (another server has sent the * already resolved name for this GRF (another server has sent the
* name of the GRF already */ * name of the GRF already. */
c->name->Release(); c->name->Release();
c->name = FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true); c->name = FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true);
c->name->AddRef(); c->name->AddRef();
c->status = GCS_NOT_FOUND; c->status = GCS_NOT_FOUND;
/* If we miss a file, we're obviously incompatible */ /* If we miss a file, we're obviously incompatible. */
item->info.compatible = false; item->info.compatible = false;
} else { } else {
c->filename = f->filename; c->filename = f->filename;

View File

@ -72,7 +72,6 @@ void SortNetworkLanguages()
/** /**
* Update the network new window because a new server is * Update the network new window because a new server is
* found on the network. * found on the network.
* @param unselect unselect the currently selected item
*/ */
void UpdateNetworkGameWindow() void UpdateNetworkGameWindow()
{ {
@ -850,7 +849,7 @@ public:
this->server = this->servers[this->list_pos]; this->server = this->servers[this->list_pos];
/* scroll to the new server if it is outside the current range */ /* Scroll to the new server if it is outside the current range. */
this->ScrollToSelectedServer(); this->ScrollToSelectedServer();
/* redraw window */ /* redraw window */
@ -1037,7 +1036,7 @@ void ShowNetworkGameWindow()
/* Only show once */ /* Only show once */
if (first) { if (first) {
first = false; first = false;
/* add all servers from the config file to our list */ /* Add all servers from the config file to our list. */
for (char **iter = _network_host_list.Begin(); iter != _network_host_list.End(); iter++) { for (char **iter = _network_host_list.Begin(); iter != _network_host_list.End(); iter++) {
NetworkAddServer(*iter); NetworkAddServer(*iter);
} }
@ -1101,7 +1100,7 @@ struct NetworkStartServerWindow : public Window {
{ {
switch (widget) { switch (widget) {
case WID_NSS_SETPWD: case WID_NSS_SETPWD:
/* if password is set, draw red '*' next to 'Set password' button */ /* If password is set, draw red '*' next to 'Set password' button. */
if (!StrEmpty(_settings_client.network.server_password)) DrawString(r.right + WD_FRAMERECT_LEFT, this->width - WD_FRAMERECT_RIGHT, r.top, "*", TC_RED); if (!StrEmpty(_settings_client.network.server_password)) DrawString(r.right + WD_FRAMERECT_LEFT, this->width - WD_FRAMERECT_RIGHT, r.top, "*", TC_RED);
} }
} }
@ -1126,7 +1125,7 @@ struct NetworkStartServerWindow : public Window {
case WID_NSS_CLIENTS_BTND: case WID_NSS_CLIENTS_BTNU: // Click on up/down button for number of clients case WID_NSS_CLIENTS_BTND: case WID_NSS_CLIENTS_BTNU: // Click on up/down button for number of clients
case WID_NSS_COMPANIES_BTND: case WID_NSS_COMPANIES_BTNU: // Click on up/down button for number of companies case WID_NSS_COMPANIES_BTND: case WID_NSS_COMPANIES_BTNU: // Click on up/down button for number of companies
case WID_NSS_SPECTATORS_BTND: case WID_NSS_SPECTATORS_BTNU: // Click on up/down button for number of spectators case WID_NSS_SPECTATORS_BTND: case WID_NSS_SPECTATORS_BTNU: // Click on up/down button for number of spectators
/* Don't allow too fast scrolling */ /* Don't allow too fast scrolling. */
if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) { if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
this->HandleButtonClick(widget); this->HandleButtonClick(widget);
this->SetDirty(); this->SetDirty();
@ -1353,7 +1352,7 @@ static void ShowNetworkStartServerWindow()
} }
struct NetworkLobbyWindow : public Window { struct NetworkLobbyWindow : public Window {
CompanyID company; ///< Select company CompanyID company; ///< Selected company
NetworkGameList *server; ///< Selected server NetworkGameList *server; ///< Selected server
NetworkCompanyInfo company_info[MAX_COMPANIES]; NetworkCompanyInfo company_info[MAX_COMPANIES];
Scrollbar *vscroll; Scrollbar *vscroll;
@ -1369,7 +1368,7 @@ struct NetworkLobbyWindow : public Window {
CompanyID NetworkLobbyFindCompanyIndex(byte pos) const CompanyID NetworkLobbyFindCompanyIndex(byte pos) const
{ {
/* Scroll through all this->company_info and get the 'pos' item that is not empty */ /* Scroll through all this->company_info and get the 'pos' item that is not empty. */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
if (!StrEmpty(this->company_info[i].company_name)) { if (!StrEmpty(this->company_info[i].company_name)) {
if (pos-- == 0) return i; if (pos-- == 0) return i;
@ -1423,11 +1422,11 @@ struct NetworkLobbyWindow : public Window {
{ {
const NetworkGameInfo *gi = &this->server->info; const NetworkGameInfo *gi = &this->server->info;
/* Join button is disabled when no company is selected and for AI companies*/ /* Join button is disabled when no company is selected and for AI companies. */
this->SetWidgetDisabledState(WID_NL_JOIN, this->company == INVALID_COMPANY || GetLobbyCompanyInfo(this->company)->ai); this->SetWidgetDisabledState(WID_NL_JOIN, this->company == INVALID_COMPANY || GetLobbyCompanyInfo(this->company)->ai);
/* Cannot start new company if there are too many */ /* Cannot start new company if there are too many. */
this->SetWidgetDisabledState(WID_NL_NEW, gi->companies_on >= gi->companies_max); this->SetWidgetDisabledState(WID_NL_NEW, gi->companies_on >= gi->companies_max);
/* Cannot spectate if there are too many spectators */ /* Cannot spectate if there are too many spectators. */
this->SetWidgetDisabledState(WID_NL_SPECTATE, gi->spectators_on >= gi->spectators_max); this->SetWidgetDisabledState(WID_NL_SPECTATE, gi->spectators_on >= gi->spectators_max);
this->vscroll->SetCount(gi->companies_on); this->vscroll->SetCount(gi->companies_on);
@ -1481,7 +1480,7 @@ struct NetworkLobbyWindow : public Window {
void DrawDetails(const Rect &r) const void DrawDetails(const Rect &r) const
{ {
const int detail_height = 12 + FONT_HEIGHT_NORMAL + 12; const int detail_height = 12 + FONT_HEIGHT_NORMAL + 12;
/* Draw info about selected company when it is selected in the left window */ /* Draw info about selected company when it is selected in the left window. */
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.top + detail_height - 1, PC_DARK_BLUE); GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.top + detail_height - 1, PC_DARK_BLUE);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + 12, STR_NETWORK_GAME_LOBBY_COMPANY_INFO, TC_FROMSTRING, SA_HOR_CENTER); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + 12, STR_NETWORK_GAME_LOBBY_COMPANY_INFO, TC_FROMSTRING, SA_HOR_CENTER);
@ -1559,7 +1558,7 @@ struct NetworkLobbyWindow : public Window {
} }
case WID_NL_JOIN: // Join company case WID_NL_JOIN: // Join company
/* Button can be clicked only when it is enabled */ /* Button can be clicked only when it is enabled. */
NetworkClientConnectGame(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port), this->company); NetworkClientConnectGame(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port), this->company);
break; break;
@ -1757,13 +1756,13 @@ struct NetworkClientListPopupWindow : Window {
this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, &ClientList_SpeakToAll); this->AddAction(STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, &ClientList_SpeakToAll);
if (_network_own_client_id != ci->client_id) { if (_network_own_client_id != ci->client_id) {
/* We are no spectator and the company we want to give money to is no spectator and money gifts are allowed */ /* We are no spectator and the company we want to give money to is no spectator and money gifts are allowed. */
if (Company::IsValidID(_local_company) && Company::IsValidID(ci->client_playas) && _settings_game.economy.give_money) { if (Company::IsValidID(_local_company) && Company::IsValidID(ci->client_playas) && _settings_game.economy.give_money) {
this->AddAction(STR_NETWORK_CLIENTLIST_GIVE_MONEY, &ClientList_GiveMoney); this->AddAction(STR_NETWORK_CLIENTLIST_GIVE_MONEY, &ClientList_GiveMoney);
} }
} }
/* A server can kick clients (but not himself) */ /* A server can kick clients (but not himself). */
if (_network_server && _network_own_client_id != ci->client_id) { if (_network_server && _network_own_client_id != ci->client_id) {
this->AddAction(STR_NETWORK_CLIENTLIST_KICK, &ClientList_Kick); this->AddAction(STR_NETWORK_CLIENTLIST_KICK, &ClientList_Kick);
this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban); this->AddAction(STR_NETWORK_CLIENTLIST_BAN, &ClientList_Ban);

View File

@ -1399,7 +1399,7 @@ private:
const GRFConfig *best = FindGRFConfig(c->ident.grfid, HasBit(c->flags, GCF_INVALID) ? FGCM_NEWEST : FGCM_NEWEST_VALID); const GRFConfig *best = FindGRFConfig(c->ident.grfid, HasBit(c->flags, GCF_INVALID) ? FGCM_NEWEST : FGCM_NEWEST_VALID);
/* /*
* If the best version is 0, then all NewGRF with this GRF ID * If the best version is 0, then all NewGRF with this GRF ID
* have version 0, so for backward compatability reasons we * have version 0, so for backward compatibility reasons we
* want to show them all. * want to show them all.
* If we are the best version, then we definitely want to * If we are the best version, then we definitely want to
* show that NewGRF!. * show that NewGRF!.

View File

@ -61,8 +61,8 @@ enum OrderUnloadFlags {
*/ */
enum OrderLoadFlags { enum OrderLoadFlags {
OLF_LOAD_IF_POSSIBLE = 0, ///< Load as long as there is cargo that fits in the train. OLF_LOAD_IF_POSSIBLE = 0, ///< Load as long as there is cargo that fits in the train.
OLFB_FULL_LOAD = 1 << 1, ///< Full load the complete the consist. OLFB_FULL_LOAD = 1 << 1, ///< Full load all cargoes of the consist.
OLF_FULL_LOAD_ANY = 3, ///< Full load the a single cargo of the consist. OLF_FULL_LOAD_ANY = 3, ///< Full load a single cargo of the consist.
OLFB_NO_LOAD = 4, ///< Do not load anything. OLFB_NO_LOAD = 4, ///< Do not load anything.
}; };
@ -137,7 +137,7 @@ enum OrderConditionComparator {
/** /**
* Enumeration for the data to set in CmdModifyOrder. * Enumeration for the data to set in #CmdModifyOrder.
*/ */
enum ModifyOrderFlags { enum ModifyOrderFlags {
MOF_NON_STOP, ///< Passes an OrderNonStopFlags. MOF_NON_STOP, ///< Passes an OrderNonStopFlags.
@ -154,7 +154,7 @@ enum ModifyOrderFlags {
template <> struct EnumPropsT<ModifyOrderFlags> : MakeEnumPropsT<ModifyOrderFlags, byte, MOF_NON_STOP, MOF_END, MOF_END, 4> {}; template <> struct EnumPropsT<ModifyOrderFlags> : MakeEnumPropsT<ModifyOrderFlags, byte, MOF_NON_STOP, MOF_END, MOF_END, 4> {};
/** /**
* Depot action to switch to when doing a MOF_DEPOT_ACTION. * Depot action to switch to when doing a #MOF_DEPOT_ACTION.
*/ */
enum OrderDepotAction { enum OrderDepotAction {
DA_ALWAYS_GO, ///< Always go to the depot DA_ALWAYS_GO, ///< Always go to the depot
@ -164,7 +164,7 @@ enum OrderDepotAction {
}; };
/** /**
* Enumeration for the data to set in CmdChangeTimetable. * Enumeration for the data to set in #CmdChangeTimetable.
*/ */
enum ModifyTimetableFlags { enum ModifyTimetableFlags {
MTF_WAIT_TIME, ///< Set wait time. MTF_WAIT_TIME, ///< Set wait time.
@ -175,7 +175,7 @@ enum ModifyTimetableFlags {
template <> struct EnumPropsT<ModifyTimetableFlags> : MakeEnumPropsT<ModifyTimetableFlags, byte, MTF_WAIT_TIME, MTF_END, MTF_END, 2> {}; template <> struct EnumPropsT<ModifyTimetableFlags> : MakeEnumPropsT<ModifyTimetableFlags, byte, MTF_WAIT_TIME, MTF_END, MTF_END, 2> {};
/* Possible clone options */ /** Clone actions. */
enum CloneOptions { enum CloneOptions {
CO_SHARE = 0, CO_SHARE = 0,
CO_COPY = 1, CO_COPY = 1,

View File

@ -44,7 +44,7 @@ RoadStop *RoadStop::GetNextRoadStop(const RoadVehicle *v) const
for (RoadStop *rs = this->next; rs != NULL; rs = rs->next) { for (RoadStop *rs = this->next; rs != NULL; rs = rs->next) {
/* The vehicle cannot go to this roadstop (different roadtype) */ /* The vehicle cannot go to this roadstop (different roadtype) */
if ((GetRoadTypes(rs->xy) & v->compatible_roadtypes) == ROADTYPES_NONE) continue; if ((GetRoadTypes(rs->xy) & v->compatible_roadtypes) == ROADTYPES_NONE) continue;
/* The vehicle is articulated and can therefor not go the a standard road stop */ /* The vehicle is articulated and can therefore not go to a standard road stop. */
if (IsStandardRoadStopTile(rs->xy) && v->HasArticulatedPart()) continue; if (IsStandardRoadStopTile(rs->xy) && v->HasArticulatedPart()) continue;
/* The vehicle can actually go to this road stop. So, return it! */ /* The vehicle can actually go to this road stop. So, return it! */

View File

@ -636,7 +636,7 @@ bool AfterLoadGame()
SetDate(_date, _date_fract); SetDate(_date, _date_fract);
/* /*
* Force the old behaviour for compatability reasons with old savegames. * Force the old behaviour for compatibility reasons with old savegames.
* *
* Note that there is no non-stop in here. This is because the setting could have * Note that there is no non-stop in here. This is because the setting could have
* either value in TTDPatch. To convert it properly the user has to make sure the * either value in TTDPatch. To convert it properly the user has to make sure the

View File

@ -1218,7 +1218,7 @@ static size_t ReferenceToInt(const void *obj, SLRefType rt)
/** /**
* Pointers cannot be loaded from a savegame, so this function * Pointers cannot be loaded from a savegame, so this function
* gets the index from the savegame and returns the appropiate * gets the index from the savegame and returns the appropriate
* pointer from the already loaded base. * pointer from the already loaded base.
* Remember that an index of 0 is a NULL pointer so all indices * Remember that an index of 0 is a NULL pointer so all indices
* are +1 so vehicle 0 is saved as 1. * are +1 so vehicle 0 is saved as 1.
@ -1675,7 +1675,7 @@ static void SlStubSaveProc()
/** /**
* Save a chunk of data (eg. vehicles, stations, etc.). Each chunk is * Save a chunk of data (eg. vehicles, stations, etc.). Each chunk is
* prefixed by an ID identifying it, followed by data, and terminator where appropiate * prefixed by an ID identifying it, followed by data, and terminator where appropriate
* @param ch The chunkhandler that will be used for the operation * @param ch The chunkhandler that will be used for the operation
*/ */
static void SlSaveChunk(const ChunkHandler *ch) static void SlSaveChunk(const ChunkHandler *ch)
@ -1730,7 +1730,7 @@ static void SlSaveChunks()
* Find the ChunkHandler that will be used for processing the found * Find the ChunkHandler that will be used for processing the found
* chunk in the savegame or in memory * chunk in the savegame or in memory
* @param id the chunk in question * @param id the chunk in question
* @return returns the appropiate chunkhandler * @return returns the appropriate chunkhandler
*/ */
static const ChunkHandler *SlFindChunkHandler(uint32 id) static const ChunkHandler *SlFindChunkHandler(uint32 id)
{ {
@ -2408,7 +2408,7 @@ static void SaveFileError()
/** /**
* We have written the whole game into memory, _memory_savegame, now find * We have written the whole game into memory, _memory_savegame, now find
* and appropiate compressor and start writing to file. * and appropriate compressor and start writing to file.
*/ */
static SaveOrLoadResult SaveFileToDisk(bool threaded) static SaveOrLoadResult SaveFileToDisk(bool threaded)
{ {

View File

@ -113,7 +113,7 @@ public:
/** /**
* Move a vehicle to a group. * Move a vehicle to a group.
* @param group_id The group to move the vehicel to. * @param group_id The group to move the vehicle to.
* @param vehicle_id The vehicle to move to the group. * @param vehicle_id The vehicle to move to the group.
* @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT. * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT.
* @pre ScriptVehicle::IsValidVehicle(vehicle_id). * @pre ScriptVehicle::IsValidVehicle(vehicle_id).
@ -129,7 +129,7 @@ public:
* (auto)replaced with a longer variant (longer wagons or longer engines) * (auto)replaced with a longer variant (longer wagons or longer engines)
* If enabled, wagons are removed from the end of the vehicle until it * If enabled, wagons are removed from the end of the vehicle until it
* fits in the same number of tiles as it did before. * fits in the same number of tiles as it did before.
* @param keep_length If true, wagons will be removed if the a new engine is longer. * @param keep_length If true, wagons will be removed if the new engine is longer.
* @return True if and only if the value was successfully changed. * @return True if and only if the value was successfully changed.
*/ */
static bool EnableWagonRemoval(bool keep_length); static bool EnableWagonRemoval(bool keep_length);

View File

@ -133,7 +133,7 @@ public:
* Can a non-developer select Script for a new game. * Can a non-developer select Script for a new game.
* *
* The idea behind this function is to 'forbid' using your script with a new * The idea behind this function is to 'forbid' using your script with a new
* game if you for example specificly wrote it for a certain scenario. * game if you for example specifically wrote it for a certain scenario.
* *
* @return True if the Script can be selected from the GUI as non-developer. * @return True if the Script can be selected from the GUI as non-developer.
* @note This function is optional. Default is false. * @note This function is optional. Default is false.
@ -153,13 +153,13 @@ public:
/** /**
* Gets the API version this Script is written for. If this function * Gets the API version this Script is written for. If this function
* does not exist API compatability with version 0.7 is assumed. * does not exist API compatibility with version 0.7 is assumed.
* If the function returns something OpenTTD does not understand, * If the function returns something OpenTTD does not understand,
* for example a newer version or a string that is not a version, * for example a newer version or a string that is not a version,
* the Script will not be loaded. * the Script will not be loaded.
* *
* Although in the future we might need to make a separate * Although in the future we might need to make a separate
* compatability 'wrapper' for a specific version of OpenTTD, for * compatibility 'wrapper' for a specific version of OpenTTD, for
* example '0.7.1', we will use only the major and minor number * example '0.7.1', we will use only the major and minor number
* and not the bugfix number as valid return for this function. * and not the bugfix number as valid return for this function.
* *
@ -246,7 +246,7 @@ public:
* @param setting_name The name of the setting. * @param setting_name The name of the setting.
* @param value_names A table that maps values to names. The first * @param value_names A table that maps values to names. The first
* character of every identifier is ignored and the rest should * character of every identifier is ignored and the rest should
* be the an integer of the value you define a name for. The value * be an integer of the value you define a name for. The value
* is a short description of that value. * is a short description of that value.
* To define labels for a setting named "competition_level" you could * To define labels for a setting named "competition_level" you could
* for example call it like this: * for example call it like this:

View File

@ -17,9 +17,9 @@
/* The reason this exists in C++, is that a user can trash his ai/ or game/ dir, /* The reason this exists in C++, is that a user can trash his ai/ or game/ dir,
* leaving no Scripts available. The complexity to solve this is insane, and * leaving no Scripts available. The complexity to solve this is insane, and
* therefor the alternative is used, and make sure there is always a Script * therefore the alternative is used, and make sure there is always a Script
* available, no matter what the situation is. By defining it in C++, there * available, no matter what the situation is. By defining it in C++, there
* is simply no way a user can delete it, and therefor safe to use. It has * is simply no way a user can delete it, and therefore safe to use. It has
* to be noted that this Script is complete invisible for the user, and impossible * to be noted that this Script is complete invisible for the user, and impossible
* to select manual. It is a fail-over in case no Scripts are available. * to select manual. It is a fail-over in case no Scripts are available.
*/ */

View File

@ -1396,7 +1396,7 @@ bool SettingEntry::UpdateFilterState(StringFilter &filter, bool force_visible, R
* | |-- setting * | |-- setting
* \endverbatim * \endverbatim
* The left-most vertical line is not wanted. It is prevented by setting the * The left-most vertical line is not wanted. It is prevented by setting the
* appropiate bit in the \a parent_last parameter. * appropriate bit in the \a parent_last parameter.
* *
* @param settings_ptr Pointer to current values of all settings * @param settings_ptr Pointer to current values of all settings
* @param left Left-most position in window/panel to start drawing \a first_row * @param left Left-most position in window/panel to start drawing \a first_row

View File

@ -143,7 +143,7 @@ RoadStop *Station::GetPrimaryRoadStop(const RoadVehicle *v) const
for (; rs != NULL; rs = rs->next) { for (; rs != NULL; rs = rs->next) {
/* The vehicle cannot go to this roadstop (different roadtype) */ /* The vehicle cannot go to this roadstop (different roadtype) */
if ((GetRoadTypes(rs->xy) & v->compatible_roadtypes) == ROADTYPES_NONE) continue; if ((GetRoadTypes(rs->xy) & v->compatible_roadtypes) == ROADTYPES_NONE) continue;
/* The vehicle is articulated and can therefor not go the a standard road stop */ /* The vehicle is articulated and can therefore not go to a standard road stop. */
if (IsStandardRoadStopTile(rs->xy) && v->HasArticulatedPart()) continue; if (IsStandardRoadStopTile(rs->xy) && v->HasArticulatedPart()) continue;
/* The vehicle can actually go to this road stop. So, return it! */ /* The vehicle can actually go to this road stop. So, return it! */

View File

@ -290,7 +290,7 @@ static inline height_t RandomHeight(amplitude_t rMax)
* One interpolation and noise round * One interpolation and noise round
* *
* The heights on the map are generated in an iterative process. * The heights on the map are generated in an iterative process.
* We start off with a frequency of 1 (log_frequency == 0), and generate heights only for corners on the most coarsely mesh * We start off with a frequency of 1 (log_frequency == 0), and generate heights only for corners on the most coarsest mesh
* (i.e. only for x/y coordinates which are multiples of the minimum edge length). * (i.e. only for x/y coordinates which are multiples of the minimum edge length).
* *
* After this initial step the frequency is doubled (log_frequency incremented) each iteration to generate corners on the next finer mesh. * After this initial step the frequency is doubled (log_frequency incremented) each iteration to generate corners on the next finer mesh.

View File

@ -1092,7 +1092,7 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi
return true; return true;
} }
} }
/* Quit if it selecting an appropiate bridge type fails a large number of times. */ /* Quit if it selecting an appropriate bridge type fails a large number of times. */
return false; return false;
} }