diff options
Diffstat (limited to 'src')
107 files changed, 262 insertions, 286 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index de8e0ee32..069351a51 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -248,7 +248,7 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoff * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -694,9 +694,9 @@ int GetTileHeightBelowAircraft(const Vehicle *v) * When the maximum is reached the vehicle should consider descending. * When the minimum is reached the vehicle should consider ascending. * - * @param v The vehicle to get the flight levels for. - * @param [out] min_level The minimum bounds for flight level. - * @param [out] max_level The maximum bounds for flight level. + * @param v The vehicle to get the flight levels for. + * @param[out] min_level The minimum bounds for flight level. + * @param[out] max_level The maximum bounds for flight level. */ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_level) { @@ -728,7 +728,7 @@ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_lev /** * Gets the maximum 'flight level' for the holding pattern of the aircraft, - * in pixels 'z_pos' 0, depending on terrain below.. + * in pixels 'z_pos' 0, depending on terrain below. * * @param v The aircraft that may or may not need to decrease its altitude. * @return Maximal aircraft holding altitude, while in normal flight, in pixels. @@ -1889,7 +1889,7 @@ static bool FreeTerminal(Aircraft *v, byte i, byte last_terminal) /** * Get the number of terminals at the airport. - * @param afc Airport description. + * @param apc Airport description. * @return Number of terminals. */ static uint GetNumTerminals(const AirportFTAClass *apc) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 96eada734..48f818c94 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -32,7 +32,6 @@ extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index); * Figure out if two engines got at least one type of cargo in common (refitting if needed) * @param engine_a one of the EngineIDs * @param engine_b the other EngineID - * @param type the type of the engines * @return true if they can both carry the same type of cargo (or at least one of them got no capacity at all) */ static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b) @@ -237,7 +236,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool * @param v The vehicle to find a replacement for * @param c The vehicle's owner (it's faster to forward the pointer than refinding it) * @param always_replace Always replace, even if not old. - * @param [out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found + * @param[out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found * @return Error if the engine to build is not available */ static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, bool always_replace, EngineID &e) diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 1074d1dd7..eae0a378e 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -81,7 +81,7 @@ class ReplaceVehicleWindow : public Window { EngineID sel_engine[2]; ///< Selected engine left and right. GUIEngineList engines[2]; ///< Left and right list of engines. bool replace_engines; ///< If \c true, engines are replaced, if \c false, wagons are replaced (only for trains). - bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right (#update_left and/or #update_right) and no valid engine selected. + bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right and no valid engine selected. GroupID sel_group; ///< Group selected to replace. int details_height; ///< Minimal needed height of the details panels (found so far). byte sort_criteria; ///< Criteria of sorting vehicles. diff --git a/src/blitter/32bpp_anim_sse4.cpp b/src/blitter/32bpp_anim_sse4.cpp index 219fb466b..24d1d7531 100644 --- a/src/blitter/32bpp_anim_sse4.cpp +++ b/src/blitter/32bpp_anim_sse4.cpp @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ -/** @file 32bpp_sse4_anim.cpp Implementation of the SSE4 32 bpp blitter with animation support. */ +/** @file 32bpp_anim_sse4.cpp Implementation of the SSE4 32 bpp blitter with animation support. */ #ifdef WITH_SSE diff --git a/src/blitter/32bpp_anim_sse4.hpp b/src/blitter/32bpp_anim_sse4.hpp index 9d9ad5dd9..5ff1fb01b 100644 --- a/src/blitter/32bpp_anim_sse4.hpp +++ b/src/blitter/32bpp_anim_sse4.hpp @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ -/** @file 32bpp_sse4_anim.hpp A SSE4 32 bpp blitter with animation support. */ +/** @file 32bpp_anim_sse4.hpp A SSE4 32 bpp blitter with animation support. */ #ifndef BLITTER_32BPP_SSE4_ANIM_HPP #define BLITTER_32BPP_SSE4_ANIM_HPP diff --git a/src/blitter/32bpp_sse_type.h b/src/blitter/32bpp_sse_type.h index b32d3c5ab..49c7a68c2 100644 --- a/src/blitter/32bpp_sse_type.h +++ b/src/blitter/32bpp_sse_type.h @@ -7,10 +7,10 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ -/** @file 32bpp_sse_type.hpp Types related to SSE 32 bpp blitter. */ +/** @file 32bpp_sse_type.h Types related to SSE 32 bpp blitter. */ -#ifndef BLITTER_32BPP_SSE_TYPE_HPP -#define BLITTER_32BPP_SSE_TYPE_HPP +#ifndef BLITTER_32BPP_SSE_TYPE_H +#define BLITTER_32BPP_SSE_TYPE_H #ifdef WITH_SSE @@ -55,4 +55,4 @@ typedef union ALIGN(16) um128i { #define TRANSPARENT_NOM_BASE _mm_setr_epi16(256, 256, 256, 256, 256, 256, 256, 256) #endif /* WITH_SSE */ -#endif /* BLITTER_32BPP_SSE_TYPE_HPP */ +#endif /* BLITTER_32BPP_SSE_TYPE_H */ diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index d1e0d6024..b73889506 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -56,7 +56,7 @@ TileIndex GetSouthernBridgeEnd(TileIndex t) /** * Starting at one bridge end finds the other bridge end - * @param t the bridge ramp tile to find the other bridge ramp for + * @param tile the bridge ramp tile to find the other bridge ramp for */ TileIndex GetOtherBridgeEnd(TileIndex tile) { @@ -66,7 +66,7 @@ TileIndex GetOtherBridgeEnd(TileIndex tile) /** * Get the height ('z') of a bridge. - * @param tile the bridge ramp tile to get the bridge height from + * @param t the bridge ramp tile to get the bridge height from * @return the height of the bridge. */ int GetBridgeHeight(TileIndex t) diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 9b96be62e..9e699d6f4 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -602,7 +602,7 @@ uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList: * Returns reserved cargo to the station and removes it from the cache. * @param max_move Maximum amount of cargo to move. * @param dest Station the cargo is returned to. - * @param ID of next the station the cargo wants to go next. + * @param next ID of the next station the cargo wants to go to. * @return Amount of cargo actually returned. */ uint VehicleCargoList::Return(uint max_move, StationCargoList *dest, StationID next) @@ -668,7 +668,7 @@ uint VehicleCargoList::Truncate(uint max_move) * @param dest List to prepend the cargo to. * @param avoid Station to exclude from routing and current next hop of packets to reroute. * @param avoid2 Additional station to exclude from routing. - * @oaram ge GoodsEntry to get the routing info from. + * @param ge GoodsEntry to get the routing info from. */ uint VehicleCargoList::Reroute(uint max_move, VehicleCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge) { @@ -859,7 +859,7 @@ uint StationCargoList::Load(uint max_move, VehicleCargoList *dest, TileIndex loa * @param dest List to append the cargo to. * @param avoid Station to exclude from routing and current next hop of packets to reroute. * @param avoid2 Additional station to exclude from routing. - * @oaram ge GoodsEntry to get the routing info from. + * @param ge GoodsEntry to get the routing info from. */ uint StationCargoList::Reroute(uint max_move, StationCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge) { diff --git a/src/command.cpp b/src/command.cpp index df0cd004c..e7a5a3c36 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -605,7 +605,6 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac /** * Helper to deduplicate the code for returning. * @param cmd the command cost to return. - * @param clear whether to keep the storage changes or not. */ #define return_dcpi(cmd) { _docommand_recursive = 0; return cmd; } diff --git a/src/company_base.h b/src/company_base.h index 1bc4b7f83..9d2bc9000 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -91,7 +91,7 @@ struct CompanyProperties { */ bool is_ai; - Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #Expenses category. + Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #ExpensesType category. CompanyEconomyEntry cur_economy; ///< Economic data of the company of this quarter. CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters. byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy. diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index ee2ed1335..c4e1a89d7 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -188,7 +188,7 @@ void InvalidateCompanyWindows(const Company *company) /** * Verify whether the company can pay the bill. - * @param cost [inout] Money to pay, is changed to an error if the company does not have enough money. + * @param[in,out] cost Money to pay, is changed to an error if the company does not have enough money. * @return Function returns \c true if the company has enough money, else it returns \c false. */ bool CheckCompanyHasMoney(CommandCost &cost) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 31d4fdd1f..ac9ca9bda 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -268,10 +268,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = { EndContainer(), }; -/** - * Window class displaying the company finances. - * @todo #money_width should be calculated dynamically. - */ +/** Window class displaying the company finances. */ struct CompanyFinancesWindow : Window { static Money max_money; ///< The maximum amount of money a company has had this 'run' bool small; ///< Window is toggled to 'small'. @@ -1509,9 +1506,6 @@ static WindowDesc _select_company_manager_face_desc( * Open the simple/advanced company manager face selection window * * @param parent the parent company window - * @param adv simple or advanced face selection window - * @param top previous top position of the window - * @param left previous left position of the window */ static void DoSelectCompanyManagerFace(Window *parent) { diff --git a/src/console.cpp b/src/console.cpp index 6e9b46f6b..2cf9d9695 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -235,8 +235,8 @@ void IConsoleAddSorted(T **base, T *item_new) /** * Remove underscores from a string; the string will be modified! - * @param name The string to remove the underscores from. - * @return #name. + * @param[in,out] name String to remove the underscores from. + * @return \a name, with its contents modified. */ char *RemoveUnderscores(char *name) { diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index f44809d76..d9155a97d 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -62,7 +62,7 @@ public: /** * (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload. - * @param Always reload the file storage cache. + * @param force_reload Always reload the file storage cache. */ void ValidateFileList(bool force_reload = false) { @@ -256,8 +256,8 @@ DEF_CONSOLE_CMD(ConResetTile) /** * Scroll to a tile on the map. - * @param arg1 tile tile number or tile x coordinate. - * @param arg2 optionally tile y coordinate. + * param x tile number or tile x coordinate. + * param y optional y coordinate. * @note When only one argument is given it is intepreted as the tile number. * When two arguments are given, they are interpreted as the tile's x * and y coordinates. @@ -304,7 +304,7 @@ DEF_CONSOLE_CMD(ConScrollToTile) /** * Save the map to a file. - * @param filename the filename to save the map to. + * param filename the filename to save the map to. * @return True when help was displayed or the file attempted to be saved. */ DEF_CONSOLE_CMD(ConSave) diff --git a/src/core/smallmatrix_type.hpp b/src/core/smallmatrix_type.hpp index 9ebf0372c..cd4dee4e3 100644 --- a/src/core/smallmatrix_type.hpp +++ b/src/core/smallmatrix_type.hpp @@ -159,7 +159,7 @@ public: /** * Erase a row, replacing it with the last one. - * @param x Position of the row. + * @param y Position of the row. */ void EraseRow(uint y) { @@ -174,7 +174,7 @@ public: /** * Remove columns from the matrix while preserving the order of other columns. - * @param x First column to remove. + * @param y First column to remove. * @param count Number of consecutive columns to remove. */ void EraseRowPreservingOrder(uint y, uint count = 1) @@ -210,8 +210,8 @@ public: /** * Set the size to a specific width and height, preserving item positions * as far as possible in the process. - * @param width Target width. - * @param height Target height. + * @param new_width Target width. + * @param new_height Target height. */ inline void Resize(uint new_width, uint new_height) { @@ -297,7 +297,7 @@ public: /** * Get column "number" (const) * - * @param X Position of the column. + * @param x Position of the column. * @return Column at "number". */ inline const T *operator[](uint x) const @@ -309,7 +309,7 @@ public: /** * Get column "number" (const) * - * @param X Position of the column. + * @param x Position of the column. * @return Column at "number". */ inline T *operator[](uint x) diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp index d4b102ddc..f57acba25 100644 --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -217,22 +217,22 @@ enum Token { TOKEN_LOCAL, ///< Read a local include TOKEN_GLOBAL, ///< Read a global include TOKEN_IDENTIFIER, ///< Identifier within the data. - TOKEN_DEFINE, ///< (#)define in code - TOKEN_IF, ///< (#)if in code - TOKEN_IFDEF, ///< (#)ifdef in code - TOKEN_IFNDEF, ///< (#)ifndef in code - TOKEN_ELIF, ///< (#)elif in code - TOKEN_ELSE, ///< (#)else in code - TOKEN_ENDIF, ///< (#)endif in code - TOKEN_UNDEF, ///< (#)undef in code - TOKEN_OR, ///< '||' within <tt>#if</tt> expression - TOKEN_AND, ///< '&&' within <tt>#if</tt> expression - TOKEN_DEFINED, ///< 'defined' within <tt>#if</tt> expression - TOKEN_OPEN, ///< '(' within <tt>#if</tt> expression - TOKEN_CLOSE, ///< ')' within <tt>#if</tt> expression - TOKEN_NOT, ///< '!' within <tt>#if</tt> expression - TOKEN_ZERO, ///< '0' within <tt>#if</tt> expression - TOKEN_INCLUDE, ///< (#)include in code + TOKEN_DEFINE, ///< \c \#define in code + TOKEN_IF, ///< \c \#if in code + TOKEN_IFDEF, ///< \c \#ifdef in code + TOKEN_IFNDEF, ///< \c \#ifndef in code + TOKEN_ELIF, ///< \c \#elif in code + TOKEN_ELSE, ///< \c \#else in code + TOKEN_ENDIF, ///< \c \#endif in code + TOKEN_UNDEF, ///< \c \#undef in code + TOKEN_OR, ///< '||' within \c \#if expression + TOKEN_AND, ///< '&&' within \c \#if expression + TOKEN_DEFINED, ///< 'defined' within \c \#if expression + TOKEN_OPEN, ///< '(' within \c \#if expression + TOKEN_CLOSE, ///< ')' within \c \#if expression + TOKEN_NOT, ///< '!' within \c \#if expression + TOKEN_ZERO, ///< '0' within \c \#if expression + TOKEN_INCLUDE, ///< \c \#include in code }; /** Mapping from a C-style keyword representation to a Token. */ @@ -681,8 +681,8 @@ bool ExpressionOr(Lexer *lexer, StringSet *defines, bool verbose) /** Enumerator to tell how long to ignore 'stuff'. */ enum Ignore { NOT_IGNORE, ///< No ignoring. - IGNORE_UNTIL_ELSE, ///< Ignore till a #else is reached. - IGNORE_UNTIL_ENDIF, ///< Ignore till a #endif is reached. + IGNORE_UNTIL_ELSE, ///< Ignore till a \c \#else is reached. + IGNORE_UNTIL_ENDIF, ///< Ignore till a \c \#endif is reached. }; /** diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 79eaa89b1..f09720b35 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -56,8 +56,8 @@ void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p /** * Gets the other end of the aqueduct, if possible. - * @param tile_from The begin tile for the aqueduct. - * @param [out] tile_to The tile till where to show a selection for the aqueduct. + * @param tile_from The begin tile for the aqueduct. + * @param[out] tile_to The tile till where to show a selection for the aqueduct. * @return The other end of the aqueduct, or otherwise a tile in line with the aqueduct to cause the right error message. */ static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = NULL) diff --git a/src/economy.cpp b/src/economy.cpp index fae71f3e4..98989971c 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1242,7 +1242,6 @@ Money CargoPayment::PayTransfer(const CargoPacket *cp, uint count) /** * Prepare the vehicle to be unloaded. - * @param curr_station the station where the consist is at the moment * @param front_v the vehicle to be unloaded */ void PrepareUnload(Vehicle *front_v) diff --git a/src/engine.cpp b/src/engine.cpp index cd96a149f..9f500e1cd 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -573,7 +573,7 @@ static bool IsWagon(EngineID index) } /** - * Update #reliability of engine \a e, (if needed) update the engine GUIs. + * Update #Engine::reliability and (if needed) update the engine GUIs. * @param e %Engine to update. */ static void CalcEngineReliability(Engine *e) diff --git a/src/error_gui.cpp b/src/error_gui.cpp index c8c603afb..1c59b7e8d 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -425,7 +425,7 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel /** * Schedule a list of errors. * Note: This does not try to display the error now. This is useful if the window system is not yet running. - * @param data Error message datas; cleared afterwards + * @param datas Error message datas; cleared afterwards */ void ScheduleErrorMessage(ErrorList &datas) { diff --git a/src/fileio.cpp b/src/fileio.cpp index 3ad5be711..5530965e9 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -347,7 +347,7 @@ char *FioGetFullPath(char *buf, const char *last, Searchpath sp, Subdirectory su /** * Find a path to the filename in one of the search directories. - * @param buf [out] Destination buffer for the path. + * @param[out] buf Destination buffer for the path. * @param last End of the destination buffer. * @param subdir Subdirectory to try. * @param filename Filename to look for. @@ -438,7 +438,7 @@ static FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath s /** * Opens a file from inside a tar archive. * @param entry The entry to open. - * @param filesize [out] If not \c NULL, size of the opened file. + * @param[out] filesize If not \c NULL, size of the opened file. * @return File handle of the opened file, or \c NULL if the file is not available. * @note The file is read from within the tar file, and may not return \c EOF after reading the whole file. */ @@ -460,7 +460,6 @@ FILE *FioFOpenFileTar(TarFileListEntry *entry, size_t *filesize) * Opens a OpenTTD file somewhere in a personal or global directory. * @param filename Name of the file to open. * @param subdir Subdirectory to open. - * @param filename Name of the file to open. * @return File handle of the opened file, or \c NULL if the file is not available. */ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize) @@ -632,7 +631,7 @@ static void SimplifyFileName(char *name) /** * Perform the scanning of a particular subdirectory. - * @param subdir The subdirectory to scan. + * @param sd The subdirectory to scan. * @return The number of found tar files. */ uint TarScanner::DoScan(Subdirectory sd) @@ -1303,7 +1302,7 @@ void SanitizeFilename(char *filename) /** * Load a file into memory. * @param filename Name of the file to load. - * @param lenp [out] Length of loaded data. + * @param[out] lenp Length of loaded data. * @param maxsize Maximum size to load. * @return Pointer to new memory containing the loaded data, or \c NULL if loading failed. * @note If \a maxsize less than the length of the file, loading fails. diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index f20cfd792..9aa5277ac 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -201,7 +201,7 @@ static const TextColour _fios_colours[] = { /** * Sort the collected list save games prior to displaying it in the save/load gui. - * @param [inout] file_list List of save game files found in the directory. + * @param[in,out] file_list List of save game files found in the directory. */ static void SortSaveGameList(FileList &file_list) { diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp index 42ced2008..a32e5b41d 100644 --- a/src/game/game_text.cpp +++ b/src/game/game_text.cpp @@ -142,7 +142,7 @@ struct StringListReader : StringReader { /** * Create the reader. * @param data The data to fill during reading. - * @param file The file we are reading. + * @param strings The language strings we are reading. * @param master Are we reading the master file? * @param translation Are we reading a translation? */ diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 400c0d22f..621117f01 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -771,9 +771,9 @@ void GamelogGRFUpdate(const GRFConfig *oldc, const GRFConfig *newc) * Get some basic information from the given gamelog. * @param gamelog_action Pointer to the gamelog to extract information from. * @param gamelog_actions Number of actions in the given gamelog. - * @param [out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last. - * @param [out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame. - * @param [out] removed_newgrfs Set to true if any NewGRFs have been removed. + * @param[out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last. + * @param[out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame. + * @param[out] removed_newgrfs Set to true if any NewGRFs have been removed. */ void GamelogInfo(LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs) { diff --git a/src/gfx.cpp b/src/gfx.cpp index c9c36019c..605ff7664 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -703,8 +703,8 @@ Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize) } /** - * Get bounding box of a string. Uses parameters set by #DParam if needed. - * Has the same restrictions as #GetStringBoundingBox(const char *str). + * Get bounding box of a string. Uses parameters set by #SetDParam if needed. + * Has the same restrictions as #GetStringBoundingBox(const char *str, FontSize start_fontsize). * @param strid String to examine. * @return Width and height of the bounding box for the string in pixels. */ @@ -761,7 +761,7 @@ void DrawCharCentered(WChar c, int x, int y, TextColour colour) /** * Get the size of a sprite. * @param sprid Sprite to examine. - * @param [out] offset Optionally returns the sprite position offset. + * @param[out] offset Optionally returns the sprite position offset. * @return Sprite size in pixels. * @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position. */ @@ -1170,8 +1170,8 @@ byte GetDigitWidth(FontSize size) /** * Determine the broadest digits for guessing the maximum width of a n-digit number. - * @param [out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.) - * @param [out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.) + * @param[out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.) + * @param[out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.) * @param size Font of the digit */ void GetBroadestDigit(uint *front, uint *next, FontSize size) @@ -1635,8 +1635,8 @@ void SetAnimatedMouseCursor(const AnimCursor *table) * Update cursor position on mouse movement. * @param x New X position. * @param y New Y position. - * @param queued True, if the OS queues mouse warps after pending mouse movement events. - * False, if the warp applies instantaneous. + * @param queued_warp True, if the OS queues mouse warps after pending mouse movement events. + * False, if the warp applies instantaneous. * @return true, if the OS cursor position should be warped back to this->pos. */ bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp) diff --git a/src/gfx_type.h b/src/gfx_type.h index ca9bf9fce..4cfc149a8 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -189,7 +189,7 @@ union Colour { /** * Create a new colour. - * @param The colour in the correct packed format. + * @param data The colour in the correct packed format. */ Colour(uint data = 0) : data(data) { diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index f73027e91..3613ce0d8 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -80,7 +80,7 @@ static uint LoadGrfFile(const char *filename, uint load_index, int file_index) /** * Load an old fashioned GRF file to replace already loaded sprites. * @param filename The name of the file to open. - * @param index_tlb The offsets of each of the sprites. + * @param index_tbl The offsets of each of the sprites. * @param file_index The Fio offset to load the file in. * @return The number of loaded sprites. */ diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index f98189d18..ee4d8170e 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -101,7 +101,7 @@ struct GoalListWindow : public Window { /** * Handle clicking at a goal. - * @param s @Goal clicked at. + * @param s #Goal clicked at. */ void HandleClick(const Goal *s) { @@ -193,7 +193,7 @@ struct GoalListWindow : public Window { /** * Draws either the global goals or the company goal section. * This is a helper method for #DrawWidget. - * @param pos [inout] Vertical line number to draw. + * @param[in,out] pos Vertical line number to draw. * @param cap Number of lines to draw in the window. * @param x Left edge of the text line to draw. * @param y Vertical position of the top edge of the window. @@ -250,8 +250,8 @@ struct GoalListWindow : public Window { /** * Draws a given column of the goal list. * @param column Which column to draw. - * @wid Pointer to the goal list widget. - * @progress_col_width Width of the progress column. + * @param wid Pointer to the goal list widget. + * @param progress_col_width Width of the progress column. * @return max width of drawn text */ void DrawListColumn(GoalColumn column, NWidgetBase *wid, uint progress_col_width) const diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 12cce41f7..66d75fb44 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -98,7 +98,7 @@ void GroupStatistics::Clear() } /** - * Update all caches after loading a game, changing NewGRF etc.. + * Update all caches after loading a game, changing NewGRF, etc. */ /* static */ void GroupStatistics::UpdateAfterLoad() { diff --git a/src/group_gui.cpp b/src/group_gui.cpp index d3e1eafbb..aef934ccf 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -977,11 +977,11 @@ static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner o } /** - * Opens a 'Rename group' window for newly created group - * @param success did command succeed? - * @param tile unused - * @param p1 vehicle type - * @param p2 unused + * Opens a 'Rename group' window for newly created group. + * @param result Did command succeed? + * @param tile Unused. + * @param p1 Vehicle type. + * @param p2 Unused. * @see CmdCreateGroup */ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) @@ -995,7 +995,7 @@ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 /** * Open rename window after adding a vehicle to a new group via drag and drop. - * @param success Did command succeed? + * @param result Did command succeed? * @param tile Unused. * @param p1 Unused. * @param p2 Bit 0-19: Vehicle ID. diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 630dc69d7..17bdbbf61 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -447,9 +447,9 @@ void FixSlopes() * Reads the heightmap with the correct file reader. * @param dft Type of image file. * @param filename Name of the file to load. - * @param [out] x Length of the image. - * @param [out] y Height of the image. - * @param [inout] map If not \c NULL, destination to store the loaded block of image data. + * @param[out] x Length of the image. + * @param[out] y Height of the image. + * @param[in,out] map If not \c NULL, destination to store the loaded block of image data. * @return Whether loading was successful. */ static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 7d1a7e2e6..ee55e490b 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1323,7 +1323,7 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = { * Find a town for the industry, while checking for multiple industries in the same town. * @param tile Position of the industry to build. * @param type Industry type. - * @param [out] town Pointer to return town for the new industry, \c NULL is written if no good town can be found. + * @param[out] t Pointer to return town for the new industry, \c NULL is written if no good town can be found. * @return Succeeded or failed command. * * @pre \c *t != NULL @@ -1365,14 +1365,14 @@ bool IsSlopeRefused(Slope current, Slope refused) /** * Are the tiles of the industry free? - * @param tile Position to check. - * @param it Industry tiles table. - * @param itspec_index The index of the itsepc to build/fund - * @param type Type of the industry. - * @param initial_random_bits The random bits the industry is going to have after construction. - * @param founder Industry founder - * @param creation_type The circumstances the industry is created under. - * @param [out] custom_shape_check Perform custom check for the site. + * @param tile Position to check. + * @param it Industry tiles table. + * @param itspec_index The index of the itsepc to build/fund + * @param type Type of the industry. + * @param initial_random_bits The random bits the industry is going to have after construction. + * @param founder Industry founder + * @param creation_type The circumstances the industry is created under. + * @param[out] custom_shape_check Perform custom check for the site. * @return Failed or succeeded command. */ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable *it, uint itspec_index, int type, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type, bool *custom_shape_check = NULL) @@ -1793,11 +1793,11 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, * @param flags of operations to conduct * @param indspec pointer to industry specifications * @param itspec_index the index of the itsepc to build/fund - * @param seed random seed (possibly) used by industries - * @param initial_random_bits The random bits the industry is going to have after construction. + * @param random_var8f random seed (possibly) used by industries + * @param random_initial_bits The random bits the industry is going to have after construction. * @param founder Founder of the industry * @param creation_type The circumstances the industry is created under. - * @param [out] ip Pointer to store newly created industry. + * @param[out] ip Pointer to store newly created industry. * @return Succeeded or failed command. * * @post \c *ip contains the newly created industry if all checks are successful and the \a flags request actual creation, else it contains \c NULL afterwards. @@ -1961,7 +1961,7 @@ static Industry *CreateNewIndustry(TileIndex tile, IndustryType type, IndustryAv /** * Compute the appearance probability for an industry during map creation. * @param it Industry type to compute. - * @param [out] force_at_least_one Returns whether at least one instance should be forced on map creation. + * @param[out] force_at_least_one Returns whether at least one instance should be forced on map creation. * @return Relative probability for the industry to appear. */ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one) @@ -1986,7 +1986,7 @@ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *forc /** * Compute the probability for constructing a new industry during game play. * @param it Industry type to compute. - * @param [out] min_number Minimal number of industries that should exist at the map. + * @param[out] min_number Minimal number of industries that should exist at the map. * @return Relative probability for the industry to appear. */ static uint16 GetIndustryGamePlayProbability(IndustryType it, byte *min_number) diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 2e06983af..dd1f765a7 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1580,7 +1580,7 @@ struct CargoesField { /** * Connect a cargo from an industry to the #CFT_CARGO column. * @param cargo Cargo to connect. - * @param produced Cargo is produced (if \c false, cargo is assumed to be accepted). + * @param producer Cargo is produced (if \c false, cargo is assumed to be accepted). * @return Horizontal connection index, or \c -1 if not accepted at all. */ int ConnectCargo(CargoID cargo, bool producer) @@ -1697,7 +1697,7 @@ struct CargoesField { /** * Draw the field. * @param xpos Position of the left edge. - * @param vpos Position of the top edge. + * @param ypos Position of the top edge. */ void Draw(int xpos, int ypos) const { diff --git a/src/ini_type.h b/src/ini_type.h index ce383b959..9bd47fd4e 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -70,7 +70,7 @@ struct IniLoadFile { * Open the INI file. * @param filename Name of the INI file. * @param subdir The subdir to load the file from. - * @param size [out] Size of the opened file. + * @param[out] size Size of the opened file. * @return File handle of the opened file, or \c NULL. */ virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) = 0; diff --git a/src/linkgraph/demands.cpp b/src/linkgraph/demands.cpp index f4afbabf0..f1b714820 100644 --- a/src/linkgraph/demands.cpp +++ b/src/linkgraph/demands.cpp @@ -115,7 +115,6 @@ public: * Check if there is any acceptance left for this node. In asymmetric distribution * nodes always accept as long as their demand > 0. * @param to The node to be checked. - * @param to_anno Unused. */ inline bool HasDemandLeft(const Node &to) { return to.Demand() > 0; } }; diff --git a/src/linkgraph/demands.h b/src/linkgraph/demands.h index c3d9dc7cd..8a639b8b1 100644 --- a/src/linkgraph/demands.h +++ b/src/linkgraph/demands.h @@ -30,7 +30,7 @@ public: /** * Call the demand calculator on the given component. - * @param graph Component to calculate the demands for. + * @param job Component to calculate the demands for. */ virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); } diff --git a/src/linkgraph/flowmapper.cpp b/src/linkgraph/flowmapper.cpp index 4b974a809..b78b30335 100644 --- a/src/linkgraph/flowmapper.cpp +++ b/src/linkgraph/flowmapper.cpp @@ -16,7 +16,7 @@ /** * Map the paths generated by the MCF solver into flows associated with nodes. - * @param component the link graph component to be used. + * @param job the link graph component to be used. */ void FlowMapper::Run(LinkGraphJob &job) const { diff --git a/src/linkgraph/linkgraph.cpp b/src/linkgraph/linkgraph.cpp index 50945d361..34b3a4aa0 100644 --- a/src/linkgraph/linkgraph.cpp +++ b/src/linkgraph/linkgraph.cpp @@ -252,8 +252,6 @@ void LinkGraph::Node::RemoveEdge(NodeID to) * least the given capacity and usage, otherwise add the capacity and usage. * In any case set the respective update timestamp(s), according to the given * mode. - * @param from Start node of the edge. - * @param to End node of the edge. * @param capacity Capacity to be added/updated. * @param usage Usage to be added. * @param mode Update mode to be applied. diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index c91fa2058..30c4451ee 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -425,7 +425,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number /** * Set the overlay belonging to this menu and import its company/cargo settings. - * @params overlay New overlay for this menu. + * @param overlay New overlay for this menu. */ void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) { this->overlay = overlay; diff --git a/src/linkgraph/mcf.cpp b/src/linkgraph/mcf.cpp index ecdf792af..544584ef6 100644 --- a/src/linkgraph/mcf.cpp +++ b/src/linkgraph/mcf.cpp @@ -193,7 +193,7 @@ public: * Determines if an extension to the given Path with the given parameters is * better than this path. * @param base Other path. - * @param cap Capacity of the new edge to be added to base. + * @param free_cap Capacity of the new edge to be added to base. * @param dist Distance of the new edge. * @return True if base + the new edge would be better than the path associated * with this annotation. @@ -227,7 +227,7 @@ bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap, * Determines if an extension to the given Path with the given parameters is * better than this path. * @param base Other path. - * @param cap Capacity of the new edge to be added to base. + * @param free_cap Capacity of the new edge to be added to base. * @param dist Distance of the new edge. * @return True if base + the new edge would be better than the path associated * with this annotation. diff --git a/src/map_type.h b/src/map_type.h index 7af391b46..0c57d3770 100644 --- a/src/map_type.h +++ b/src/map_type.h @@ -71,7 +71,7 @@ static const uint MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS; ///< Maximal map s * Approximation of the length of a straight track, relative to a diagonal * track (ie the size of a tile side). * - * #defined instead of const so it can + * \#defined instead of const so it can * stay integer. (no runtime float operations) Is this needed? * Watch out! There are _no_ brackets around here, to prevent intermediate * rounding! Be careful when using this! diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index a80230de1..22ccfa346 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -117,7 +117,7 @@ void DumpTarget::WriteIndent() } } -/** Write a line with indent at the beginning and <LF> at the end. */ +/** Write a line with indent at the beginning and \<LF\> at the end. */ void DumpTarget::WriteLine(const char *format, ...) { WriteIndent(); @@ -143,7 +143,7 @@ void DumpTarget::WriteTile(const char *name, TileIndex tile) } /** - * Open new structure (one level deeper than the current one) 'name = {<LF>'. + * Open new structure (one level deeper than the current one) 'name = {\<LF\>'. */ void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr) { @@ -167,7 +167,7 @@ void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr) } /** - * Close structure '}<LF>'. + * Close structure '}\<LF\>'. */ void DumpTarget::EndStruct() { diff --git a/src/misc/getoptdata.h b/src/misc/getoptdata.h index 5982f01fb..4ce916aa1 100644 --- a/src/misc/getoptdata.h +++ b/src/misc/getoptdata.h @@ -34,7 +34,7 @@ struct GetOptData { int numleft; ///< Number of arguments left in #argv. char **argv; ///< Remaining command line arguments. const OptionData *options; ///< Command line option descriptions. - char *cont; ///< Next call to #MyGetOpt should start here (in the middle of an argument). + char *cont; ///< Next call to #GetOpt should start here (in the middle of an argument). /** * Constructor of the data store. diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index df0045977..e23da4293 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -732,7 +732,7 @@ struct TooltipsWindow : public Window * @param str String to be displayed * @param paramcount number of params to deal with * @param params (optional) up to 5 pieces of additional information that may be added to a tooltip - * @param use_left_mouse_button close the tooltip when the left (true) or right (false) mouse button is released + * @param close_tooltip when the left (true) or right (false) mouse button is released */ void GuiShowTooltips(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip) { @@ -1068,7 +1068,7 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *paren */ struct QueryWindow : public Window { QueryCallbackProc *proc; ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise - uint64 params[10]; ///< local copy of _decode_parameters + uint64 params[10]; ///< local copy of #_global_string_params StringID message; ///< message shown for query window StringID caption; ///< title of window diff --git a/src/music/midifile.cpp b/src/music/midifile.cpp index a2455358f..91f83c529 100644 --- a/src/music/midifile.cpp +++ b/src/music/midifile.cpp @@ -520,8 +520,8 @@ struct MpsMachine { /** * Construct a TTD DOS music format decoder. - * @param songdata Buffer of song data from CAT file, ownership remains with caller - * @param songdatalen Length of the data buffer in bytes + * @param data Buffer of song data from CAT file, ownership remains with caller + * @param length Length of the data buffer in bytes * @param target MidiFile object to add decoded data to */ MpsMachine(const byte *data, size_t length, MidiFile &target) diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index 10a99d275..f4d3d7dd3 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -21,7 +21,7 @@ class MusicDriver : public Driver { public: /** * Play a particular song. - * @param filename The name of file with the song to play. + * @param song The information for the song to play. */ virtual void PlaySong(const MusicSongInfo &song) = 0; diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 4b1332c58..1df2fc82c 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -519,7 +519,7 @@ public: * Create the content list window. * @param desc the window description to pass to Window's constructor. * @param select_all Whether the select all button is allowed or not. - * @param type the main type of content to display or #CONTENT_TYPE_END. + * @param types the main type of content to display or #CONTENT_TYPE_END. * When a type other than #CONTENT_TYPE_END is given, dependencies of * other types are only shown when content that depend on them are * selected. diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index c406b454d..275b6200e 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -2137,7 +2137,7 @@ bool NetworkCompanyHasClients(CompanyID company) /** - * Get the name of the client, if the user did not send it yet, Client #<no> is used. + * Get the name of the client, if the user did not send it yet, Client ID is used. * @param client_name The variable to write the name to. * @param last The pointer to the last element of the destination buffer */ diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 16a6c231f..9c5a406ca 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -194,7 +194,7 @@ static GrfProcessingState _cur; /** * Helper to check whether an image index is valid for a particular NewGRF vehicle. - * @param <T> The type of vehicle. + * @tparam T The type of vehicle. * @param image_index The image index to check. * @return True iff the image index is valid, or 0xFD (use new graphics). */ @@ -734,9 +734,9 @@ static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite) * @param invert_action1_flag Set to true, if palette bit 15 means 'not from action 1'. * @param use_cur_spritesets Whether to use currently referenceable action 1 sets. * @param feature GrfSpecFeature to use spritesets from. - * @param [out] grf_sprite Read sprite and palette. - * @param [out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset) - * @param [out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset) + * @param[out] grf_sprite Read sprite and palette. + * @param[out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset) + * @param[out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset) * @return Read TileLayoutFlags. */ static TileLayoutFlags ReadSpriteLayoutSprite(ByteReader *buf, bool read_flags, bool invert_action1_flag, bool use_cur_spritesets, int feature, PalSpriteID *grf_sprite, uint16 *max_sprite_offset = NULL, uint16 *max_palette_offset = NULL) @@ -1845,7 +1845,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int /** * Define properties for stations - * @param stdid StationID of the first station tile. + * @param stid StationID of the first station tile. * @param numinfo Number of subsequent station tiles to change the property for. * @param prop The property to change. * @param buf The property value. @@ -2553,7 +2553,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt * @param gvid ID of the global variable. This is basically only checked for zerones. * @param numinfo Number of subsequent IDs to change the property for. * @param buf The property value. - * @param [in,out] translation_table Storage location for the translation table. + * @param[in,out] translation_table Storage location for the translation table. * @param name Name of the table for debug output. * @return ChangeInfoResult. */ diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index 0863d0986..6213097bd 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -216,7 +216,6 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as) /** * Store a value into the object's persistent storage. - * @param object Object that we want to query. * @param pos Position in the persistent storage to use. * @param value Value to store. */ diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h index 7b94031fb..791f3d691 100644 --- a/src/newgrf_animation_base.h +++ b/src/newgrf_animation_base.h @@ -31,7 +31,6 @@ template <typename Tbase, typename Tspec, typename Tobj, typename Textra, uint16 struct AnimationBase { /** * Animate a single tile. - * @param cb The callback to actually call. * @param spec Specification related to the tile. * @param obj Object related to the tile. * @param tile Tile to animate changes for. diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index 660642215..eb2cbf08f 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -162,8 +162,7 @@ GenericResolverObject::GenericResolverObject(bool ai_callback, CallbackID callba * @param object pre-populated resolver object * @param param1_grfv7 callback_param1 for GRFs up to version 7. * @param param1_grfv8 callback_param1 for GRFs from version 8 on. - * @param [out] file Optionally returns the GRFFile which made the final decision for the callback result. - * May be NULL if not required. + * @param[out] file Optionally returns the GRFFile which made the final decision for the callback result. May be NULL if not required. * @return callback value if successful or CALLBACK_FAILED */ static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject &object, uint32 param1_grfv7, uint32 param1_grfv8, const GRFFile **file) @@ -202,8 +201,7 @@ static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject &object, ui * @param event 'AI construction event' to pass to callback. (Variable 86) * @param count 'Construction number' to pass to callback. (Variable 87) * @param station_size 'Station size' to pass to callback. (Variable 88) - * @param [out] file Optionally returns the GRFFile which made the final decision for the callback result. - * May be NULL if not required. + * @param[out] file Optionally returns the GRFFile which made the final decision for the callback result. May be NULL if not required. * @return callback value if successful or CALLBACK_FAILED */ uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 default_selection, IndustryType src_industry, IndustryType dst_industry, uint8 distance, AIConstructionEvent event, uint8 count, uint8 station_size, const GRFFile **file) diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index d71e052da..d506eb026 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -1584,8 +1584,8 @@ NewGRFWindow::GUIGRFConfigList::FilterFunction * const NewGRFWindow::filter_func /** * Custom nested widget container for the NewGRF gui. * Depending on the space in the gui, it uses either - * - two column mode, put the #acs and the #avs underneath each other and the #info next to it, or - * - three column mode, put the #avs, #acs, and #info each in its own column. + * - two column mode, put the #acs and the #avs underneath each other and the #inf next to it, or + * - three column mode, put the #avs, #acs, and #inf each in its own column. */ class NWidgetNewGRFDisplay : public NWidgetContainer { public: diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 7815ba36a..bf003fb6f 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -415,7 +415,7 @@ static const GRFFile *GetGrffile(IndustryType type) /** * Constructor of the industries resolver. * @param tile %Tile owned by the industry. - * @param industry %Industry being resolved. + * @param indus %Industry being resolved. * @param type Type of the industry. * @param random_bits Random bits of the new industry. * @param callback Callback ID. diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 69c4b1d07..0b2a55000 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -296,7 +296,7 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge * @param tile Industry tile to trigger. * @param trigger Trigger to trigger. * @param ind Industry of the tile. - * @param [in,out] reseed_industry Collects bits to reseed for the industry. + * @param[in,out] reseed_industry Collects bits to reseed for the industry. */ static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, Industry *ind, uint32 &reseed_industry) { diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 40a966a16..1501cb9b8 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -350,8 +350,8 @@ unhandled: * @param tile %Tile of the object. * @param view View of the object. * @param callback Callback ID. - * @param callback_param1 First parameter (var 10) of the callback. - * @param callback_param2 Second parameter (var 18) of the callback. + * @param param1 First parameter (var 10) of the callback. + * @param param2 Second parameter (var 18) of the callback. */ ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj, TileIndex tile, uint8 view, CallbackID callback, uint32 param1, uint32 param2) diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index 624b0eca8..842184471 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -87,8 +87,8 @@ RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileInde * @param rti The rail type data (spec). * @param tile The tile to get the sprite for. * @param rtsg The type of sprite to draw. - * @param content Where are we drawing the tile? - * @param [out] num_results If not NULL, return the number of sprites in the spriteset. + * @param context Where are we drawing the tile? + * @param[out] num_results If not NULL, return the number of sprites in the spriteset. * @return The sprite to draw. */ SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context, uint *num_results) diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index a5d689bbf..086cbf346 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -118,7 +118,7 @@ static inline uint32 GetVariable(const ResolverObject &object, ScopeResolver *sc /** * Store a value into the persistent storage area (PSA). Default implementation does nothing (for newgrf classes without storage). - * @param pos Position to store into. + * @param reg Position to store into. * @param value Value to store. */ /* virtual */ void ScopeResolver::StorePSA(uint reg, int32 value) {} @@ -308,7 +308,7 @@ const SpriteGroup *RealSpriteGroup::Resolve(ResolverObject &object) const * Process registers and the construction stage into the sprite layout. * The passed construction stage might get reset to zero, if it gets incorporated into the layout * during the preprocessing. - * @param [in, out] stage Construction stage (0-3), or NULL if not applicable. + * @param[in,out] stage Construction stage (0-3), or NULL if not applicable. * @return sprite layout to draw. */ const DrawTileSprites *TileLayoutSpriteGroup::ProcessRegisters(uint8 *stage) const diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 5271b2bfc..d9b79c55a 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -881,7 +881,7 @@ bool CanStationTileHaveWires(TileIndex tile) return statspec == NULL || !HasBit(statspec->wires, GetStationGfx(tile)); } -/** Wrapper for animation control, see #GetStationCallback. */ +/** Wrapper for animation control, see GetStationCallback. */ uint16 GetAnimStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data) { return GetStationCallback(callback, param1, param2, statspec, st, tile); diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index eb4b11c5e..b92b84355 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -329,7 +329,7 @@ struct UnmappedChoiceList : ZeroedMemoryAllocator { * @param language_id The (NewGRF) language ID associated with this string. * @param allow_newlines Whether newlines are allowed in the string or not. * @param str The string to translate. - * @param [out] olen The length of the final string. + * @param[out] olen The length of the final string. * @param byte80 The control code to use as replacement for the 0x80-value. * @return The translated string. */ diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 94cfaccf9..71a39eb3a 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -494,7 +494,7 @@ struct NewsWindow : Window { private: /** - * Moves the window so #newtop is new 'top' coordinate. Makes screen dirty where needed. + * Moves the window to a new #top coordinate. Makes screen dirty where needed. * @param newtop new top coordinate */ void SetWindowTop(int newtop) @@ -962,7 +962,6 @@ void ShowLastNewsMessage() * @param y position of the string * @param colour the colour the string will be shown in * @param *ni NewsItem being printed - * @param maxw maximum width of string in pixels */ static void DrawNewsString(uint left, uint right, int y, TextColour colour, const NewsItem *ni) { diff --git a/src/object_gui.cpp b/src/object_gui.cpp index 57c45d09c..8aabcfdc4 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -520,10 +520,7 @@ static WindowDesc _build_object_desc( _nested_build_object_widgets, lengthof(_nested_build_object_widgets) ); -/** - * Show our object picker. - * @param w The toolbar window we're associated with. - */ +/** Show our object picker. */ void ShowBuildObjectPicker() { /* Don't show the place object button when there are no objects to place. */ diff --git a/src/openttd.cpp b/src/openttd.cpp index 3e11cf038..88739a9ea 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -989,9 +989,9 @@ static void MakeNewEditorWorld() * Load the specified savegame but on error do different things. * If loading fails due to corrupt savegame, bad version, etc. go back to * a previous correct state. In the menu for example load the intro game again. - * @param mode mode of loading, either SL_LOAD or SL_OLD_LOAD - * @param newgm switch to this mode of loading fails due to some unknown error * @param filename file to be loaded + * @param fop mode of loading, always SLO_LOAD + * @param newgm switch to this mode of loading fails due to some unknown error * @param subdir default directory to look for filename, set to 0 if not needed * @param lf Load filter to use, if NULL: use filename + subdir. */ diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index db812f6c5..12a5eec31 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1948,7 +1948,6 @@ void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist, bool reset_order_indic * Clamp the service interval to the correct min/max. The actual min/max values * depend on whether it's in percent or days. * @param interval proposed service interval - * @param company_id the owner of the vehicle * @return Clamped service interval */ uint16 GetServiceIntervalClamped(uint interval, bool ispercent) diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 59b2fccac..d2540ac34 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -625,11 +625,11 @@ char *convert_from_fs(const TCHAR *name, char *utf8_buf, size_t buflen) * Convert from OpenTTD's encoding to that of the environment in * UNICODE. OpenTTD encoding is UTF8, local is wide * @param name pointer to a valid string that will be converted - * @param utf16_buf pointer to a valid wide-char buffer that will receive the + * @param system_buf pointer to a valid wide-char buffer that will receive the * converted string * @param buflen length in wide characters of the receiving buffer * @param console_cp convert to the console encoding instead of the normal system encoding. - * @return pointer to utf16_buf. If conversion fails the string is of zero-length + * @return pointer to system_buf. If conversion fails the string is of zero-length */ TCHAR *convert_to_fs(const char *name, TCHAR *system_buf, size_t buflen, bool console_cp) { diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 974e465f4..dc069d168 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -437,9 +437,9 @@ void UpdateOSKOriginalText(const Window *parent, int button) /** * Check whether the OSK is opened for a specific editbox. - * @parent w Window to check for + * @param w Window to check for * @param button Editbox of \a w to check for - * @return true if the OSK is oppened for \a button. + * @return true if the OSK is opened for \a button. */ bool IsOSKOpenedFor(const Window *w, int button) { diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp index 9ef2bca47..8bd63beb7 100644 --- a/src/pathfinder/npf/aystar.cpp +++ b/src/pathfinder/npf/aystar.cpp @@ -156,7 +156,7 @@ void AyStar::CheckTile(AyStarNode *current, OpenListNode *parent) * his neighbour items. If they are valid, they are added to be checked too. * @return Possible values: * - #AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path has been found. - * - #AYSTAR_LIMIT_REACHED : Indicates that the max_nodes limit has been reached. + * - #AYSTAR_LIMIT_REACHED : Indicates that the max_search_nodes limit has been reached. * - #AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found. * - #AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try. */ diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h index eaa70bf91..4ee9df332 100644 --- a/src/pathfinder/npf/aystar.h +++ b/src/pathfinder/npf/aystar.h @@ -30,7 +30,7 @@ enum AystarStatus { AYSTAR_EMPTY_OPENLIST, ///< All items are tested, and no path has been found. AYSTAR_STILL_BUSY, ///< Some checking was done, but no path found yet, and there are still items left to try. AYSTAR_NO_PATH, ///< No path to the goal was found. - AYSTAR_LIMIT_REACHED, ///< The #max_nodes limit has been reached, aborting search. + AYSTAR_LIMIT_REACHED, ///< The #AyStar::max_search_nodes limit has been reached, aborting search. AYSTAR_DONE, ///< Not an end-tile, or wrong direction. }; @@ -93,9 +93,9 @@ typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNod typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent); /** - * This function requests the tiles around the current tile and put them in #tiles_around. - * #tiles_around is never reset, so if you are not using directions, just leave it alone. - * \warning Never add more tiles_around than memory allocated for it. + * This function requests the tiles around the current tile and put them in #neighbours. + * #neighbours is never reset, so if you are not using directions, just leave it alone. + * @warning Never add more #neighbours than memory allocated for it. */ typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current); diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp index e82f869f1..87e65fd26 100644 --- a/src/pathfinder/yapf/nodelist.hpp +++ b/src/pathfinder/yapf/nodelist.hpp @@ -25,7 +25,7 @@ template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_> class CNodeList_HashTableT { public: typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class. - typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of #HashTable. + typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of this class. typedef SmallArray<Titem_, 65536, 256> CItemArray; ///< Type that we will use as item container. typedef CHashTableT<Titem_, Thash_bits_open_ > COpenList; ///< How pointers to open nodes will be stored. typedef CHashTableT<Titem_, Thash_bits_closed_> CClosedList; ///< How pointers to closed nodes will be stored. diff --git a/src/rail.cpp b/src/rail.cpp index d538064a2..1664f78e9 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -251,7 +251,7 @@ RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date) /** * Get the rail types the given company can build. - * @param c the company to get the rail types for. + * @param company the company to get the rail types for. * @return the rail types. */ RailTypes GetCompanyRailtypes(CompanyID company) diff --git a/src/rail.h b/src/rail.h index 1bc403d7f..b7258d301 100644 --- a/src/rail.h +++ b/src/rail.h @@ -239,7 +239,7 @@ public: * When #INVALID_DATE or a vehicle using this railtype gets introduced earlier, * the vehicle's introduction date will be used instead for this railtype. * The introduction at this date is furthermore limited by the - * #introduction_required_types. + * #introduction_required_railtypes. */ Date introduction_date; diff --git a/src/road_func.h b/src/road_func.h index c4af229d5..06be7c4aa 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -39,7 +39,7 @@ static inline bool IsValidRoadType(RoadType rt) /** * Whether the given roadtype is valid. - * @param rt the roadtype to check for validness + * @param r the roadtype to check for validness * @return true if and only if valid */ static inline bool IsValidRoadBits(RoadBits r) diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index ed67a5221..207a3f23b 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -255,7 +255,7 @@ void RoadVehUpdateCache(RoadVehicle *v, bool same_length) * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp index a65f4fc8a..6044316a4 100644 --- a/src/saveload/linkgraph_sl.cpp +++ b/src/saveload/linkgraph_sl.cpp @@ -132,7 +132,7 @@ static const SaveLoad _edge_desc[] = { /** * Save/load a link graph. - * @param comp Link graph to be saved or loaded. + * @param lg Link graph to be saved or loaded. */ void SaveLoad_LinkGraph(LinkGraph &lg) { diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index f9c3efd75..f23d13a08 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2786,7 +2786,7 @@ SaveOrLoadResult LoadWithFilter(LoadFilter *reader) * Main Save or Load function where the high-level saveload functions are * handled. It opens the savegame, selects format and checks versions * @param filename The name of the savegame being created/loaded - * @param mode Save or load mode. Load can also be a TTD(Patch) game. Use #SL_LOAD, #SL_OLD_LOAD, #SL_LOAD_CHECK, or #SL_SAVE. + * @param fop Save or load mode. Load can also be a TTD(Patch) game. * @param sb The sub directory to save the savegame in * @param threaded True when threaded saving is allowed * @return Return the result of the action. #SL_OK, #SL_ERROR, or #SL_REINIT ("unload" the game) diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 3405f3351..cca56ce07 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -488,7 +488,7 @@ static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_ * Get the NumberType of a setting. This describes the integer type * as it is represented in memory * @param type VarType holding information about the variable-type - * @return return the SLE_VAR_* part of a variable-type description + * @return the SLE_VAR_* part of a variable-type description */ static inline VarType GetVarMemType(VarType type) { @@ -496,10 +496,10 @@ static inline VarType GetVarMemType(VarType type) } /** - * Get the #FileType of a setting. This describes the integer type + * Get the FileType of a setting. This describes the integer type * as it is represented in a savegame/file * @param type VarType holding information about the file-type - * @param return the SLE_FILE_* part of a variable-type description + * @return the SLE_FILE_* part of a variable-type description */ static inline VarType GetVarFileType(VarType type) { diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 1e7a45645..700a06566 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -708,7 +708,7 @@ static bool MakeSmallScreenshot(bool crashlog) /** * Configure a ViewPort for rendering (a part of) the map into a screenshot. * @param t Screenshot type - * @param [out] vp Result viewport + * @param[out] vp Result viewport */ void SetupScreenshotViewport(ScreenshotType t, ViewPort *vp) { @@ -764,7 +764,7 @@ static bool MakeLargeWorldScreenshot(ScreenshotType t) /** * Callback for generating a heightmap. Supports 8bpp grayscale only. * @param userdata Pointer to user data. - * @param buf Destination buffer. + * @param buffer Destination buffer. * @param y Line number of the first line to write. * @param pitch Number of pixels to write (1 byte for 8bpp, 4 bytes for 32bpp). @see Colour * @param n Number of lines to write. diff --git a/src/settings.cpp b/src/settings.cpp index d81945022..0dc1e24d4 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1459,7 +1459,7 @@ static int DecodeHexNibble(char c) * Parse a sequence of characters (supposedly hex digits) into a sequence of bytes. * After the hex number should be a \c '|' character. * @param pos First character to convert. - * @param dest [out] Output byte array to write the bytes. + * @param[out] dest Output byte array to write the bytes. * @param dest_size Number of bytes in \a dest. * @return Whether reading was successful. */ @@ -1748,7 +1748,7 @@ void SaveToConfig() /** * Get the list of known NewGrf presets. - * @param list[inout] Pointer to list for storing the preset names. + * @param[in,out] list Pointer to list for storing the preset names. */ void GetGRFPresetList(GRFPresetList *list) { diff --git a/src/settings_type.h b/src/settings_type.h index f9cc00f3a..690f6d803 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -99,7 +99,7 @@ struct GUISettings { bool smooth_scroll; ///< smooth scroll viewports bool measure_tooltip; ///< show a permanent tooltip when dragging tools byte liveries; ///< options for displaying company liveries, 0=none, 1=self, 2=all - bool prefer_teamchat; ///< choose the chat message target with <ENTER>, true=all clients, false=your team + bool prefer_teamchat; ///< choose the chat message target with \<ENTER\>, true=all clients, false=your team uint8 advanced_vehicle_list; ///< use the "advanced" vehicle list uint8 loading_indicators; ///< show loading indicators uint8 default_rail_type; ///< the default rail type for the rail GUI diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index dd92e2627..44a3f6f26 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -205,7 +205,6 @@ static const char *DEFAULTS_GROUP_NAME = "defaults"; ///< Name of the group c /** * Load the INI file. * @param filename Name of the file to load. - * @param subdir The subdirectory to load from. * @return Loaded INI data. */ static IniLoadFile *LoadIniFile(const char *filename) @@ -413,12 +412,12 @@ static const OptionData _opts[] = { * After loading, the [pre-amble] group is copied verbatim if it exists. * * For every group with a name that matches a template name the template is written. - * It starts with a optional '#if' line if an 'if' item exists in the group. The item - * value is used as condition. Similarly, '#ifdef' and '#ifndef' lines are also written. + * It starts with a optional \c \#if line if an 'if' item exists in the group. The item + * value is used as condition. Similarly, \c \#ifdef and \c \#ifndef lines are also written. * Below the macro processor directives, the value of the template is written * at a line with its variables replaced by item values of the group being written. * If the group has no item for the variable, the [defaults] group is tried as fall back. - * Finally, '#endif' lines are written to match the macro processor lines. + * Finally, \c \#endif lines are written to match the macro processor lines. * * Last but not least, the [post-amble] group is copied verbatim. * diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index ca8bdfc8e..e606afc0c 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -654,7 +654,7 @@ bool Ship::Tick() * @param flags type of operation. * @param e the engine to build. * @param data unused. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 7e3e75953..135d7491c 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -416,7 +416,7 @@ static const byte _tiletype_importance[] = { /** * Return the colour a tile would be displayed with in the small map in mode "Contour". * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Contour" */ static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t) @@ -429,7 +429,7 @@ static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Vehicles". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Vehicles" */ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t) @@ -442,7 +442,7 @@ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Industries". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Industries" */ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t) @@ -455,7 +455,7 @@ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Routes". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Routes" */ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t) @@ -488,7 +488,7 @@ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "link stats". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "link stats" */ static inline uint32 GetSmallMapLinkStatsPixels(TileIndex tile, TileType t) @@ -511,7 +511,7 @@ static const uint32 _vegetation_clear_bits[] = { * Return the colour a tile would be displayed with in the smallmap in mode "Vegetation". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the smallmap in mode "Vegetation" */ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t) @@ -538,7 +538,7 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t) * Return the colour a tile would be displayed with in the small map in mode "Owner". * * @param tile The tile of which we would like to get the colour. - * @param t Effective tile type of the tile (see #GetTileColours). + * @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours). * @return The colour of tile in the small map in mode "Owner" */ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile, TileType t) @@ -611,7 +611,7 @@ inline Point SmallMapWindow::RemapTile(int tile_x, int tile_y) const * that tile for a point in the smallmap. * @param px Horizontal coordinate of the pixel. * @param py Vertical coordinate of the pixel. - * @param sub[out] Pixel position at the tile (0..3). + * @param[out] sub Pixel position at the tile (0..3). * @param add_sub Add current #subscroll to the position. * @return Tile being displayed at the given position relative to #scroll_x and #scroll_y. * @note The #subscroll offset is already accounted for. @@ -641,11 +641,11 @@ inline Point SmallMapWindow::PixelToTile(int px, int py, int *sub, bool add_sub) /** * Compute base parameters of the smallmap such that tile (\a tx, \a ty) starts at pixel (\a x, \a y). - * @param tx Tile x coordinate. - * @param ty Tile y coordinate. - * @param x Non-negative horizontal position in the display where the tile starts. - * @param y Non-negative vertical position in the display where the tile starts. - * @param sub [out] Value of #subscroll needed. + * @param tx Tile x coordinate. + * @param ty Tile y coordinate. + * @param x Non-negative horizontal position in the display where the tile starts. + * @param y Non-negative vertical position in the display where the tile starts. + * @param[out] sub Value of #subscroll needed. * @return #scroll_x, #scroll_y values. */ Point SmallMapWindow::ComputeScroll(int tx, int ty, int x, int y, int *sub) diff --git a/src/station_base.h b/src/station_base.h index 5e16b0d54..086d4332c 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -516,7 +516,7 @@ private: public: /** * Construct the iterator. - * @param ta Area, i.e. begin point and width/height of to-be-iterated area. + * @param st Station the airport is part of. */ AirportTileIterator(const Station *st) : OrthogonalTileIterator(st->airport), st(st) { diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 6dd7bb2fd..ca5cbac8b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -662,7 +662,7 @@ static void UpdateStationSignCoord(BaseStation *st) /** * Common part of building various station parts and possibly attaching them to an existing one. - * @param [in,out] st Station to attach to + * @param[in,out] st Station to attach to * @param flags Command flags * @param reuse Whether to try to reuse a deleted station (gray sign) if possible * @param area Area occupied by the new part @@ -2624,9 +2624,9 @@ const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx) * Check whether a sprite is a track sprite, which can be replaced by a non-track ground sprite and a rail overlay. * If the ground sprite is suitable, \a ground is replaced with the new non-track ground sprite, and \a overlay_offset * is set to the overlay to draw. - * @param ti Positional info for the tile to decide snowyness etc. May be NULL. - * @param [in,out] ground Groundsprite to draw. - * @param [out] overlay_offset Overlay to draw. + * @param ti Positional info for the tile to decide snowyness etc. May be NULL. + * @param[in,out] ground Groundsprite to draw. + * @param[out] overlay_offset Overlay to draw. * @return true if overlay can be drawn. */ bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset) diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 52738ab13..3f64b139a 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -802,7 +802,6 @@ static const NWidgetPart _nested_station_view_widgets[] = { * @param left left most coordinate to draw on * @param right right most coordinate to draw on * @param y y coordinate - * @param width the width of the view */ static void DrawCargoIcons(CargoID i, uint waiting, int left, int right, int y) { diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 385ca72b2..8d46b1b27 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -85,7 +85,7 @@ void LangString::FreeTranslation() /** * Create a new string data container. - * @param max_strings The maximum number of strings. + * @param tabs The maximum number of strings. */ StringData::StringData(size_t tabs) : tabs(tabs), max_strings(tabs * TAB_SIZE) { diff --git a/src/string_base.h b/src/string_base.h index e1eaed349..02856cf1c 100644 --- a/src/string_base.h +++ b/src/string_base.h @@ -41,9 +41,9 @@ public: /** * Change the current string cursor. - * @param p New cursor position. + * @param pos New cursor position. * @return Actual new cursor position at the next valid character boundary. - * @pre p has to be inside the current string. + * @pre pos has to be inside the current string. */ virtual size_t SetCurPosition(size_t pos) = 0; diff --git a/src/strings.cpp b/src/strings.cpp index b79350318..1ff7e2aea 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -56,7 +56,7 @@ icu::Collator *_current_collator = NULL; ///< Collator for the language #endif /* WITH_ICU_SORT */ static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam. -static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters +static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_global_string_params StringParameters _global_string_params(_global_string_params_data, 20, _global_string_params_type); /** Reset the type array. */ @@ -760,11 +760,10 @@ uint ConvertDisplaySpeedToKmhishSpeed(uint speed) } /** * Parse most format codes within a string and write the result to a buffer. - * @param buff The buffer to write the final string to. - * @param str The original string with format codes. - * @param args Pointer to extra arguments used by various string codes. - * @param case_index - * @param last Pointer to just past the end of the buff array. + * @param buff The buffer to write the final string to. + * @param str_arg The original string with format codes. + * @param args Pointer to extra arguments used by various string codes. + * @param last Pointer to just past the end of the buff array. * @param dry_run True when the argt array is not yet initialized. */ static char *FormatString(char *buff, const char *str_arg, StringParameters *args, const char *last, uint case_index, bool game_script, bool dry_run) @@ -2003,7 +2002,7 @@ const char *GetCurrentLanguageIsoCode() /** * Check whether there are glyphs missing in the current language. - * @param Pointer to an address for storing the text pointer. + * @param[out] str Pointer to an address for storing the text pointer. * @return If glyphs are missing, return \c true, else return \c false. * @post If \c true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph. */ diff --git a/src/textbuf.cpp b/src/textbuf.cpp index 3d219e916..61e449d3a 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -367,7 +367,6 @@ bool Textbuf::MovePos(uint16 keycode) /** * Initialize the textbuffer by supplying it the buffer to write into * and the maximum length of this buffer - * @param buf the buffer that will be holding the data for input * @param max_bytes maximum size in bytes, including terminating '\0' * @param max_chars maximum size in chars, including terminating '\0' */ diff --git a/src/tile_map.cpp b/src/tile_map.cpp index c566ad02c..d73beeb88 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -70,11 +70,11 @@ uint TileHeightOutsideMap(int x, int y) /** * Get a tile's slope given the heigh of its four corners. - * @param hnorth The height at the northern corner in the same unit as TileHeight. - * @param hwest The height at the western corner in the same unit as TileHeight. - * @param heast The height at the eastern corner in the same unit as TileHeight. - * @param hsouth The height at the southern corner in the same unit as TileHeight. - * @param [out] h The lowest height of the four corners. + * @param hnorth The height at the northern corner in the same unit as TileHeight. + * @param hwest The height at the western corner in the same unit as TileHeight. + * @param heast The height at the eastern corner in the same unit as TileHeight. + * @param hsouth The height at the southern corner in the same unit as TileHeight. + * @param[out] h The lowest height of the four corners. * @return The slope. */ static Slope GetTileSlopeGivenHeight(int hnorth, int hwest, int heast, int hsouth, int *h) @@ -134,7 +134,8 @@ Slope GetTileSlope(TileIndex tile, int *h) /** * Return the slope of a given tile outside the map. * - * @param tile Tile outside the map to compute slope of. + * @param x X-coordinate of the tile outside to compute height of. + * @param y Y-coordinate of the tile outside to compute height of. * @param h If not \c NULL, pointer to storage of z height. * @return Slope of the tile outside map, except for the HALFTILE part. */ @@ -194,7 +195,8 @@ int GetTileZ(TileIndex tile) /** * Get bottom height of the tile outside map. * - * @param tile Tile outside the map to compute height of. + * @param x X-coordinate of the tile outside to compute height of. + * @param y Y-coordinate of the tile outside to compute height of. * @return Minimum height of the tile outside the map. */ int GetTilePixelZOutsideMap(int x, int y) @@ -229,7 +231,8 @@ int GetTileMaxZ(TileIndex t) * * @see Detailed description in header. * - * @param tile Tile outside to compute height of. + * @param x X-coordinate of the tile outside to compute height of. + * @param y Y-coordinate of the tile outside to compute height of. * @return Maximum height of the tile. */ int GetTileMaxPixelZOutsideMap(int x, int y) diff --git a/src/tile_map.h b/src/tile_map.h index 66726df61..7ee5727be 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -293,7 +293,7 @@ int GetTilePixelZOutsideMap(int x, int y); /** * Get top height of the tile - * @param t Tile to compute height of + * @param tile Tile to compute height of * @return Maximum height of the tile */ static inline int GetTileMaxPixelZ(TileIndex tile) diff --git a/src/tilematrix_type.hpp b/src/tilematrix_type.hpp index 56f254143..f9c7392b2 100644 --- a/src/tilematrix_type.hpp +++ b/src/tilematrix_type.hpp @@ -87,7 +87,7 @@ public: /** * Get the area of the matrix square that contains a specific tile. - * @param The tile to get the map area for. + * @param tile The tile to get the map area for. * @param extend Extend the area by this many squares on all sides. * @return Tile area containing the tile. */ diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 664dc8034..5dd45561f 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -139,7 +139,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID /** * Callback for when a time has been chosen to start the time table - * @param window the window related to the setting of the date + * @param w the window related to the setting of the date * @param date the actually chosen date */ static void ChangeTimetableStartCallback(const Window *w, Date date) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 6ebf4e298..b8c102ef3 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -3145,7 +3145,7 @@ static void UpdateTownRating(Town *t) /** * Updates town grow counter after growth rate change. * Preserves relative house builting progress whenever it can. - * @param town The town to calculate grow counter for + * @param t The town to calculate grow counter for * @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated) */ static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate) @@ -3160,7 +3160,7 @@ static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate) /** * Calculates amount of active stations in the range of town (HZB_TOWN_EDGE). - * @param town The town to calculate stations for + * @param t The town to calculate stations for * @returns Amount of active stations */ static int CountActiveStations(Town *t) @@ -3180,7 +3180,7 @@ static int CountActiveStations(Town *t) /** * Calculates town growth rate in normal conditions (custom growth rate not set). * If town growth speed is set to None(0) returns the same rate as if it was Normal(2). - * @param town The town to calculate growth rate for + * @param t The town to calculate growth rate for * @returns Calculated growth rate */ static uint GetNormalGrowthRate(Town *t) @@ -3203,7 +3203,7 @@ static uint GetNormalGrowthRate(Town *t) /** * Updates town growth rate. - * @param town The town to update growth rate for + * @param t The town to update growth rate for */ static void UpdateTownGrowthRate(Town *t) { @@ -3216,7 +3216,7 @@ static void UpdateTownGrowthRate(Town *t) /** * Updates town growth state (whether it is growing or not). - * @param town The town to update growth for + * @param t The town to update growth for */ static void UpdateTownGrowth(Town *t) { diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 60a7b2ca9..b1eeab1bd 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -581,7 +581,7 @@ void GetTrainSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, * @param tile tile of the depot where rail-vehicle is built. * @param flags type of operation. * @param e the engine to build. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const Engine *e, Vehicle **ret) @@ -713,7 +713,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v) * @param flags type of operation. * @param e the engine to build. * @param data bit 0 prevents any free cars from being added to the train. - * @param ret[out] the vehicle that has been built. + * @param[out] ret the vehicle that has been built. * @return the cost of this operation or an error. */ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret) @@ -935,8 +935,8 @@ static void NormaliseSubtypes(Train *chain) * @note All vehicles are/were 'heads' of their chains. * @param original_dst The original destination chain. * @param dst The destination chain after constructing the train. - * @param original_dst The original source chain. - * @param dst The source chain after constructing the train. + * @param original_src The original source chain. + * @param src The source chain after constructing the train. * @return possible error of this command. */ static CommandCost CheckNewTrain(Train *original_dst, Train *dst, Train *original_src, Train *src) @@ -1054,8 +1054,8 @@ static CommandCost CheckTrainAttachment(Train *t) * @note All vehicles are/were 'heads' of their chains. * @param original_dst The original destination chain. * @param dst The destination chain after constructing the train. - * @param original_dst The original source chain. - * @param dst The source chain after constructing the train. + * @param original_src The original source chain. + * @param src The source chain after constructing the train. * @param check_limit Whether to check the vehicle limit. * @return possible error of this command. */ @@ -1511,8 +1511,8 @@ static void MarkTrainAsStuck(Train *v) * Swap the two up/down flags in two ways: * - Swap values of \a swap_flag1 and \a swap_flag2, and * - If going up previously (#GVF_GOINGUP_BIT set), the #GVF_GOINGDOWN_BIT is set, and vice versa. - * @param swap_flag1 [inout] First train flag. - * @param swap_flag2 [inout] Second train flag. + * @param[in,out] swap_flag1 First train flag. + * @param[in,out] swap_flag2 Second train flag. */ static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2) { @@ -2014,9 +2014,9 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance) /** * Locate the closest depot for this consist, and return the information to the caller. - * @param location [out] If not \c NULL and a depot is found, store its location in the given address. - * @param destination [out] If not \c NULL and a depot is found, store its index in the given address. - * @param reverse [out] If not \c NULL and a depot is found, store reversal information in the given address. + * @param[out] location If not \c NULL and a depot is found, store its location in the given address. + * @param[out] destination If not \c NULL and a depot is found, store its index in the given address. + * @param[out] reverse If not \c NULL and a depot is found, store reversal information in the given address. * @return A depot has been found. */ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse) @@ -2307,9 +2307,9 @@ static const byte _initial_tile_subcoord[6][4][3] = { * @param tile The tile the train is about to enter * @param enterdir Diagonal direction the train is coming from * @param tracks Usable tracks on the new tile - * @param path_found [out] Whether a path has been found or not. + * @param[out] path_found Whether a path has been found or not. * @param do_track_reservation Path reservation is requested - * @param dest [out] State and destination of the requested path + * @param[out] dest State and destination of the requested path * @return The best track the train should follow */ static Track DoTrainPathfind(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool do_track_reservation, PBSTileInfo *dest) @@ -2419,11 +2419,11 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, TrackBits *new_tracks, * @param override_railtype Whether all physically compatible railtypes should be followed. * @return True if a path to a safe stopping tile could be reserved. */ -static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_tailtype) +static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_railtype) { switch (_settings_game.pf.pathfinder_for_trains) { - case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_tailtype); - case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_tailtype); + case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_railtype); + case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_railtype); default: NOT_REACHED(); } diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index ce14188fd..27b3ea347 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -204,6 +204,7 @@ static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, int *z) * Is a bridge of the specified type and length available? * @param bridge_type Wanted type of bridge. * @param bridge_len Wanted length of the bridge. + * @param flags Type of operation. * @return A succeeded (the requested bridge is available) or failed (it cannot be built) command. */ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index ae826a50c..9015396a8 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -95,7 +95,7 @@ INSTANTIATE_POOL_METHODS(Vehicle) /** * Determine shared bounds of all sprites. - * @param [out] bounds Shared bounds. + * @param[out] bounds Shared bounds. */ void VehicleSpriteSeq::GetBounds(Rect *bounds) const { @@ -2859,7 +2859,7 @@ const uint16 &Vehicle::GetGroundVehicleFlags() const /** * Calculates the set of vehicles that will be affected by a given selection. - * @param set [inout] Set of affected vehicles. + * @param[in,out] set Set of affected vehicles. * @param v First vehicle of the selection. * @param num_vehicles Number of vehicles in the selection (not counting articulated parts). * @pre \a set must be empty. diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 73f499c48..b2a2a5d7a 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -324,7 +324,7 @@ public: uint16 load_unload_ticks; ///< Ticks to wait before starting next cycle. GroupID group_id; ///< Index of group Pool array - byte subtype; ///< subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes) + byte subtype; ///< subtype (Filled with values from #AircraftSubType/#DisasterSubType/#EffectVehicleType/#GroundVehicleSubtypeFlags) NewGRFCache grf_cache; ///< Cache of often used calculated NewGRF values VehicleCache vcache; ///< Cache of often used vehicle values. @@ -437,7 +437,7 @@ public: /** * Gets the sprite to show for the given direction * @param direction the direction the vehicle is facing - * @param [out] result Vehicle sprite sequence. + * @param[out] result Vehicle sprite sequence. */ virtual void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const { result->Clear(); } diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 339365f78..17ffb53ac 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -206,7 +206,7 @@ CommandCost CmdSellVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * @param engine_type Which engine to refit * @param new_cid Cargo type we are refitting to. * @param new_subtype New cargo subtype. - * @param [out] auto_refit_allowed The refit is allowed as an auto-refit. + * @param[out] auto_refit_allowed The refit is allowed as an auto-refit. * @return Price for refitting */ static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed) @@ -238,7 +238,7 @@ static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID ne * @param engine_type Which engine to refit * @param new_cid Cargo type we are refitting to. * @param new_subtype New cargo subtype. - * @param [out] auto_refit_allowed The refit is allowed as an auto-refit. + * @param[out] auto_refit_allowed The refit is allowed as an auto-refit. * @return Price for refitting */ static CommandCost GetRefitCost(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed) diff --git a/src/vehicle_func.h b/src/vehicle_func.h index 9eb6b9121..17ec9e28d 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -31,7 +31,7 @@ static const Money VEHICLE_PROFIT_THRESHOLD = 10000; ///< Threshold for a /** * Helper to check whether an image index is valid for a particular vehicle. - * @param <T> The type of vehicle. + * @tparam T The type of vehicle. * @param image_index The image index to check. * @return True iff the image index is valid. */ diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 667836f56..4926f7a4f 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -681,7 +681,7 @@ struct RefitWindow : public Window { /** * Gets the #StringID to use for displaying capacity. - * @param Cargo and cargo subtype to check for capacity. + * @param option Cargo and cargo subtype to check for capacity. * @return INVALID_STRING_ID if there is no capacity. StringID to use in any other case. * @post String parameters have been set. */ diff --git a/src/viewport_sprite_sorter_sse4.cpp b/src/viewport_sprite_sorter_sse4.cpp index e685fff57..cd898f00e 100644 --- a/src/viewport_sprite_sorter_sse4.cpp +++ b/src/viewport_sprite_sorter_sse4.cpp @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ -/** @file viewport_sprite_sorter_sse.cpp Sprite sorter that uses SSE4.1. */ +/** @file viewport_sprite_sorter_sse4.cpp Sprite sorter that uses SSE4.1. */ #ifdef WITH_SSE diff --git a/src/widget.cpp b/src/widget.cpp index 4e411ada2..73190f5e6 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -755,7 +755,7 @@ NWidgetBase::NWidgetBase(WidgetType tp) : ZeroedMemoryAllocator() */ /** - * @fn void FillNestedArray(NWidgetBase **array, uint length) + * @fn void NWidgetBase::FillNestedArray(NWidgetBase **array, uint length) * Fill the Window::nested_array array with pointers to nested widgets in the tree. * @param array Base pointer of the array. * @param length Length of the array. @@ -1673,10 +1673,10 @@ NWidgetCore *NWidgetMatrix::GetWidgetFromPos(int x, int y) /** * Get the different offsets that are influenced by scrolling. - * @param [out] start_x The start position in columns (index of the left-most column, swapped in RTL). - * @param [out] start_y The start position in rows. - * @param [out] base_offs_x The base horizontal offset in pixels (X position of the column \a start_x). - * @param [out] base_offs_y The base vertical offset in pixels (Y position of the column \a start_y). + * @param[out] start_x The start position in columns (index of the left-most column, swapped in RTL). + * @param[out] start_y The start position in rows. + * @param[out] base_offs_x The base horizontal offset in pixels (X position of the column \a start_x). + * @param[out] base_offs_y The base vertical offset in pixels (Y position of the column \a start_y). */ void NWidgetMatrix::GetScrollOffsets(int &start_x, int &start_y, int &base_offs_x, int &base_offs_y) { @@ -2805,7 +2805,7 @@ NWidgetContainer *MakeNWidgets(const NWidgetPart *parts, int count, int *biggest * @param parts Array with parts of the widgets. * @param count Length of the \a parts array. * @param biggest_index Pointer to biggest nested widget index collected in the tree. - * @param [out] shade_select Pointer to the inserted shade selection widget (\c NULL if not unserted). + * @param[out] shade_select Pointer to the inserted shade selection widget (\c NULL if not unserted). * @return Root of the nested widget tree, a vertical container containing the entire GUI. * @ingroup NestedWidgetParts * @pre \c biggest_index != NULL diff --git a/src/widget_type.h b/src/widget_type.h index 163d45800..33fb8bce0 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -257,7 +257,7 @@ enum NWidgetDisplay { NDB_SHADE_GREY = 3, ///< Shade viewport to grey-scale. NDB_SHADE_DIMMED = 4, ///< Display dimmed colours in the viewport. /* Button dropdown widget. */ - NDB_DROPDOWN_ACTIVE = 5, ///< Dropdown menu of the button dropdown widget is active. @see #NWID_BUTTON_DRPDOWN + NDB_DROPDOWN_ACTIVE = 5, ///< Dropdown menu of the button dropdown widget is active. @see #NWID_BUTTON_DROPDOWN /* Scrollbar widget. */ NDB_SCROLLBAR_UP = 6, ///< Up-button is lowered bit. NDB_SCROLLBAR_DOWN = 7, ///< Down-button is lowered bit. @@ -400,7 +400,7 @@ enum StackedZeroSizePlanes { * There are also a number of special planes (defined in #StackedZeroSizePlanes) that have zero size in one direction (and are stretchable in * the other direction) or have zero size in both directions. They are used to make all child planes of the widget disappear. * Unlike switching between the regular display planes (that all have the same size), switching from or to one of the zero-sized planes means that - * a #Windows::ReInit() is needed to re-initialize the window since its size changes. + * a #Window::ReInit() is needed to re-initialize the window since its size changes. */ class NWidgetStacked : public NWidgetContainer { public: @@ -567,7 +567,7 @@ private: * Nested widget to display a viewport in a window. * After initializing the nested widget tree, call #InitializeViewport(). After changing the window size, * call #UpdateViewportCoordinates() eg from Window::OnResize(). - * If the #display_flags field contains the #ND_NO_TRANSPARENCY bit, the viewport will disable transparency. + * If the #disp_flags field contains the #ND_NO_TRANSPARENCY bit, the viewport will disable transparency. * Shading to grey-scale is controlled with the #ND_SHADE_GREY bit (used for B&W news papers), the #ND_SHADE_DIMMED gives dimmed colours (for colour news papers). * @todo Class derives from #NWidgetCore, but does not use #colour, #widget_data, or #tool_tip. * @ingroup NestedWidgets @@ -1124,8 +1124,8 @@ static inline NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx = -1) /** * Widget part function for starting a new horizontal container, vertical container, or spacer widget. - * @param tp Type of the new nested widget, #NWID_HORIZONTAL(_LTR), #NWID_VERTICAL, #NWID_SPACER, #NWID_SELECTION, and #NWID_MATRIX. - * @param cont_flags Flags for the containers (#NWID_HORIZONTAL(_LTR) and #NWID_VERTICAL). + * @param tp Type of the new nested widget, #NWID_HORIZONTAL, #NWID_VERTICAL, #NWID_SPACER, #NWID_SELECTION, and #NWID_MATRIX. + * @param cont_flags Flags for the containers (#NWID_HORIZONTAL and #NWID_VERTICAL). * @ingroup NestedWidgetParts */ static inline NWidgetPart NWidget(WidgetType tp, NWidContainerFlags cont_flags = NC_NONE) diff --git a/src/widgets/cheat_widget.h b/src/widgets/cheat_widget.h index 78758f7b1..3209cae23 100644 --- a/src/widgets/cheat_widget.h +++ b/src/widgets/cheat_widget.h @@ -12,7 +12,7 @@ #ifndef WIDGETS_CHEAT_WIDGET_H #define WIDGETS_CHEAT_WIDGET_H -/** Widgets of the #CheatWindow class.. */ +/** Widgets of the #CheatWindow class. */ enum CheatWidgets { WID_C_PANEL, ///< Panel where all cheats are shown in. }; diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index d4c229cb1..f8ddf5569 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -111,7 +111,6 @@ struct DropdownWindow : Window { * @param size Size of the dropdown menu window. * @param wi_colour Colour of the parent widget. * @param scroll Dropdown menu has a scrollbar. - * @param widget Widgets of the dropdown menu window. */ DropdownWindow(Window *parent, const DropDownList *list, int selected, int button, bool instant_close, const Point &position, const Dimension &size, Colours wi_colour, bool scroll) : Window(&_dropdown_desc) @@ -182,7 +181,7 @@ struct DropdownWindow : Window { /** * Find the dropdown item under the cursor. - * @param value [out] Selected item, if function returns \c true. + * @param[out] value Selected item, if function returns \c true. * @return Cursor points to a dropdown item. */ bool GetDropDownItem(int &value) diff --git a/src/window.cpp b/src/window.cpp index d46447d52..d7911bfa4 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -49,7 +49,7 @@ enum ViewportAutoscrolling { }; static Point _drag_delta; ///< delta between mouse cursor and upper left corner of dragged window -static Window *_mouseover_last_w = NULL; ///< Window of the last #MOUSEOVER event. +static Window *_mouseover_last_w = NULL; ///< Window of the last OnMouseOver event. static Window *_last_scroll_window = NULL; ///< Window of the last scroll event. /** List of windows opened at the screen sorted from the front. */ @@ -1115,7 +1115,7 @@ Window *FindWindowById(WindowClass cls, WindowNumber number) /** * Find any window by its class. Useful when searching for a window that uses - * the window number as a #WindowType, like #WC_SEND_NETWORK_MSG. + * the window number as a #WindowClass, like #WC_SEND_NETWORK_MSG. * @param cls Window class * @return Pointer to the found window, or \c NULL if not available */ @@ -1430,7 +1430,6 @@ static void BringWindowToFront(Window *w) /** * Initializes the data (except the position and initial size) of a new Window. - * @param desc Window description. * @param window_number Number being assigned to the new window * @return Window pointer of the newly created window * @pre If nested widgets are used (\a widget is \c NULL), #nested_root and #nested_array_size must be initialized. @@ -2000,7 +1999,7 @@ static void HandleMouseOver() { Window *w = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y); - /* We changed window, put a MOUSEOVER event to the last window */ + /* We changed window, put an OnMouseOver event to the last window */ if (_mouseover_last_w != NULL && _mouseover_last_w != w) { /* Reset mouse-over coordinates of previous window */ Point pt = { -1, -1 }; |