summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ai/api/ai_abstractlist.hpp2
-rw-r--r--src/aircraft_cmd.cpp9
-rw-r--r--src/airport.cpp6
-rw-r--r--src/autoreplace.cpp3
-rw-r--r--src/core/enum_type.hpp3
-rw-r--r--src/currency.cpp10
-rw-r--r--src/depot_gui.cpp6
-rw-r--r--src/disaster_cmd.cpp12
-rw-r--r--src/economy.cpp3
-rw-r--r--src/endian_check.cpp3
-rw-r--r--src/engine.cpp3
-rw-r--r--src/fios_gui.cpp3
-rw-r--r--src/fontcache.cpp3
-rw-r--r--src/gfx.cpp6
-rw-r--r--src/highscore_gui.cpp6
-rw-r--r--src/house.h6
-rw-r--r--src/industry_cmd.cpp12
-rw-r--r--src/landscape.cpp6
-rw-r--r--src/landscape.h3
-rw-r--r--src/misc/array.hpp3
-rw-r--r--src/misc/blob.hpp15
-rw-r--r--src/misc/fixedsizearray.hpp6
-rw-r--r--src/misc/hashtable.hpp3
-rw-r--r--src/misc_gui.cpp3
-rw-r--r--src/music/allegro_m.cpp3
-rw-r--r--src/network/core/packet.h3
-rw-r--r--src/network/network.cpp3
-rw-r--r--src/network/network_gamelist.cpp6
-rw-r--r--src/network/network_gui.cpp9
-rw-r--r--src/network/network_server.cpp2
-rw-r--r--src/newgrf.cpp12
-rw-r--r--src/newgrf_callbacks.h15
-rw-r--r--src/newgrf_canal.h3
-rw-r--r--src/newgrf_commons.cpp3
-rw-r--r--src/newgrf_config.cpp9
-rw-r--r--src/newgrf_gui.cpp3
-rw-r--r--src/newgrf_industries.cpp3
-rw-r--r--src/newgrf_town.cpp3
-rw-r--r--src/news_gui.cpp3
-rw-r--r--src/openttd.cpp3
-rw-r--r--src/order_base.h9
-rw-r--r--src/os/unix/unix.cpp9
-rw-r--r--src/os/windows/win32.cpp18
-rw-r--r--src/pathfinder/follow_track.hpp6
-rw-r--r--src/pathfinder/npf/queue.h15
-rw-r--r--src/pathfinder/opf/opf_ship.cpp3
-rw-r--r--src/pathfinder/yapf/nodelist.hpp3
-rw-r--r--src/pathfinder/yapf/yapf_base.hpp6
-rw-r--r--src/pathfinder/yapf/yapf_common.hpp6
-rw-r--r--src/pathfinder/yapf/yapf_costcache.hpp24
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp3
-rw-r--r--src/pathfinder/yapf/yapf_destrail.hpp9
-rw-r--r--src/pathfinder/yapf/yapf_rail.cpp9
-rw-r--r--src/pathfinder/yapf/yapf_road.cpp12
-rw-r--r--src/pathfinder/yapf/yapf_ship.cpp6
-rw-r--r--src/rail.h6
-rw-r--r--src/rail_cmd.cpp6
-rw-r--r--src/saveload/afterload.cpp3
-rw-r--r--src/saveload/airport_sl.cpp3
-rw-r--r--src/saveload/saveload.cpp5
-rw-r--r--src/saveload/saveload.h9
-rw-r--r--src/settings.cpp45
-rw-r--r--src/settings_internal.h3
-rw-r--r--src/ship_cmd.cpp3
-rw-r--r--src/smallmap_gui.cpp6
-rw-r--r--src/sortlist_type.h3
-rw-r--r--src/sound/allegro_s.cpp3
-rw-r--r--src/spritecache.cpp6
-rw-r--r--src/station.cpp3
-rw-r--r--src/station_gui.cpp2
-rw-r--r--src/strgen/strgen.cpp3
-rw-r--r--src/string.cpp6
-rw-r--r--src/strings.cpp3
-rw-r--r--src/table/airporttiles.h3
-rw-r--r--src/table/elrail_data.h18
-rw-r--r--src/table/industry_land.h3
-rw-r--r--src/table/sprites.h3
-rw-r--r--src/table/town_land.h6
-rw-r--r--src/terraform_gui.cpp5
-rw-r--r--src/tgp.cpp6
-rw-r--r--src/tile_cmd.h3
-rw-r--r--src/tile_map.cpp9
-rw-r--r--src/town.h3
-rw-r--r--src/town_cmd.cpp7
-rw-r--r--src/train_cmd.cpp3
-rw-r--r--src/unmovable_cmd.cpp2
-rw-r--r--src/vehicle.cpp3
-rw-r--r--src/video/allegro_v.cpp3
-rw-r--r--src/video/dedicated_v.cpp3
-rw-r--r--src/viewport.cpp21
-rw-r--r--src/viewport_type.h3
-rw-r--r--src/widget_type.h48
-rw-r--r--src/window.cpp18
93 files changed, 424 insertions, 220 deletions
diff --git a/src/ai/api/ai_abstractlist.hpp b/src/ai/api/ai_abstractlist.hpp
index be20d03c6..e2c0a92b9 100644
--- a/src/ai/api/ai_abstractlist.hpp
+++ b/src/ai/api/ai_abstractlist.hpp
@@ -218,7 +218,7 @@ public:
/**
* Keep all items with this value.
* @param value the value to keep.
- **/
+ */
void KeepValue(int32 value);
/**
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index cb7e5ffcc..6019f477f 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -9,7 +9,8 @@
/**
* @file aircraft_cmd.cpp
- * This file deals with aircraft and airport movements functionalities */
+ * This file deals with aircraft and airport movements functionalities
+ */
#include "stdafx.h"
#include "aircraft.h"
@@ -73,7 +74,8 @@ void Aircraft::UpdateDeltaXY(Direction direction)
/**
* this maps the terminal to its corresponding state and block flag
- * currently set for 10 terms, 4 helipads */
+ * currently set for 10 terms, 4 helipads
+ */
static const byte _airport_terminal_state[] = {2, 3, 4, 5, 6, 7, 19, 20, 0, 0, 8, 9, 21, 22};
static const byte _airport_terminal_flag[] = {0, 1, 2, 3, 4, 5, 22, 23, 0, 0, 6, 7, 24, 25};
@@ -143,7 +145,8 @@ static StationID FindNearestHangar(const Aircraft *v)
/**
* Check if given vehicle has a goto hangar in his orders
* @param v vehicle to inquiry
- * @return true if vehicle v has an airport in the schedule, that has a hangar */
+ * @return true if vehicle v has an airport in the schedule, that has a hangar
+ */
static bool HaveHangarInOrderList(Aircraft *v)
{
const Order *order;
diff --git a/src/airport.cpp b/src/airport.cpp
index 99e513298..24b1bad11 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -230,7 +230,8 @@ AirportFTAClass::~AirportFTAClass()
/**
* Get the number of elements of a source Airport state automata
* Since it is actually just a big array of AirportFTA types, we only
- * know one element from the other by differing 'position' identifiers */
+ * know one element from the other by differing 'position' identifiers
+ */
static uint16 AirportGetNofElements(const AirportFTAbuildup *apFA)
{
uint16 nofelements = 0;
@@ -249,7 +250,8 @@ static uint16 AirportGetNofElements(const AirportFTAbuildup *apFA)
/**
* We calculate the terminal/helipod count based on the data passed to us
* This data (terminals) contains an index as a first element as to how many
- * groups there are, and then the number of terminals for each group */
+ * groups there are, and then the number of terminals for each group
+ */
static byte AirportGetTerminalCount(const byte *terminals, byte *groups)
{
byte nof_terminals = 0;
diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp
index 4c963d3d9..d72a937d0 100644
--- a/src/autoreplace.cpp
+++ b/src/autoreplace.cpp
@@ -20,7 +20,8 @@ INSTANTIATE_POOL_METHODS(EngineRenew)
/**
* Retrieves the EngineRenew that specifies the replacement of the given
- * engine type from the given renewlist */
+ * engine type from the given renewlist
+ */
static EngineRenew *GetEngineReplacement(EngineRenewList erl, EngineID engine, GroupID group)
{
EngineRenew *er = (EngineRenew *)erl;
diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp
index 904ba8975..21518d269 100644
--- a/src/core/enum_type.hpp
+++ b/src/core/enum_type.hpp
@@ -81,7 +81,8 @@ struct MakeEnumPropsT {
* compiler type - checking causes errors like:
* 'HasPowerOnRail' : cannot convert parameter 1 from 'byte' to 'RailType' when
* u->u.rail.railtype is passed as argument or type RailType. In such cases it is better
- * to teach the compiler that u->u.rail.railtype is to be treated as RailType. */
+ * to teach the compiler that u->u.rail.railtype is to be treated as RailType.
+ */
template <typename Tenum_t> struct TinyEnumT;
/** The general declaration of TinyEnumT<> (above) */
diff --git a/src/currency.cpp b/src/currency.cpp
index 8cd02b3dc..444cc112e 100644
--- a/src/currency.cpp
+++ b/src/currency.cpp
@@ -62,7 +62,7 @@ CurrencySpec _currency_specs[NUM_CURRENCY];
* out of the TTDPatch_To_OTTDIndex array that will follow
* Every currency used by Ottd is there, just in case TTDPatch will
* add those missing in its code
- **/
+ */
enum Currencies {
CURR_GBP,
CURR_USD,
@@ -99,7 +99,7 @@ enum Currencies {
* compared to TTDPatch's ones.
* When a grf sends currencies, they are based on the order defined by TTDPatch.
* So, we must reindex them to our own order.
- **/
+ */
const byte TTDPatch_To_OTTDIndex[] =
{
CURR_GBP,
@@ -130,7 +130,7 @@ const byte TTDPatch_To_OTTDIndex[] =
* Only called from newgrf.cpp
* @param grfcurr_id currency id coming from newgrf
* @return the corrected index
- **/
+ */
byte GetNewgrfCurrencyIdConverted(byte grfcurr_id)
{
return (grfcurr_id >= lengthof(TTDPatch_To_OTTDIndex)) ? grfcurr_id : TTDPatch_To_OTTDIndex[grfcurr_id];
@@ -158,7 +158,7 @@ uint GetMaskOfAllowedCurrencies()
/**
* Verify if the currency chosen by the user is about to be converted to Euro
- **/
+ */
void CheckSwitchToEuro()
{
if (_currency_specs[_settings_game.locale.currency].to_euro != CF_NOEURO &&
@@ -177,7 +177,7 @@ void CheckSwitchToEuro()
* if ever it is flagged to true. In which case, the total size of the memory to move
* will be one currency spec less, thus preserving the custom curreny from been
* overwritten.
- **/
+ */
void ResetCurrencies(bool preserve_custom)
{
memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs) - (preserve_custom ? sizeof(_custom_currency) : 0));
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 39e3fbacf..eaf7fcb22 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -161,7 +161,8 @@ static void TrainDepotMoveVehicle(const Vehicle *wagon, VehicleID sel, const Veh
/**
* Array containing the cell size in pixels of the #DEPOT_WIDGET_MATRIX widget for each vehicle type.
- * @note The train vehicle type uses the entire row for each train. */
+ * @note The train vehicle type uses the entire row for each train.
+ */
static Dimension _base_block_sizes[4];
static void InitBlocksizeForShipAircraft(VehicleType type)
@@ -197,7 +198,8 @@ static void InitBlocksizeForShipAircraft(VehicleType type)
/**
* Set the size of the blocks in the window so we can be sure that they are big enough for the vehicle sprites in the current game.
- * @note Calling this function once for each game is enough. */
+ * @note Calling this function once for each game is enough.
+ */
void InitDepotWindowBlockSizes()
{
_base_block_sizes[VEH_TRAIN].width = 0;
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index aa8a8f2f2..803a09854 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -131,7 +131,8 @@ static void DisasterVehicleUpdateImage(DisasterVehicle *v)
/**
* Initialize a disaster vehicle. These vehicles are of type VEH_DISASTER, are unclickable
- * and owned by nobody */
+ * and owned by nobody
+ */
static void InitializeDisasterVehicle(DisasterVehicle *v, int x, int y, byte z, Direction direction, byte subtype)
{
v->x_pos = x;
@@ -674,7 +675,8 @@ typedef void DisasterInitProc();
/**
* Zeppeliner which crashes on a small airport if one found,
- * otherwise crashes on a random tile */
+ * otherwise crashes on a random tile
+ */
static void Disaster_Zeppeliner_Init()
{
if (!Vehicle::CanAllocateItem(2)) return;
@@ -703,7 +705,8 @@ static void Disaster_Zeppeliner_Init()
/**
* Ufo which flies around aimlessly from the middle of the map a bit
- * until it locates a road vehicle which it targets and then destroys */
+ * until it locates a road vehicle which it targets and then destroys
+ */
static void Disaster_Small_Ufo_Init()
{
if (!Vehicle::CanAllocateItem(2)) return;
@@ -850,7 +853,8 @@ static void Disaster_Big_Submarine_Init()
/**
* Coal mine catastrophe, destroys a stretch of 30 tiles of
- * land in a certain direction */
+ * land in a certain direction
+ */
static void Disaster_CoalMine_Init()
{
int index = GB(Random(), 0, 4);
diff --git a/src/economy.cpp b/src/economy.cpp
index 9c24e042c..ce0a717b8 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -162,7 +162,8 @@ Money CalculateCompanyValue(const Company *c, bool including_loan)
* @param update the economy with calculated score
* @param c company been evaluated
* @return actual score of this company
- * */
+ *
+ */
int UpdateCompanyRatingAndValue(Company *c, bool update)
{
Owner owner = c->index;
diff --git a/src/endian_check.cpp b/src/endian_check.cpp
index 5c6d2ecd9..bd6cef649 100644
--- a/src/endian_check.cpp
+++ b/src/endian_check.cpp
@@ -15,7 +15,8 @@
*
* After that it outputs the contents of an include files (endian.h)
* that says or TTD_LITTLE_ENDIAN, or TTD_BIG_ENDIAN. Makefile takes
- * care of the real writing to the file. */
+ * care of the real writing to the file.
+ */
#include <stdio.h>
#include <string.h>
diff --git a/src/engine.cpp b/src/engine.cpp
index 6d5ace215..e3f801061 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -40,7 +40,8 @@ EngineOverrideManager _engine_mngr;
/**
* Year that engine aging stops. Engines will not reduce in reliability
- * and no more engines will be introduced */
+ * and no more engines will be introduced
+ */
static Year _year_engine_aging_stops;
/** Number of engines of each vehicle type in original engine data */
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 79d22e84b..4c3296478 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -698,7 +698,8 @@ static const WindowDesc _save_dialog_desc(
/**
* These values are used to convert the file/operations mode into a corresponding file type.
- * So each entry, as expressed by the related comment, is based on the enum */
+ * So each entry, as expressed by the related comment, is based on the enum
+ */
static const FileType _file_modetotype[] = {
FT_SAVEGAME, ///< used for SLD_LOAD_GAME
FT_SCENARIO, ///< used for SLD_LOAD_SCENARIO
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index aaf3261d0..85d9fb9b6 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -44,7 +44,8 @@ static const byte SHADOW_COLOUR = 2;
/**
* Get the font loaded into a Freetype face by using a font-name.
- * If no appropiate font is found, the function returns an error */
+ * If no appropiate font is found, the function returns an error
+ */
#ifdef WIN32
#include <windows.h>
#include <shlobj.h> /* SHGetFolderPath */
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 3ba67d46e..5d2bc2bbf 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -970,7 +970,8 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str,
* but not every possible combination
* @param str string to calculate pixel-width
* @param start_fontsize Fontsize to start the text with
- * @return string width and height in pixels */
+ * @return string width and height in pixels
+ */
Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize)
{
FontSize size = start_fontsize;
@@ -1726,7 +1727,8 @@ void MarkWholeScreenDirty()
* offset from the calling window coordinates
* @return return false if the requested rectangle is not possible with the
* current dpi pointer. Only continue of the return value is true, or you'll
- * get some nasty results */
+ * get some nasty results
+ */
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height)
{
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp
index 0fd4c7d82..c6ffcb827 100644
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -220,7 +220,8 @@ static const WindowDesc _endgame_desc(
/**
* Show the highscore table for a given difficulty. When called from
* endgame ranking is set to the top5 element that was newly added
- * and is thus highlighted */
+ * and is thus highlighted
+ */
void ShowHighscoreTable(int difficulty, int8 ranking)
{
DeleteWindowByClass(WC_HIGHSCORE);
@@ -229,7 +230,8 @@ void ShowHighscoreTable(int difficulty, int8 ranking)
/**
* Show the endgame victory screen in 2050. Update the new highscore
- * if it was high enough */
+ * if it was high enough
+ */
void ShowEndGameChart()
{
/* Dedicated server doesn't need the highscore window and neither does -v null. */
diff --git a/src/house.h b/src/house.h
index b087ead57..ab4f0756f 100644
--- a/src/house.h
+++ b/src/house.h
@@ -20,7 +20,8 @@
/**
* Simple value that indicates the house has reached the final stage of
- * construction. */
+ * construction.
+ */
static const byte TOWN_HOUSE_COMPLETED = 3;
static const uint HOUSE_NO_CLASS = 0;
@@ -30,7 +31,8 @@ static const HouseID INVALID_HOUSE_ID = 0xFFFF;
/**
* There can only be as many classes as there are new houses, plus one for
- * NO_CLASS, as the original houses don't have classes. */
+ * NO_CLASS, as the original houses don't have classes.
+ */
static const uint HOUSE_CLASS_MAX = HOUSE_MAX - NEW_HOUSE_OFFSET + 1;
enum BuildingFlags {
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 0992cf05c..90c7ae353 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -66,7 +66,8 @@ IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
* This function initialize the spec arrays of both
* industry and industry tiles.
* It adjusts the enabling of the industry too, based on climate availability.
- * This will allow for clearer testings */
+ * This will allow for clearer testings
+ */
void ResetIndustries()
{
memset(&_industry_specs, 0, sizeof(_industry_specs));
@@ -93,7 +94,7 @@ void ResetIndustries()
* @param tile that is queried
* @pre IsTileType(tile, MP_INDUSTRY)
* @return general type for this industry, as defined in industry.h
- **/
+ */
IndustryType GetIndustryType(TileIndex tile)
{
assert(IsTileType(tile, MP_INDUSTRY));
@@ -110,7 +111,7 @@ IndustryType GetIndustryType(TileIndex tile)
* @param thistype of industry (which is the index in _industry_specs)
* @pre thistype < NUM_INDUSTRYTYPES
* @return a pointer to the corresponding industry spec
- **/
+ */
const IndustrySpec *GetIndustrySpec(IndustryType thistype)
{
assert(thistype < NUM_INDUSTRYTYPES);
@@ -124,7 +125,7 @@ const IndustrySpec *GetIndustrySpec(IndustryType thistype)
* @param gfx of industrytile (which is the index in _industry_tile_specs)
* @pre gfx < INVALID_INDUSTRYTILE
* @return a pointer to the corresponding industrytile spec
- **/
+ */
const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx)
{
assert(gfx < INVALID_INDUSTRYTILE);
@@ -1535,7 +1536,8 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t
/**
* Production level maximum, minimum and default values.
* It is not a value been really used in order to change, but rather an indicator
- * of how the industry is behaving. */
+ * of how the industry is behaving.
+ */
enum ProductionLevels {
PRODLEVEL_CLOSURE = 0x00, ///< signal set to actually close the industry
PRODLEVEL_MINIMUM = 0x04, ///< below this level, the industry is set to be closing
diff --git a/src/landscape.cpp b/src/landscape.cpp
index f8aacf3f0..265500722 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -48,7 +48,8 @@ extern const TileTypeProcs
/**
* Tile callback functions for each type of tile.
* @ingroup TileCallbackGroup
- * @see TileType */
+ * @see TileType
+ */
const TileTypeProcs * const _tile_type_procs[16] = {
&_tile_type_clear_procs, ///< Callback functions for MP_CLEAR tiles
&_tile_type_rail_procs, ///< Callback functions for MP_RAILWAY tiles
@@ -75,7 +76,8 @@ extern const byte _slope_to_sprite_offset[32] = {
* If it is \c NULL, a static snowline height is used, as set by \c _settings_game.game_creation.snow_line.
* Otherwise it points to a table loaded from a newGRF file, that describes the variable snowline
* @ingroup SnowLineGroup
- * @see GetSnowLine() GameCreationSettings */
+ * @see GetSnowLine() GameCreationSettings
+ */
static SnowLine *_snow_line = NULL;
/**
diff --git a/src/landscape.h b/src/landscape.h
index d7346e7b9..dedc4d135 100644
--- a/src/landscape.h
+++ b/src/landscape.h
@@ -20,7 +20,8 @@ static const uint SNOW_LINE_DAYS = 32; ///< Number of days in each month in th
/**
* Structure describing the height of the snow line each day of the year
- * @ingroup SnowLineGroup */
+ * @ingroup SnowLineGroup
+ */
struct SnowLine {
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]; ///< Height of the snow line each day of the year
byte highest_value; ///< Highest snow line of the year
diff --git a/src/misc/array.hpp b/src/misc/array.hpp
index 2832d9299..e6850d665 100644
--- a/src/misc/array.hpp
+++ b/src/misc/array.hpp
@@ -17,7 +17,8 @@
/**
* Flexible array with size limit. Implemented as fixed size
- * array of fixed size arrays */
+ * array of fixed size arrays
+ */
template <class T, uint B = 1024, uint N = B>
class SmallArray {
protected:
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp
index 95e0ae1af..ff9cebd67 100644
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -105,7 +105,8 @@ protected:
/**
* Return header pointer to the static BlobHeader with
- * both items and capacity containing zero */
+ * both items and capacity containing zero
+ */
static FORCEINLINE BlobHeader *Zero()
{
return const_cast<BlobHeader *>(&ByteBlob::hdrEmpty[1]);
@@ -235,7 +236,8 @@ public:
/**
* Reallocate if there is no free space for num_bytes bytes.
- * @return pointer to the new data to be added */
+ * @return pointer to the new data to be added
+ */
FORCEINLINE byte *Prepare(size_t num_bytes)
{
size_t new_size = Length() + num_bytes;
@@ -245,7 +247,8 @@ public:
/**
* Increase Length() by num_bytes.
- * @return pointer to the new data added */
+ * @return pointer to the new data added
+ */
FORCEINLINE byte *Append(size_t num_bytes)
{
byte *pNewData = Prepare(num_bytes);
@@ -297,7 +300,8 @@ public:
* 1. When adding new item(s) it automatically grows capacity if needed.
* 2. When variable of type Blob comes out of scope it automatically frees the data buffer.
* 3. Takes care about the actual data size (number of used items).
- * 4. Dynamically constructs only used items (as opposite of static array which constructs all items) */
+ * 4. Dynamically constructs only used items (as opposite of static array which constructs all items)
+ */
template <typename T>
class CBlobT : public ByteBlob {
/* make template arguments public: */
@@ -387,7 +391,8 @@ public:
/**
* Ensures that given number of items can be added to the end of Blob. Returns pointer to the
- * first free (unused) item */
+ * first free (unused) item
+ */
FORCEINLINE T *MakeFreeSpace(size_t num_items)
{
return (T*)base::Prepare(num_items * type_size);
diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp
index 404db8184..c84938438 100644
--- a/src/misc/fixedsizearray.hpp
+++ b/src/misc/fixedsizearray.hpp
@@ -18,7 +18,8 @@
* fixed size array
* Upon construction it preallocates fixed size block of memory
* for all items, but doesn't construct them. Item's construction
- * is delayed. */
+ * is delayed.
+ */
template <class T, uint C>
struct FixedSizeArray {
protected:
@@ -35,7 +36,8 @@ protected:
/**
* the only member of fixed size array is pointer to the block
- * of C array of items. Header can be found on the offset -sizeof(ArrayHeader). */
+ * of C array of items. Header can be found on the offset -sizeof(ArrayHeader).
+ */
T *data;
/** return reference to the array header (non-const) */
diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp
index 8dd1310a7..cafd6d7a9 100644
--- a/src/misc/hashtable.hpp
+++ b/src/misc/hashtable.hpp
@@ -139,7 +139,8 @@ public:
protected:
/**
* each slot contains pointer to the first item in the list,
- * Titem contains pointer to the next item - GetHashNext(), SetHashNext() */
+ * Titem contains pointer to the next item - GetHashNext(), SetHashNext()
+ */
typedef CHashTableSlotT<Titem_> Slot;
Slot *m_slots; // here we store our data (array of blobs)
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 91034ac34..3b0cba62d 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1096,7 +1096,8 @@ bool MoveTextBufferPos(Textbuf *tb, int navmode)
* @param maxsize maximum size in bytes, including terminating '\0'
* @param maxwidth maximum length in pixels of this buffer. If reached, buffer
* cannot grow, even if maxsize would allow because there is space. Width
- * of zero '0' means the buffer is only restricted by maxsize */
+ * of zero '0' means the buffer is only restricted by maxsize
+ */
void InitializeTextBuffer(Textbuf *tb, char *buf, uint16 maxsize, uint16 maxwidth)
{
assert(maxsize != 0);
diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp
index 2093312bd..955182590 100644
--- a/src/music/allegro_m.cpp
+++ b/src/music/allegro_m.cpp
@@ -21,7 +21,8 @@ static MIDI *_midi = NULL;
/**
* There are multiple modules that might be using Allegro and
- * Allegro can only be initiated once. */
+ * Allegro can only be initiated once.
+ */
extern int _allegro_instance_count;
const char *MusicDriver_Allegro::Start(const char * const *param)
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 78e36186d..38cd528ef 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -37,7 +37,8 @@ struct Packet {
/**
* The size of the whole packet for received packets. For packets
* that will be sent, the value is filled in just before the
- * actual transmission. */
+ * actual transmission.
+ */
PacketSize size;
/** The current read/write position in the packet */
PacketSize pos;
diff --git a/src/network/network.cpp b/src/network/network.cpp
index af3fbf855..3ad86d843 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -477,7 +477,8 @@ static void CheckPauseOnJoin()
*
* connection_string will be re-terminated to seperate out the hostname, and company and port will
* be set to the company and port strings given by the user, inside the memory area originally
- * occupied by connection_string. */
+ * occupied by connection_string.
+ */
void ParseConnectionString(const char **company, const char **port, char *connection_string)
{
bool ipv6 = (strchr(connection_string, ':') != strrchr(connection_string, ':'));
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 5bb4529f6..4e034aab3 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -72,7 +72,8 @@ static void NetworkGameListHandleDelayedInsert()
* return the existing item instead of adding it again
* @param address the address of the to-be added item
* @param port the port the server is running on
- * @return a point to the newly added or already existing item */
+ * @return a point to the newly added or already existing item
+ */
NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
{
const char *hostname = address.GetHostname();
@@ -110,7 +111,8 @@ NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
/**
* Remove an item from the gamelist linked list
- * @param remove pointer to the item to be removed */
+ * @param remove pointer to the item to be removed
+ */
void NetworkGameListRemoveItem(NetworkGameList *remove)
{
NetworkGameList *prev_item = NULL;
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 69dd3b0df..bd539c106 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -67,7 +67,8 @@ void SortNetworkLanguages()
/**
* Update the network new window because a new server is
* found on the network.
- * @param unselect unselect the currently selected item */
+ * @param unselect unselect the currently selected item
+ */
void UpdateNetworkGameWindow(bool unselect)
{
InvalidateWindowData(WC_NETWORK_WINDOW, 0, unselect ? 1 : 0);
@@ -283,7 +284,8 @@ protected:
/**
* Sort servers by the amount of clients online on a
* server. If the two servers have the same amount, the one with the
- * higher maximum is preferred. */
+ * higher maximum is preferred.
+ */
static int CDECL NGameClientSorter(NetworkGameList * const *a, NetworkGameList * const *b)
{
/* Reverse as per default we are interested in most-clients first */
@@ -321,7 +323,8 @@ protected:
/**
* Sort servers by joinability. If both servers are the
- * same, prefer the non-passworded server first. */
+ * same, prefer the non-passworded server first.
+ */
static int CDECL NGameAllowedSorter(NetworkGameList * const *a, NetworkGameList * const *b)
{
/* The servers we do not know anything about (the ones that did not reply) should be at the bottom) */
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index acbcda234..09046fb50 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1773,7 +1773,7 @@ void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded)
* @param client_id id of the client we want to move.
* @param company_id id of the company we want to move the client to.
* @return void
- **/
+ */
void NetworkServerDoMove(ClientID client_id, CompanyID company_id)
{
/* Only allow non-dedicated servers and normal clients to be moved */
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 738d7b3e5..8d822eed0 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -230,7 +230,8 @@ static GRFLineToSpriteOverride _grf_line_to_action6_sprite_override;
* loading/parsing grf files, not for runtime debug messages as there
* is no file information available during that time.
* @param severity debugging severity level, see debug.h
- * @param str message in printf() format */
+ * @param str message in printf() format
+ */
void CDECL grfmsg(int severity, const char *str, ...)
{
char buf[1024];
@@ -6797,7 +6798,8 @@ static void InitNewGRFFile(const GRFConfig *config, int sprite_offset)
/**
* List of what cargo labels are refittable for the given the vehicle-type.
- * Only currently active labels are applied. */
+ * Only currently active labels are applied.
+ */
static const CargoLabel _default_refitmasks_rail[] = {
'PASS', 'COAL', 'MAIL', 'LVST', 'GOOD', 'GRAI', 'WHEA', 'MAIZ', 'WOOD',
'IORE', 'STEL', 'VALU', 'GOLD', 'DIAM', 'PAPR', 'FOOD', 'FRUT', 'CORE',
@@ -6933,7 +6935,8 @@ static void FinaliseCargoArray()
* Add all new houses to the house array. House properties can be set at any
* time in the GRF file, so we can only add a house spec to the house array
* after the file has finished loading. We also need to check the dates, due to
- * the TTDPatch behaviour described below that we need to emulate. */
+ * the TTDPatch behaviour described below that we need to emulate.
+ */
static void FinaliseHouseArray()
{
/* If there are no houses with start dates before 1930, then all houses
@@ -6998,7 +7001,8 @@ static void FinaliseHouseArray()
/**
* Add all new industries to the industry array. Industry properties can be set at any
* time in the GRF file, so we can only add a industry spec to the industry array
- * after the file has finished loading. */
+ * after the file has finished loading.
+ */
static void FinaliseIndustriesArray()
{
const GRFFile * const *end = _grf_files.End();
diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h
index 1fd004ea7..7f421133c 100644
--- a/src/newgrf_callbacks.h
+++ b/src/newgrf_callbacks.h
@@ -45,7 +45,8 @@ enum CallbackID {
/**
* Refit capacity, the passed vehicle needs to have its ->cargo_type set to
- * the cargo we are refitting to, returns the new cargo capacity. */
+ * the cargo we are refitting to, returns the new cargo capacity.
+ */
CBID_VEHICLE_REFIT_CAPACITY = 0x15, // 15 bit callback
/** Builds articulated engines for trains and RVs. */
@@ -89,7 +90,8 @@ enum CallbackID {
/**
* This callback is called from vehicle purchase lists. It returns a value to be
- * used as a custom string ID in the 0xD000 range. */
+ * used as a custom string ID in the 0xD000 range.
+ */
CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
/** Called when building a station to customize the tile layout */
@@ -121,7 +123,8 @@ enum CallbackID {
/**
* Called to determine if a specific colour map should be used for a vehicle
- * instead of the default livery. */
+ * instead of the default livery.
+ */
CBID_VEHICLE_COLOUR_MAPPING = 0x2D, // 15 bit callback
/** Called to determine how much cargo a town building produces. */
@@ -135,7 +138,8 @@ enum CallbackID {
/**
* Called when the company (or AI) tries to start or stop a vehicle. Mainly
- * used for preventing a vehicle from leaving the depot. */
+ * used for preventing a vehicle from leaving the depot.
+ */
CBID_VEHICLE_START_STOP_CHECK = 0x31, // 15 bit callback, but 0xFF test is done with 8 bit
/** Called for every vehicle every 32 days (not all on same date though). */
@@ -152,7 +156,8 @@ enum CallbackID {
/**
* Called to modify various vehicle properties. Callback parameter 1
- * specifies the property index, as used in Action 0, to change. */
+ * specifies the property index, as used in Action 0, to change.
+ */
CBID_VEHICLE_MODIFY_PROPERTY = 0x36, // 8/15 bit depends on queried property
/** Called to determine text to display after cargo name */
diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h
index 17367cffd..e98015add 100644
--- a/src/newgrf_canal.h
+++ b/src/newgrf_canal.h
@@ -18,7 +18,8 @@
/**
* List of different canal 'features'.
- * Each feature gets an entry in the canal spritegroup table */
+ * Each feature gets an entry in the canal spritegroup table
+ */
enum CanalFeature {
CF_WATERSLOPE,
CF_LOCKS,
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 4c75891e3..977d2f8c1 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -294,7 +294,8 @@ void IndustryTileOverrideManager::SetEntitySpec(const IndustryTileSpec *its)
* @param tile TileIndex of the tile been queried
* @param upper_halftile If true, query upper halftile in case of rail tiles.
* @return value corresponding to the grf expected format:
- * Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline */
+ * Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline
+ */
uint32 GetTerrainType(TileIndex tile, bool upper_halftile)
{
switch (_settings_game.game_creation.landscape) {
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index ef50327a9..fcd1a75bc 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -323,7 +323,8 @@ void ClearGRFConfigList(GRFConfig **config)
* @param dst pointer to destination list
* @param src pointer to source list values
* @param init_only the copied GRF will be processed up to GLS_INIT
- * @return pointer to the last value added to the destination list */
+ * @return pointer to the last value added to the destination list
+ */
GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only)
{
/* Clear destination as it will be overwritten */
@@ -388,7 +389,8 @@ void AppendStaticGRFConfigs(GRFConfig **dst)
/**
* Appends an element to a list of GRFs
* @param dst the head of the list to add to
- * @param el the new tail to be */
+ * @param el the new tail to be
+ */
void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el)
{
GRFConfig **tail = dst;
@@ -416,7 +418,8 @@ void ResetGRFConfig(bool defaults)
* <li> GLC_COMPATIBLE: For one or more GRF's no exact match was found, but a
* compatible GRF with the same grfid was found and used instead
* <li> GLC_NOT_FOUND: For one or more GRF's no match was found at all
- * </ul> */
+ * </ul>
+ */
GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
{
GRFListCompatibility res = GLC_ALL_GOOD;
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index be6c53f4d..d769f4968 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1531,7 +1531,8 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
* @param show_params show information about what parameters are set for the grf files
* @param exec_changes if changes are made to the list (editable is true), apply these
* changes immediately or only update the list
- * @param config pointer to a linked-list of grfconfig's that will be shown */
+ * @param config pointer to a linked-list of grfconfig's that will be shown
+ */
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config)
{
DeleteWindowByClass(WC_GAME_OPTIONS);
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index fb40889e1..a7d9606a3 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -161,7 +161,8 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout
* @param variable that is queried
* @param parameter unused
* @param available will return false if ever the variable asked for does not exist
- * @return the value stored in the corresponding variable*/
+ * @return the value stored in the corresponding variable
+ */
uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
{
const Industry *industry = object->u.industry.ind;
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index 6e8d2306e..43b61b08a 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -19,7 +19,8 @@
* @param parameter unused
* @param available will return false if ever the variable asked for does not exist
* @param t is of course the town we are inquiring
- * @return the value stored in the corresponding variable*/
+ * @return the value stored in the corresponding variable
+ */
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t)
{
switch (variable) {
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index ce073f0dd..793e00b6d 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -45,7 +45,8 @@ static NewsItem *_latest_news = NULL; ///< tail of news items queue
* Forced news item.
* Users can force an item by accessing the history or "last message".
* If the message being shown was forced by the user, a pointer is stored
- * in _forced_news. Otherwise, \a _forced_news variable is NULL. */
+ * in _forced_news. Otherwise, \a _forced_news variable is NULL.
+ */
static const NewsItem *_forced_news = NULL; ///< item the user has asked for
/** Current news item (last item shown regularly). */
diff --git a/src/openttd.cpp b/src/openttd.cpp
index ee0ebf89d..cf61ab9d1 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1276,7 +1276,8 @@ void StateGameLoop()
/**
* Create an autosave. The default name is "autosave#.sav". However with
- * the setting 'keep_all_autosave' the name defaults to company-name + date */
+ * the setting 'keep_all_autosave' the name defaults to company-name + date
+ */
static void DoAutosave()
{
char buf[MAX_PATH];
diff --git a/src/order_base.h b/src/order_base.h
index 464400f9f..fccc802e7 100644
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -314,13 +314,15 @@ public:
/**
* Get number of orders in the order list.
- * @return number of orders in the chain. */
+ * @return number of orders in the chain.
+ */
inline VehicleOrderID GetNumOrders() const { return this->num_orders; }
/**
* Insert a new order into the order chain.
* @param new_order is the order to insert into the chain.
- * @param index is the position where the order is supposed to be inserted. */
+ * @param index is the position where the order is supposed to be inserted.
+ */
void InsertOrderAt(Order *new_order, int index);
/**
@@ -332,7 +334,8 @@ public:
/**
* Move an order to another position within the order list.
* @param from is the zero-based position of the order to move.
- * @param to is the zero-based position where the order is moved to. */
+ * @param to is the zero-based position where the order is moved to.
+ */
void MoveOrder(int from, int to);
/**
diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp
index 97a68f592..cec912bec 100644
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -129,7 +129,8 @@ const char *GetCurrentLocale(const char *param);
/**
* Try and try to decipher the current locale from environmental
* variables. MacOSX is hardcoded, other OS's are dynamic. If no suitable
- * locale can be found, don't do any conversion "" */
+ * locale can be found, don't do any conversion ""
+ */
static const char *GetLocalCode()
{
#if defined(__APPLE__)
@@ -178,7 +179,8 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name)
/**
* Convert from OpenTTD's encoding to that of the local environment
* @param name pointer to a valid string that will be converted
- * @return pointer to a new stringbuffer that contains the converted string */
+ * @return pointer to a new stringbuffer that contains the converted string
+ */
const char *OTTD2FS(const char *name)
{
static iconv_t convd = (iconv_t)(-1);
@@ -198,7 +200,8 @@ const char *OTTD2FS(const char *name)
/**
* Convert to OpenTTD's encoding from that of the local environment
* @param name pointer to a valid string that will be converted
- * @return pointer to a new stringbuffer that contains the converted string */
+ * @return pointer to a new stringbuffer that contains the converted string
+ */
const char *FS2OTTD(const char *name)
{
static iconv_t convd = (iconv_t)(-1);
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index 2cc85cbb7..021ce60a1 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -44,7 +44,8 @@ bool MyShowCursor(bool show)
/**
* Helper function needed by dynamically loading libraries
* XXX: Hurray for MS only having an ANSI GetProcAddress function
- * on normal windows and no Wide version except for in Windows Mobile/CE */
+ * on normal windows and no Wide version except for in Windows Mobile/CE
+ */
bool LoadLibraryList(Function proc[], const char *dll)
{
while (*dll != '\0') {
@@ -567,7 +568,8 @@ void CSleep(int milliseconds)
* @param name pointer to a valid string that will be converted (local, or wide)
* @return pointer to the converted string; if failed string is of zero-length
* @see the current code-page comes from video\win32_v.cpp, event-notification
- * WM_INPUTLANGCHANGE */
+ * WM_INPUTLANGCHANGE
+ */
const char *FS2OTTD(const TCHAR *name)
{
static char utf8_buf[512];
@@ -604,7 +606,8 @@ const char *FS2OTTD(const TCHAR *name)
* @param name pointer to a valid string that will be converted (UTF8)
* @return pointer to the converted string; if failed string is of zero-length
* @see the current code-page comes from video\win32_v.cpp, event-notification
- * WM_INPUTLANGCHANGE */
+ * WM_INPUTLANGCHANGE
+ */
const TCHAR *OTTD2FS(const char *name)
{
static TCHAR system_buf[512];
@@ -638,7 +641,8 @@ const TCHAR *OTTD2FS(const char *name)
* @param name pointer to a valid string that will be converted
* @param utf8_buf pointer to a valid buffer that will receive the converted string
* @param buflen length in characters of the receiving buffer
- * @return pointer to utf8_buf. If conversion fails the string is of zero-length */
+ * @return pointer to utf8_buf. If conversion fails the string is of zero-length
+ */
char *convert_from_fs(const wchar_t *name, char *utf8_buf, size_t buflen)
{
int len = WideCharToMultiByte(CP_UTF8, 0, name, -1, utf8_buf, (int)buflen, NULL, NULL);
@@ -658,7 +662,8 @@ char *convert_from_fs(const wchar_t *name, char *utf8_buf, size_t buflen)
* @param utf16_buf pointer to a valid wide-char buffer that will receive the
* converted string
* @param buflen length in wide characters of the receiving buffer
- * @return pointer to utf16_buf. If conversion fails the string is of zero-length */
+ * @return pointer to utf16_buf. If conversion fails the string is of zero-length
+ */
wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen)
{
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, utf16_buf, (int)buflen);
@@ -674,7 +679,8 @@ wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen)
* Our very own SHGetFolderPath function for support of windows operating
* systems that don't have this function (eg Win9x, etc.). We try using the
* native function, and if that doesn't exist we will try a more crude approach
- * of environment variables and hope for the best */
+ * of environment variables and hope for the best
+ */
HRESULT OTTDSHGetFolderPath(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath)
{
static HRESULT (WINAPI *SHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR) = NULL;
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp
index 424bdec17..d7d8569e9 100644
--- a/src/pathfinder/follow_track.hpp
+++ b/src/pathfinder/follow_track.hpp
@@ -24,7 +24,8 @@
/**
* Track follower helper template class (can serve pathfinders and vehicle
* controllers). See 6 different typedefs below for 3 different transport
- * types w/ or w/o 90-deg turns allowed */
+ * types w/ or w/o 90-deg turns allowed
+ */
template <TransportType Ttr_type_, typename VehicleType, bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>
struct CFollowTrackT
{
@@ -113,7 +114,8 @@ struct CFollowTrackT
/**
* main follower routine. Fills all members and return true on success.
- * Otherwise returns false if track can't be followed. */
+ * Otherwise returns false if track can't be followed.
+ */
inline bool Follow(TileIndex old_tile, Trackdir old_td)
{
m_old_tile = old_tile;
diff --git a/src/pathfinder/npf/queue.h b/src/pathfinder/npf/queue.h
index 3f042b7ad..d7a7a7919 100644
--- a/src/pathfinder/npf/queue.h
+++ b/src/pathfinder/npf/queue.h
@@ -100,7 +100,8 @@ void init_InsSort(Queue *q);
/**
* Initializes a binary heap and allocates internal memory for maximum of
- * max_size elements */
+ * max_size elements
+ */
void init_BinaryHeap(Queue *q, uint max_size);
@@ -137,22 +138,26 @@ struct Hash {
/**
* Deletes the value with the specified key pair from the hash and returns
* that value. Returns NULL when the value was not present. The value returned
- * is _not_ free()'d! */
+ * is _not_ free()'d!
+ */
void *Hash_Delete(Hash *h, uint key1, uint key2);
/**
* Sets the value associated with the given key pair to the given value.
- * Returns the old value if the value was replaced, NULL when it was not yet present. */
+ * Returns the old value if the value was replaced, NULL when it was not yet present.
+ */
void *Hash_Set(Hash *h, uint key1, uint key2, void *value);
/**
* Gets the value associated with the given key pair, or NULL when it is not
- * present. */
+ * present.
+ */
void *Hash_Get(const Hash *h, uint key1, uint key2);
/* Call these function to create/destroy a hash */
/**
* Builds a new hash in an existing struct. Make sure that hash() always
- * returns a hash less than num_buckets! Call delete_hash after use */
+ * returns a hash less than num_buckets! Call delete_hash after use
+ */
void init_Hash(Hash *h, Hash_HashProc *hash, uint num_buckets);
/**
* Deletes the hash and cleans up. Only cleans up memory allocated by new_Hash
diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp
index 15c8a9ba7..2fef03e12 100644
--- a/src/pathfinder/opf/opf_ship.cpp
+++ b/src/pathfinder/opf/opf_ship.cpp
@@ -181,7 +181,8 @@ bad:;
/**
* returns the track to choose on the next tile, or -1 when it's better to
* reverse. The tile given is the tile we are about to enter, enterdir is the
- * direction in which we are entering the tile */
+ * direction in which we are entering the tile
+ */
Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
{
assert(IsValidDiagDirection(enterdir));
diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp
index bc24e2893..5a92e4ae7 100644
--- a/src/pathfinder/yapf/nodelist.hpp
+++ b/src/pathfinder/yapf/nodelist.hpp
@@ -19,7 +19,8 @@
/**
* Hash table based node list multi-container class.
* Implements open list, closed list and priority queue for A-star
- * path finder. */
+ * path finder.
+ */
template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_>
class CNodeList_HashTableT {
public:
diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp
index f98a5163a..d3450b58c 100644
--- a/src/pathfinder/yapf/yapf_base.hpp
+++ b/src/pathfinder/yapf/yapf_base.hpp
@@ -116,7 +116,8 @@ public:
* - the destination was found
* - or the open list is empty (no route to destination).
* - or the maximum amount of loops reached - m_max_search_nodes (default = 10000)
- * @return true if the path was found */
+ * @return true if the path was found
+ */
inline bool FindPath(const VehicleType *v)
{
m_veh = v;
@@ -223,7 +224,8 @@ public:
/**
* AddNewNode() - called by Tderived::PfFollowNode() for each child node.
- * Nodes are evaluated here and added into open list */
+ * Nodes are evaluated here and added into open list
+ */
void AddNewNode(Node &n, const TrackFollower &tf)
{
/* evaluate the node */
diff --git a/src/pathfinder/yapf/yapf_common.hpp b/src/pathfinder/yapf/yapf_common.hpp
index cb53e2fa1..6add0b132 100644
--- a/src/pathfinder/yapf/yapf_common.hpp
+++ b/src/pathfinder/yapf/yapf_common.hpp
@@ -148,7 +148,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
+ */
inline bool PfCalcEstimate(Node& n)
{
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
@@ -179,7 +180,8 @@ public:
* YAPF template that uses Ttypes template argument to determine all YAPF
* components (base classes) from which the actual YAPF is composed.
* For example classes consult: CYapfRail_TypesT template and its instantiations:
- * CYapfRail1, CYapfRail2, CYapfRail3, CYapfAnyDepotRail1, CYapfAnyDepotRail2, CYapfAnyDepotRail3 */
+ * CYapfRail1, CYapfRail2, CYapfRail3, CYapfAnyDepotRail1, CYapfAnyDepotRail2, CYapfAnyDepotRail3
+ */
template <class Ttypes>
class CYapfT
: public Ttypes::PfBase ///< Instance of CYapfBaseT - main YAPF loop and support base class
diff --git a/src/pathfinder/yapf/yapf_costcache.hpp b/src/pathfinder/yapf/yapf_costcache.hpp
index 988a13959..7e5354d95 100644
--- a/src/pathfinder/yapf/yapf_costcache.hpp
+++ b/src/pathfinder/yapf/yapf_costcache.hpp
@@ -28,7 +28,8 @@ public:
/**
* Called by YAPF to attach cached or local segment cost data to the given node.
- * @return true if globally cached data were used or false if local data was used */
+ * @return true if globally cached data were used or false if local data was used
+ */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
return false;
@@ -36,7 +37,8 @@ public:
/**
* Called by YAPF to flush the cached segment cost data back into cache storage.
- * Current cache implementation doesn't use that. */
+ * Current cache implementation doesn't use that.
+ */
FORCEINLINE void PfNodeCacheFlush(Node& n)
{
}
@@ -71,7 +73,8 @@ protected:
public:
/**
* Called by YAPF to attach cached or local segment cost data to the given node.
- * @return true if globally cached data were used or false if local data was used */
+ * @return true if globally cached data were used or false if local data was used
+ */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
CacheKey key(n.GetKey());
@@ -81,7 +84,8 @@ public:
/**
* Called by YAPF to flush the cached segment cost data back into cache storage.
- * Current cache implementation doesn't use that. */
+ * Current cache implementation doesn't use that.
+ */
FORCEINLINE void PfNodeCacheFlush(Node& n)
{
}
@@ -93,7 +97,8 @@ public:
* of track layout changes and static notification function called whenever
* the track layout changes. It is implemented as base class because it needs
* to be shared between all rail YAPF types (one shared counter, one notification
- * function. */
+ * function.
+ */
struct CSegmentCostCacheBase
{
static int s_rail_change_counter;
@@ -113,7 +118,8 @@ struct CSegmentCostCacheBase
* be always the same (TileIndex + DiagDirection) that represent the beginning
* of the segment (origin tile and exit-dir from this tile).
* Different CYapfCachedCostT types can share the same type of CSegmentCostCacheT.
- * Look at CYapfRailSegment (yapf_node_rail.hpp) for the segment example */
+ * Look at CYapfRailSegment (yapf_node_rail.hpp) for the segment example
+ */
template <class Tsegment>
struct CSegmentCostCacheT
: public CSegmentCostCacheBase
@@ -203,7 +209,8 @@ protected:
public:
/**
* Called by YAPF to attach cached or local segment cost data to the given node.
- * @return true if globally cached data were used or false if local data was used */
+ * @return true if globally cached data were used or false if local data was used
+ */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
if (!Yapf().CanUseGlobalCache(n)) {
@@ -218,7 +225,8 @@ public:
/**
* Called by YAPF to flush the cached segment cost data back into cache storage.
- * Current cache implementation doesn't use that. */
+ * Current cache implementation doesn't use that.
+ */
FORCEINLINE void PfNodeCacheFlush(Node& n)
{
}
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index 088634daf..fe025ee26 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -279,7 +279,8 @@ public:
/**
* Called by YAPF to calculate the cost from the origin to the given node.
* Calculates only the cost of given node, adds it to the parent node cost
- * and stores the result into Node::m_cost member */
+ * and stores the result into Node::m_cost member
+ */
FORCEINLINE bool PfCalcCost(Node &n, const TrackFollower *tf)
{
assert(!n.flags_u.flags_s.m_targed_seen);
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp
index 0b046b207..fa6ddfba3 100644
--- a/src/pathfinder/yapf/yapf_destrail.hpp
+++ b/src/pathfinder/yapf/yapf_destrail.hpp
@@ -65,7 +65,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
+ */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
n.m_estimate = n.m_cost;
@@ -105,7 +106,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate. */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate.
+ */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
n.m_estimate = n.m_cost;
@@ -185,7 +187,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
+ */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp
index 303cfd9e5..078a3e590 100644
--- a/src/pathfinder/yapf/yapf_rail.cpp
+++ b/src/pathfinder/yapf/yapf_rail.cpp
@@ -204,7 +204,8 @@ public:
/**
* Called by YAPF to move from the given node to the next tile. For each
* reachable trackdir on the new tile creates new node, initializes it
- * and adds it to the open list by calling Yapf().AddNewNode(n) */
+ * and adds it to the open list by calling Yapf().AddNewNode(n)
+ */
inline void PfFollowNode(Node& old_node)
{
TrackFollower F(Yapf().GetVehicle());
@@ -299,7 +300,8 @@ public:
/**
* Called by YAPF to move from the given node to the next tile. For each
* reachable trackdir on the new tile creates new node, initializes it
- * and adds it to the open list by calling Yapf().AddNewNode(n) */
+ * and adds it to the open list by calling Yapf().AddNewNode(n)
+ */
inline void PfFollowNode(Node& old_node)
{
TrackFollower F(Yapf().GetVehicle(), Yapf().GetCompatibleRailTypes());
@@ -381,7 +383,8 @@ public:
/**
* Called by YAPF to move from the given node to the next tile. For each
* reachable trackdir on the new tile creates new node, initializes it
- * and adds it to the open list by calling Yapf().AddNewNode(n) */
+ * and adds it to the open list by calling Yapf().AddNewNode(n)
+ */
inline void PfFollowNode(Node& old_node)
{
TrackFollower F(Yapf().GetVehicle());
diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp
index 51162d3d2..c06870173 100644
--- a/src/pathfinder/yapf/yapf_road.cpp
+++ b/src/pathfinder/yapf/yapf_road.cpp
@@ -98,7 +98,8 @@ public:
/**
* Called by YAPF to calculate the cost from the origin to the given node.
* Calculates only the cost of given node, adds it to the parent node cost
- * and stores the result into Node::m_cost member */
+ * and stores the result into Node::m_cost member
+ */
FORCEINLINE bool PfCalcCost(Node& n, const TrackFollower *tf)
{
int segment_cost = 0;
@@ -189,7 +190,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
+ */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
n.m_estimate = n.m_cost;
@@ -258,7 +260,8 @@ public:
/**
* Called by YAPF to calculate cost estimate. Calculates distance to the destination
- * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
+ * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
+ */
inline bool PfCalcEstimate(Node& n)
{
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
@@ -308,7 +311,8 @@ public:
/**
* Called by YAPF to move from the given node to the next tile. For each
* reachable trackdir on the new tile creates new node, initializes it
- * and adds it to the open list by calling Yapf().AddNewNode(n) */
+ * and adds it to the open list by calling Yapf().AddNewNode(n)
+ */
inline void PfFollowNode(Node& old_node)
{
TrackFollower F(Yapf().GetVehicle());
diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp
index f9e5c175d..b9c87bf9d 100644
--- a/src/pathfinder/yapf/yapf_ship.cpp
+++ b/src/pathfinder/yapf/yapf_ship.cpp
@@ -35,7 +35,8 @@ public:
/**
* Called by YAPF to move from the given node to the next tile. For each
* reachable trackdir on the new tile creates new node, initializes it
- * and adds it to the open list by calling Yapf().AddNewNode(n) */
+ * and adds it to the open list by calling Yapf().AddNewNode(n)
+ */
inline void PfFollowNode(Node& old_node)
{
TrackFollower F(Yapf().GetVehicle());
@@ -119,7 +120,8 @@ public:
/**
* Called by YAPF to calculate the cost from the origin to the given node.
* Calculates only the cost of given node, adds it to the parent node cost
- * and stores the result into Node::m_cost member */
+ * and stores the result into Node::m_cost member
+ */
FORCEINLINE bool PfCalcCost(Node& n, const TrackFollower *tf)
{
/* base tile cost depending on distance */
diff --git a/src/rail.h b/src/rail.h
index caf426b62..465a4aac3 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -101,7 +101,8 @@ enum RailFenceOffset {
struct RailtypeInfo {
/**
* Struct containing the main sprites. @note not all sprites are listed, but only
- * the ones used directly in the code */
+ * the ones used directly in the code
+ */
struct {
SpriteID track_y; ///< single piece of rail in Y direction, with ground
SpriteID track_ns; ///< two pieces of rail in North and South corner (East-West direction)
@@ -119,7 +120,8 @@ struct RailtypeInfo {
/**
* struct containing the sprites for the rail GUI. @note only sprites referred to
- * directly in the code are listed */
+ * directly in the code are listed
+ */
struct {
SpriteID build_ns_rail; ///< button for building single rail in N-S direction
SpriteID build_x_rail; ///< button for building single rail in X direction
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index bdc29ef4b..f749d5a6b 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -2158,7 +2158,8 @@ static void DrawTrackBits(TileInfo *ti, TrackBits track)
* according to the side it is representing.
* The addtion of 2 per enum is necessary in order to "jump" over the
* green state sprite, all signal sprites being in pair,
- * starting with the off-red state */
+ * starting with the off-red state
+ */
enum SignalOffsets {
SIGNAL_TO_SOUTHWEST = 0,
SIGNAL_TO_NORTHEAST = 2,
@@ -2720,7 +2721,8 @@ int TicksToLeaveDepot(const Train *v)
/**
* Tile callback routine when vehicle enters tile
- * @see vehicle_enter_tile_proc */
+ * @see vehicle_enter_tile_proc
+ */
static VehicleEnterTileStatus VehicleEnter_Track(Vehicle *u, TileIndex tile, int x, int y)
{
/* this routine applies only to trains in depot tiles */
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 2ce446511..2b09adfa3 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2159,7 +2159,8 @@ bool AfterLoadGame()
* XXX - We need to reset the vehicle position hash because with a non-empty
* hash AfterLoadVehicles() will loop infinitely. We need AfterLoadVehicles()
* to recalculate vehicle data as some NewGRF vehicle sets could have been
- * removed or added and changed statistics */
+ * removed or added and changed statistics
+ */
void ReloadNewGRFData()
{
/* reload grf data */
diff --git a/src/saveload/airport_sl.cpp b/src/saveload/airport_sl.cpp
index 893bcc070..c7f5c5769 100644
--- a/src/saveload/airport_sl.cpp
+++ b/src/saveload/airport_sl.cpp
@@ -16,7 +16,8 @@
/**
* Save and load the mapping between the airport id in the AirportSpec array
- * and the grf file it came from. */
+ * and the grf file it came from.
+ */
static const SaveLoad _airport_id_mapping_desc[] = {
SLE_VAR(EntityIDMapping, grfid, SLE_UINT32),
SLE_VAR(EntityIDMapping, entity_id, SLE_UINT8),
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 1efa2eee1..1c69a6ce9 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1252,7 +1252,8 @@ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld)
/**
* Are we going to load this variable when loading a savegame or not?
* @note If the variable is skipped it is skipped in the savegame
- * bytestream itself as well, so there is no need to skip it somewhere else */
+ * bytestream itself as well, so there is no need to skip it somewhere else
+ */
static inline bool SlSkipVariableOnLoad(const SaveLoad *sld)
{
if ((sld->conv & SLF_NETWORK_NO) && _sl.action != SLA_SAVE && _networking && !_network_server) {
@@ -1893,7 +1894,7 @@ static void WriteZlibLoop(z_streamp z, byte *p, size_t len, int mode)
* According to the author of zlib it is not a bug and it won't be fixed.
* http://groups.google.com/group/comp.compression/browse_thread/thread/b154b8def8c2a3ef/cdf9b8729ce17ee2
* [Mark Adler, Feb 24 2004, 'zlib-1.2.1 valgrind warnings' in the newgroup comp.compression]
- **/
+ */
r = deflate(z, mode);
/* bytes were emitted? */
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 56e447294..314bf23a4 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -100,7 +100,8 @@ enum ChunkType {
* SLE_FILE_* gives the size(type) as it would be in the savegame and
* SLE_VAR_* the size(type) as it is in memory during runtime. These are
* the first 8 bits (0-3 SLE_FILE, 4-7 SLE_VAR).
- * Bits 8-15 are reserved for various flags as explained below */
+ * Bits 8-15 are reserved for various flags as explained below
+ */
enum VarTypes {
/* 4 bits allocated a maximum of 16 types for NumberType */
SLE_FILE_I8 = 0,
@@ -273,7 +274,8 @@ static inline bool CheckSavegameVersion(uint16 version)
/**
* Checks if some version from/to combination falls within the range of the
- * active savegame version */
+ * active savegame version
+ */
static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to)
{
extern const uint16 SAVEGAME_VERSION;
@@ -318,7 +320,8 @@ static inline bool IsNumericType(VarType conv)
* Get the address of the variable. Which one to pick depends on the object
* pointer. If it is NULL we are dealing with global variables so the address
* is taken. If non-null only the offset is stored in the union and we need
- * to add this to the address of the object */
+ * to add this to the address of the object
+ */
static inline void *GetVariableAddress(const void *object, const SaveLoad *sld)
{
return (byte*)(sld->global ? NULL : object) + (ptrdiff_t)sld->address;
diff --git a/src/settings.cpp b/src/settings.cpp
index 3cd4d1b3b..443702438 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -100,7 +100,8 @@ static const char * const _list_group_names[] = {
* @param many full domain of values the ONEofMANY setting can have
* @param one the current value of the setting for which a value needs found
* @param onelen force calculation of the *one parameter
- * @return the integer index of the full-list, or -1 if not found */
+ * @return the integer index of the full-list, or -1 if not found
+ */
static int LookupOneOfMany(const char *many, const char *one, size_t onelen = 0)
{
const char *s;
@@ -128,7 +129,8 @@ static int LookupOneOfMany(const char *many, const char *one, size_t onelen = 0)
* @param many full domain of values the MANYofMANY setting can have
* @param str the current string value of the setting, each individual
* of seperated by a whitespace,tab or | character
- * @return the 'fully' set integer, or -1 if a set is not found */
+ * @return the 'fully' set integer, or -1 if a set is not found
+ */
static uint32 LookupManyOfMany(const char *many, const char *str)
{
const char *s;
@@ -159,7 +161,8 @@ static uint32 LookupManyOfMany(const char *many, const char *str)
* comma or a space character
* @param items pointer to the integerlist-array that will be filled with values
* @param maxitems the maximum number of elements the integerlist-array has
- * @return returns the number of items found, or -1 on an error */
+ * @return returns the number of items found, or -1 on an error
+ */
int ParseIntList(const char *p, int *items, int maxitems)
{
int n = 0; // number of items read so far
@@ -203,7 +206,8 @@ int ParseIntList(const char *p, int *items, int maxitems)
* @param array pointer to the integer-arrays that will be filled
* @param nelems the number of elements the array holds. Maximum is 64 elements
* @param type the type of elements the array holds (eg INT8, UINT16, etc.)
- * @return return true on success and false on error */
+ * @return return true on success and false on error
+ */
static bool LoadIntList(const char *str, void *array, int nelems, VarType type)
{
int items[64];
@@ -244,7 +248,8 @@ static bool LoadIntList(const char *str, void *array, int nelems, VarType type)
* @param last last item to write to in the output buffer
* @param array pointer to the integer-arrays that is read from
* @param nelems the number of elements the array holds.
- * @param type the type of elements the array holds (eg INT8, UINT16, etc.) */
+ * @param type the type of elements the array holds (eg INT8, UINT16, etc.)
+ */
static void MakeIntList(char *buf, const char *last, const void *array, int nelems, VarType type)
{
int i, v = 0;
@@ -270,7 +275,8 @@ static void MakeIntList(char *buf, const char *last, const void *array, int nele
* @param buf output buffer where the string-representation will be stored
* @param last last item to write to in the output buffer
* @param many the full-domain string of possible values
- * @param id the value of the variable and whose string-representation must be found */
+ * @param id the value of the variable and whose string-representation must be found
+ */
static void MakeOneOfMany(char *buf, const char *last, const char *many, int id)
{
int orig_id = id;
@@ -297,7 +303,8 @@ static void MakeOneOfMany(char *buf, const char *last, const char *many, int id)
* @param last last item to write to in the output buffer
* @param many the full-domain string of possible values
* @param x the value of the variable and whose string-representation must
- * be found in the bitmasked many string */
+ * be found in the bitmasked many string
+ */
static void MakeManyOfMany(char *buf, const char *last, const char *many, uint32 x)
{
const char *start;
@@ -329,7 +336,8 @@ static void MakeManyOfMany(char *buf, const char *last, const char *many, uint32
* Convert a string representation (external) of a setting to the internal rep.
* @param desc SettingDesc struct that holds all information about the variable
* @param orig_str input string that will be parsed based on the type of desc
- * @return return the parsed value of the setting */
+ * @return return the parsed value of the setting
+ */
static const void *StringToVal(const SettingDescBase *desc, const char *orig_str)
{
const char *str = orig_str == NULL ? "" : orig_str;
@@ -376,7 +384,8 @@ static const void *StringToVal(const SettingDescBase *desc, const char *orig_str
* @param sd pointer to the 'information'-database of the variable
* @param val signed long version of the new value
* @pre SettingDesc is of type SDT_BOOLX, SDT_NUMX,
- * SDT_ONEOFMANY or SDT_MANYOFMANY. Other types are not supported as of now */
+ * SDT_ONEOFMANY or SDT_MANYOFMANY. Other types are not supported as of now
+ */
static void Write_ValidateSetting(void *ptr, const SettingDesc *sd, int32 val)
{
const SettingDescBase *sdb = &sd->desc;
@@ -428,7 +437,8 @@ static void Write_ValidateSetting(void *ptr, const SettingDesc *sd, int32 val)
* @param sd pointer to SettingDesc structure whose internally pointed variables will
* be given values
* @param grpname the group of the IniFile to search in for the new values
- * @param object pointer to the object been loaded */
+ * @param object pointer to the object been loaded
+ */
static void IniLoadSettings(IniFile *ini, const SettingDesc *sd, const char *grpname, void *object)
{
IniGroup *group;
@@ -1176,7 +1186,8 @@ static void HandleOldDiffCustom(bool savegame)
* tries to convert newly introduced news settings based on old ones
* @param name pointer to the string defining name of the old news config
* @param value pointer to the string defining value of the old news config
- * @returns true if conversion could have been made */
+ * @returns true if conversion could have been made
+ */
static bool ConvertOldNewsSetting(const char *name, const char *value)
{
if (strcasecmp(name, "openclose") == 0) {
@@ -1920,7 +1931,8 @@ void IConsoleListSettings(const char *prefilter)
* Save and load handler for settings
* @param osd SettingDesc struct containing all information
* @param object can be either NULL in which case we load global variables or
- * a pointer to a struct which is getting saved */
+ * a pointer to a struct which is getting saved
+ */
static void LoadSettings(const SettingDesc *osd, void *object)
{
for (; osd->save.cmd != SL_END; osd++) {
@@ -1936,7 +1948,8 @@ static void LoadSettings(const SettingDesc *osd, void *object)
* Loadhandler for a list of global variables
* @param sdg pointer for the global variable list SettingDescGlobVarList
* @note this is actually a stub for LoadSettings with the
- * object pointer set to NULL */
+ * object pointer set to NULL
+ */
static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
{
LoadSettings((const SettingDesc*)sdg, NULL);
@@ -1946,7 +1959,8 @@ static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
* Save and load handler for settings
* @param sd SettingDesc struct containing all information
* @param object can be either NULL in which case we load global variables or
- * a pointer to a struct which is getting saved */
+ * a pointer to a struct which is getting saved
+ */
static void SaveSettings(const SettingDesc *sd, void *object)
{
/* We need to write the CH_RIFF header, but unfortunately can't call
@@ -1967,7 +1981,8 @@ static void SaveSettings(const SettingDesc *sd, void *object)
/**
* Savehandler for a list of global variables
* @note this is actually a stub for SaveSettings with the
- * object pointer set to NULL */
+ * object pointer set to NULL
+ */
static inline void SaveSettingsGlobList(const SettingDescGlobVarList *sdg)
{
SaveSettings((const SettingDesc*)sdg, NULL);
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 472e42076..6fe083896 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -20,7 +20,8 @@
* Convention/Type of settings. This is then further specified if necessary
* with the SLE_ (SLE_VAR/SLE_FILE) enums in saveload.h
* @see VarTypes
- * @see SettingDescBase */
+ * @see SettingDescBase
+ */
enum SettingDescTypeLong {
/* 4 bytes allocated a maximum of 16 types for GenericType */
SDT_BEGIN = 0,
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 1e6f36a70..1f8f2d0d6 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -377,7 +377,8 @@ static void ShipArrivesAt(const Vehicle *v, Station *st)
/**
* returns the track to choose on the next tile, or -1 when it's better to
* reverse. The tile given is the tile we are about to enter, enterdir is the
- * direction in which we are entering the tile */
+ * direction in which we are entering the tile
+ */
static Track ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
{
assert(IsValidDiagDirection(enterdir));
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 520e07248..611e767af 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -65,7 +65,8 @@ static int _smallmap_industry_count; ///< Number of used industries
/**
* Macro for break marker in arrays of LegendAndColour.
- * It will have valid data, though */
+ * It will have valid data, though
+ */
#define MS(a, b) {a, b, {INVALID_INDUSTRYTYPE}, true, false, true}
/** Structure for holding relevant data for legends in small map */
@@ -152,7 +153,8 @@ static const LegendAndColour _legend_land_owners[] = {
/**
* Allow room for all industries, plus a terminator entry
- * This is required in order to have the indutry slots all filled up */
+ * This is required in order to have the indutry slots all filled up
+ */
static LegendAndColour _legend_from_industries[NUM_INDUSTRYTYPES + 1];
/* For connecting industry type to position in industries list(small map legend) */
static uint _industry_to_list_pos[NUM_INDUSTRYTYPES];
diff --git a/src/sortlist_type.h b/src/sortlist_type.h
index 3347cb258..2b34bcb75 100644
--- a/src/sortlist_type.h
+++ b/src/sortlist_type.h
@@ -252,7 +252,8 @@ public:
*
* @param compare The function to compare two list items
* @return true if the list sequence has been altered
- * */
+ *
+ */
bool Sort(SortFunction *compare)
{
/* Do not sort if the resort bit is not set */
diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp
index 159bb2989..76a1e1e91 100644
--- a/src/sound/allegro_s.cpp
+++ b/src/sound/allegro_s.cpp
@@ -46,7 +46,8 @@ void SoundDriver_Allegro::MainLoop()
/**
* There are multiple modules that might be using Allegro and
- * Allegro can only be initiated once. */
+ * Allegro can only be initiated once.
+ */
extern int _allegro_instance_count;
const char *SoundDriver_Allegro::Start(const char * const *parm)
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index 50e9cb498..f6b1b87bc 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -407,7 +407,8 @@ void IncreaseSpriteLRU()
/**
* Called when holes in the sprite cache should be removed.
- * That is accomplished by moving the cached data. */
+ * That is accomplished by moving the cached data.
+ */
static void CompactSpriteCache()
{
MemBlock *s;
@@ -530,7 +531,8 @@ static void *AllocSprite(size_t mem_req)
* @param requested requested sprite type
* @param sc the currently known sprite cache for the requested sprite
* @return fallback sprite
- * @note this function will do usererror() in the case the fallback sprite isn't available */
+ * @note this function will do usererror() in the case the fallback sprite isn't available
+ */
static void *HandleInvalidSpriteRequest(SpriteID sprite, SpriteType requested, SpriteCache *sc)
{
static const char * const sprite_types[] = {
diff --git a/src/station.cpp b/src/station.cpp
index f6430359d..05be87526 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -142,7 +142,8 @@ RoadStop *Station::GetPrimaryRoadStop(const RoadVehicle *v) const
/**
* Called when new facility is built on the station. If it is the first facility
- * it initializes also 'xy' and 'random_bits' members */
+ * it initializes also 'xy' and 'random_bits' members
+ */
void Station::AddFacility(StationFacility new_facility_bit, TileIndex facil_xy)
{
if (this->facilities == FACIL_NONE) {
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index a1ef6a764..cf2946454 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -1281,7 +1281,7 @@ static bool AddNearbyStation(TileIndex tile, void *user_data)
* @param distant_join Search for adjacent stations (false) or stations fully
* within station spread
* @tparam T the type of station to look for
- **/
+ */
template <class T>
static const T *FindStationsNearby(TileArea ta, bool distant_join)
{
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 9ce72c570..121301cdb 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -1194,7 +1194,8 @@ static inline void ottd_mkdir(const char *directory)
/**
* Create a path consisting of an already existing path, a possible
* path seperator and the filename. The seperator is only appended if the path
- * does not already end with a seperator */
+ * does not already end with a seperator
+ */
static inline char *mkpath(char *buf, size_t buflen, const char *path, const char *file)
{
ttd_strlcpy(buf, path, buflen); // copy directory into buffer
diff --git a/src/string.cpp b/src/string.cpp
index 160aa15f9..54a484b79 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -193,7 +193,8 @@ void str_strip_colours(char *str)
* needed, look to r7271 where it was removed because it was broken when
* using certain locales: eg in Turkish the uppercase 'I' was converted to
* '?', so just revert to the old functionality
- * @param str string to convert */
+ * @param str string to convert
+ */
void strtolower(char *str)
{
for (; *str != '\0'; str++) *str = tolower(*str);
@@ -296,7 +297,8 @@ int CDECL seprintf(char *str, const char *last, const char *format, ...)
* @param buf buffer to put the md5sum into
* @param last last character of buffer (usually lastof(buf))
* @param md5sum the md5sum itself
- * @return a pointer to the next character after the md5sum */
+ * @return a pointer to the next character after the md5sum
+ */
char *md5sumToString(char *buf, const char *last, const uint8 md5sum[16])
{
char *p = buf;
diff --git a/src/strings.cpp b/src/strings.cpp
index a04948b1a..9b2581b42 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1387,7 +1387,8 @@ bool ReadLanguagePack(int lang_index)
* and if none exist return the value for $LANG
* @param param environment variable to check conditionally if default ones are not
* set. Pass NULL if you don't want additional checks.
- * @return return string containing current charset, or NULL if not-determinable */
+ * @return return string containing current charset, or NULL if not-determinable
+ */
const char *GetCurrentLocale(const char *param)
{
const char *env;
diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h
index 06a880df0..513dff46b 100644
--- a/src/table/airporttiles.h
+++ b/src/table/airporttiles.h
@@ -19,7 +19,8 @@
/**
* All default airport tiles.
- * @see AirportTiles for a list of names. */
+ * @see AirportTiles for a list of names.
+ */
static const AirportTileSpec _origin_airporttile_specs[] = {
/* 0..9 */
AT_NOANIM,
diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h
index 2863db781..9ded0c3ef 100644
--- a/src/table/elrail_data.h
+++ b/src/table/elrail_data.h
@@ -9,14 +9,16 @@
/**
* @file elrail_data.h Stores all the data for overhead wire and pylon drawing.
- * @see elrail.c */
+ * @see elrail.c
+ */
#ifndef ELRAIL_DATA_H
#define ELRAIL_DATA_H
/**
* Tile Location group.
- * This defines whether the X and or Y coordinate of a tile is even */
+ * This defines whether the X and or Y coordinate of a tile is even
+ */
enum TLG {
XEVEN_YEVEN = 0,
XEVEN_YODD = 1,
@@ -28,7 +30,8 @@ enum TLG {
/**
* When determining the pylon configuration on the edge, two tiles are taken
* into account: the tile being drawn itself (the home tile, the one in
- * ti->tile), and the neighbouring tile */
+ * ti->tile), and the neighbouring tile
+ */
enum TileSource {
TS_HOME = 0,
TS_NEIGHBOUR = 1,
@@ -49,7 +52,8 @@ static const byte AllowedPPPonPCP[DIAGDIR_END] = {
/**
* Which of the PPPs are inside the tile. For the two PPPs on the tile border
* the following system is used: if you rotate the PCP so that it is in the
- * north, the eastern PPP belongs to the tile. */
+ * north, the eastern PPP belongs to the tile.
+ */
static const byte OwnedPPPonPCP[DIAGDIR_END] = {
1 << DIR_SE | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W,
1 << DIR_N | 1 << DIR_SW | 1 << DIR_W | 1 << DIR_NW,
@@ -72,7 +76,8 @@ static const DiagDirection PCPpositions[TRACK_END][2] = {
* Preferred points of each trackbit. Those are the ones perpendicular to the
* track, plus the point in extension of the track (to mark end-of-track). PCPs
* which are not on either end of the track are fully preferred.
- * @see PCPpositions */
+ * @see PCPpositions
+ */
static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
{ // X
1 << DIR_NE | 1 << DIR_SE | 1 << DIR_NW, // NE
@@ -114,7 +119,8 @@ static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
/**
* In case we have a staight line, we place pylon only every two tiles,
* so there are certain tiles which we ignore. A straight line is found if
- * we have exactly two PPPs. */
+ * we have exactly two PPPs.
+ */
static const byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = {
{ // Ignore group 1, X and Y tracks
{ // X even, Y even
diff --git a/src/table/industry_land.h b/src/table/industry_land.h
index fae7a7b8e..fe5dd5b6e 100644
--- a/src/table/industry_land.h
+++ b/src/table/industry_land.h
@@ -45,7 +45,8 @@ struct DrawIndustryCoordinates {
* @param h height of the sprite
* @param dz virtual height of the sprite
* @param p this allows to specify a special drawing procedure.
- * @see DrawBuildingsTileStruct */
+ * @see DrawBuildingsTileStruct
+ */
#define M(s1, p1, s2, p2, sx, sy, w, h, dz, p) { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p }
/** Structure for industry tiles drawing */
diff --git a/src/table/sprites.h b/src/table/sprites.h
index e5639099d..636b8ebaa 100644
--- a/src/table/sprites.h
+++ b/src/table/sprites.h
@@ -1455,7 +1455,8 @@ enum Modifiers {
/**
* Masks needed for sprite operations.
* @note Do not modify this enum. Alter SpriteSetup instead
- * @see SpriteSetup */
+ * @see SpriteSetup
+ */
enum SpriteMasks {
/** Maximum number of sprites that can be loaded at a given time. */
MAX_SPRITES = 1 << SPRITE_WIDTH,
diff --git a/src/table/town_land.h b/src/table/town_land.h
index 2055cfb26..788b08531 100644
--- a/src/table/town_land.h
+++ b/src/table/town_land.h
@@ -21,7 +21,8 @@
* @param h the height of the sprite
* @param dz the virtual height of the sprite
* @param p set to 1 if a lift is present ()
- * @see DrawBuildingsTileStruct */
+ * @see DrawBuildingsTileStruct
+ */
#define M(s1, p1, s2, p2, sx, sy, w, h, dz, p) { { s1, p1 }, { s2, p2 }, sx, sy, w, h, dz, p}
/** structure of houses graphics*/
@@ -1828,7 +1829,8 @@ static const HouseSpec _original_house_specs[] = {
* +-building_flags | | | | | | | |
* +-building_availability | | | | | | |
* +-cargoID accepted | | | | | | | |
- * | | | | | | | | | | | */
+ * | | | | | | | | | | |
+ */
MS(1963, MAX_YEAR, 187, 150, STR_TOWN_BUILDING_NAME_TALL_OFFICE_BLOCK_1, 140, 70, 8, 3, 4,
TILE_SIZE_1x1,
HZ_TEMP | HZ_ZON5,
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 8f81e08d6..69268ac8e 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -95,7 +95,7 @@ static void GenerateRockyArea(TileIndex end, TileIndex start)
* @return Returns true if the action was found and handled, and false otherwise. This
* allows for additional implements that are more local. For example X_Y drag
* of convertrail which belongs in rail_gui.cpp and not terraform_gui.cpp
- **/
+ */
bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile)
{
if (!_settings_game.construction.freeform_edges) {
@@ -590,7 +590,8 @@ static OnButtonClick * const _editor_terraform_button_proc[] = {
/**
* Callback function for the scenario editor 'reset landscape' confirmation window
* @param w Window unused
- * @param confirmed boolean value, true when yes was clicked, false otherwise */
+ * @param confirmed boolean value, true when yes was clicked, false otherwise
+ */
static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
{
if (confirmed) {
diff --git a/src/tgp.cpp b/src/tgp.cpp
index 7e31f0637..691765304 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -206,7 +206,8 @@ static const int TGP_FREQUENCY_MAX = 6;
/**
* Noise amplitudes (multiplied by 1024)
- * - indexed by "smoothness setting" and log2(frequency) */
+ * - indexed by "smoothness setting" and log2(frequency)
+ */
static const amplitude_t _amplitudes_by_smoothness_and_frequency[4][TGP_FREQUENCY_MAX + 1] = {
/* lowest frequncy.... ...highest (every corner) */
/* Very smooth */
@@ -842,7 +843,8 @@ static void HeightMapSmoothSlopes(height_t dh_max)
* - water level adjusting
* - coast Smoothing
* - slope Smoothing
- * - height histogram redistribution by sine wave transform */
+ * - height histogram redistribution by sine wave transform
+ */
static void HeightMapNormalize()
{
const amplitude_t water_percent = _water_percent[_settings_game.difficulty.quantity_sea_lakes];
diff --git a/src/tile_cmd.h b/src/tile_cmd.h
index 7e7cc4500..6994d7652 100644
--- a/src/tile_cmd.h
+++ b/src/tile_cmd.h
@@ -135,7 +135,8 @@ typedef CommandCost TerraformTileProc(TileIndex tile, DoCommandFlag flags, uint
/**
* Set of callback functions for performing tile operations of a given tile type.
- * @see TileType */
+ * @see TileType
+ */
struct TileTypeProcs {
DrawTileProc *draw_tile_proc; ///< Called to render the tile and its contents to the screen
GetSlopeZProc *get_slope_z_proc;
diff --git a/src/tile_map.cpp b/src/tile_map.cpp
index b2158e85c..07a4fa743 100644
--- a/src/tile_map.cpp
+++ b/src/tile_map.cpp
@@ -17,7 +17,8 @@
* Return the slope of a given tile
* @param tile Tile to compute slope of
* @param h If not \c NULL, pointer to storage of z height
- * @return Slope of the tile, except for the HALFTILE part */
+ * @return Slope of the tile, except for the HALFTILE part
+ */
Slope GetTileSlope(TileIndex tile, uint *h)
{
assert(tile < MapSize());
@@ -62,7 +63,8 @@ Slope GetTileSlope(TileIndex tile, uint *h)
/**
* Get bottom height of the tile
* @param tile Tile to compute height of
- * @return Minimum height of the tile */
+ * @return Minimum height of the tile
+ */
uint GetTileZ(TileIndex tile)
{
if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) return 0;
@@ -78,7 +80,8 @@ uint GetTileZ(TileIndex tile)
/**
* Get top height of the tile
* @param t Tile to compute height of
- * @return Maximum height of the tile */
+ * @return Maximum height of the tile
+ */
uint GetTileMaxZ(TileIndex t)
{
if (TileX(t) == MapMaxX() || TileY(t) == MapMaxY()) return 0;
diff --git a/src/town.h b/src/town.h
index 9cd4f2795..568f6b598 100644
--- a/src/town.h
+++ b/src/town.h
@@ -166,7 +166,8 @@ enum TownRatingCheckType {
/**
* This is the number of ticks between towns being processed for building new
* houses or roads. This value originally came from the size of the town array
- * in TTD. */
+ * in TTD.
+ */
static const byte TOWN_GROWTH_FREQUENCY = 70;
/**
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 8ceb95153..9b9a2e7ab 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2017,7 +2017,7 @@ static inline bool TownLayoutAllows2x2HouseHere(Town *t, TileIndex tile)
* @param maxz all tiles should have the same height
* @param noslope are slopes forbidden?
* @param second diagdir from first tile to second tile
- **/
+ */
static bool CheckTownBuild2House(TileIndex *tile, Town *t, uint maxz, bool noslope, DiagDirection second)
{
/* 'tile' is already checked in BuildTownHouse() - CanBuildHouseHere() and slope test */
@@ -2042,7 +2042,7 @@ static bool CheckTownBuild2House(TileIndex *tile, Town *t, uint maxz, bool noslo
* @param t town
* @param maxz all tiles should have the same height
* @param noslope are slopes forbidden?
- **/
+ */
static bool CheckTownBuild2x2House(TileIndex *tile, Town *t, uint maxz, bool noslope)
{
TileIndex tile2 = *tile;
@@ -2628,7 +2628,8 @@ static void UpdateTownGrowRate(Town *t)
/**
* Towns are processed every TOWN_GROWTH_FREQUENCY ticks, and this is the
- * number of times towns are processed before a new building is built. */
+ * number of times towns are processed before a new building is built.
+ */
static const uint16 _grow_count_values[2][6] = {
{ 120, 120, 120, 100, 80, 60 }, // Fund new buildings has been activated
{ 320, 420, 300, 220, 160, 100 } // Normal values
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index b8fdd412e..bac4e78d2 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1970,7 +1970,8 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
/**
* returns the tile of a depot to goto to. The given vehicle must not be
- * crashed! */
+ * crashed!
+ */
static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
{
assert(!(v->vehstatus & VS_CRASHED));
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index 3df78ef7e..236027e59 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -42,7 +42,7 @@
* @param type of unmovable (which is the index in _original_unmovable)
* @pre type < UNMOVABLE_MAX
* @return a pointer to the corresponding unmovable spec
- **/
+ */
static inline const UnmovableSpec *GetUnmovableSpec(UnmovableType type)
{
assert(type < UNMOVABLE_MAX);
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 27365a6d4..0be9bb2cb 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1211,7 +1211,8 @@ void MarkSingleVehicleDirty(const Vehicle *v)
/**
* Get position information of a vehicle when moving one pixel in the direction it is facing
* @param v Vehicle to move
- * @return Position information after the move */
+ * @return Position information after the move
+ */
GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v)
{
static const int8 _delta_coord[16] = {
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 47df514aa..c4a8341c9 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -408,7 +408,8 @@ static void PollEvent()
/**
* There are multiple modules that might be using Allegro and
- * Allegro can only be initiated once. */
+ * Allegro can only be initiated once.
+ */
int _allegro_instance_count = 0;
const char *VideoDriver_Allegro::Start(const char * const *parm)
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index 85ccf0a1c..6553aeec0 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -42,7 +42,8 @@
/**
* Switches OpenTTD to a console app at run-time, instead of a PM app
- * Necessary to see stdout, etc. */
+ * Necessary to see stdout, etc.
+ */
static void OS2_SwitchToConsoleMode()
{
PPIB pib;
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 41102ba3b..ad4051aeb 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -365,7 +365,8 @@ ViewPort *IsPtInWindowViewport(const Window *w, int x, int y)
* @param vp Viewport that contains the (\a x, \a y) screen coordinate
* @param x Screen x coordinate
* @param y Screen y coordinate
- * @return Tile coordinate */
+ * @return Tile coordinate
+ */
static Point TranslateXYToTileCoord(const ViewPort *vp, int x, int y)
{
Point pt;
@@ -456,7 +457,8 @@ Point GetTileZoomCenterWindow(bool in, Window * w)
* @param w Window pointer to the window that has the zoom buttons
* @param vp pointer to the viewport whose zoom-level the buttons represent
* @param widget_zoom_in widget index for window with zoom-in button
- * @param widget_zoom_out widget index for window with zoom-out button */
+ * @param widget_zoom_out widget index for window with zoom-out button
+ */
void HandleZoomMessage(Window *w, const ViewPort *vp, byte widget_zoom_in, byte widget_zoom_out)
{
w->SetWidgetDisabledState(widget_zoom_in, vp->zoom == ZOOM_LVL_MIN);
@@ -1426,7 +1428,8 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
/**
* Make sure we don't draw a too big area at a time.
- * If we do, the sprite memory will overflow. */
+ * If we do, the sprite memory will overflow.
+ */
static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom)
{
if (ScaleByZoom(bottom - top, vp->zoom) * ScaleByZoom(right - left, vp->zoom) > 180000) {
@@ -2089,7 +2092,8 @@ void VpSetPlaceSizingLimit(int limit)
/**
* Highlights all tiles between a set of two tiles. Used in dock and tunnel placement
* @param from TileIndex of the first tile to highlight
- * @param to TileIndex of the last tile to highlight */
+ * @param to TileIndex of the last tile to highlight
+ */
void VpSetPresizeRange(TileIndex from, TileIndex to)
{
uint64 distance = DistanceManhattan(from, to) + 1;
@@ -2112,7 +2116,8 @@ static void VpStartPreSizing()
/**
* returns information about the 2x1 piece to be build.
- * The lower bits (0-3) are the track type. */
+ * The lower bits (0-3) are the track type.
+ */
static HighLightStyle Check2x1AutoRail(int mode)
{
int fxpy = _tile_fract_coords.x + _tile_fract_coords.y;
@@ -2155,7 +2160,8 @@ static HighLightStyle Check2x1AutoRail(int mode)
* @param style HighLightStyle dragging style
* @param start_tile start tile of drag
* @param end_tile end tile of drag
- * @return boolean value which when true means start/end should be swapped */
+ * @return boolean value which when true means start/end should be swapped
+ */
static bool SwapDirection(HighLightStyle style, TileIndex start_tile, TileIndex end_tile)
{
uint start_x = TileX(start_tile);
@@ -2511,7 +2517,8 @@ static void CalcRaildirsDrawstyle(TileHighlightData *thd, int x, int y, int meth
* @param x X coordinate of end of selection
* @param y Y coordinate of end of selection
* @param method modifies the way tiles are selected. Possible
- * methods are VPM_* in viewport.h */
+ * methods are VPM_* in viewport.h
+ */
void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
{
int sx, sy;
diff --git a/src/viewport_type.h b/src/viewport_type.h
index e8ca36303..274a29e26 100644
--- a/src/viewport_type.h
+++ b/src/viewport_type.h
@@ -84,7 +84,8 @@ DECLARE_ENUM_AS_BIT_SET(ViewportPlaceMethod)
/**
* Drag and drop selection process, or, what to do with an area of land when
- * you've selected it. */
+ * you've selected it.
+ */
enum ViewportDragDropSelectionProcess {
DDSP_DEMOLISH_AREA, ///< Clear area
DDSP_RAISE_AND_LEVEL_AREA, ///< Raise / level area
diff --git a/src/widget_type.h b/src/widget_type.h
index 3711b569d..39312dcba 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -221,7 +221,8 @@ FORCEINLINE void NWidgetBase::StoreSizePosition(SizingType sizing, uint x, uint
/**
* Base class for a resizable nested widget.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetResizeBase : public NWidgetBase {
public:
NWidgetResizeBase(WidgetType tp, uint fill_x, uint fill_y);
@@ -260,7 +261,8 @@ DECLARE_ENUM_AS_BIT_SET(NWidgetDisplay)
/**
* Base class for a 'real' widget.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetCore : public NWidgetResizeBase {
public:
NWidgetCore(WidgetType tp, Colours colour, uint fill_x, uint fill_y, uint16 widget_data, StringID tool_tip);
@@ -318,7 +320,8 @@ inline bool NWidgetCore::IsDisabled() const
/**
* Baseclass for container widgets.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetContainer : public NWidgetBase {
public:
NWidgetContainer(WidgetType tp);
@@ -403,7 +406,8 @@ protected:
/**
* Horizontal container.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetHorizontal : public NWidgetPIPContainer {
public:
NWidgetHorizontal(NWidContainerFlags flags = NC_NONE);
@@ -414,7 +418,8 @@ public:
/**
* Horizontal container that doesn't change the direction of the widgets for RTL languages.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetHorizontalLTR : public NWidgetHorizontal {
public:
NWidgetHorizontalLTR(NWidContainerFlags flags = NC_NONE);
@@ -424,7 +429,8 @@ public:
/**
* Vertical container.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetVertical : public NWidgetPIPContainer {
public:
NWidgetVertical(NWidContainerFlags flags = NC_NONE);
@@ -436,7 +442,8 @@ public:
/**
* Spacer widget.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetSpacer : public NWidgetResizeBase {
public:
NWidgetSpacer(int length, int height);
@@ -451,7 +458,8 @@ public:
/**
* Nested widget with a child.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetBackground : public NWidgetCore {
public:
NWidgetBackground(WidgetType tp, Colours colour, int index, NWidgetPIPContainer *child = NULL);
@@ -481,7 +489,8 @@ private:
* If the #display_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 */
+ * @ingroup NestedWidgets
+ */
class NWidgetViewport : public NWidgetCore {
public:
NWidgetViewport(int index);
@@ -496,7 +505,8 @@ public:
/**
* Leaf widget.
- * @ingroup NestedWidgets */
+ * @ingroup NestedWidgets
+ */
class NWidgetLeaf : public NWidgetCore {
public:
NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data, StringID tip);
@@ -581,7 +591,8 @@ static FORCEINLINE uint ComputeMaxSize(uint base, uint max_space, uint step)
/**
* Widget part for storing data and tooltip information.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPartDataTip {
uint16 data; ///< Data value of the widget.
StringID tooltip; ///< Tooltip of the widget.
@@ -589,7 +600,8 @@ struct NWidgetPartDataTip {
/**
* Widget part for storing basic widget information.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPartWidget {
Colours colour; ///< Widget colour.
int16 index; ///< Widget index in the widget array.
@@ -597,21 +609,24 @@ struct NWidgetPartWidget {
/**
* Widget part for storing padding.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPartPaddings {
uint8 top, right, bottom, left; ///< Paddings for all directions.
};
/**
* Widget part for storing pre/inter/post spaces.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPartPIP {
uint8 pre, inter, post; ///< Amount of space before/between/after child widgets.
};
/**
* Widget part for storing minimal text line data.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPartTextLines {
uint8 lines; ///< Number of text lines.
uint8 spacing; ///< Extra spacing around lines.
@@ -628,7 +643,8 @@ typedef NWidgetBase *NWidgetFunctionType(int *biggest_index);
/**
* Partial widget specification to allow NWidgets to be written nested.
- * @ingroup NestedWidgetParts */
+ * @ingroup NestedWidgetParts
+ */
struct NWidgetPart {
WidgetType type; ///< Type of the part. @see NWidgetPartType.
union {
diff --git a/src/window.cpp b/src/window.cpp
index f9532188b..c1198a0bd 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -764,7 +764,8 @@ restart_search:
* Delete all windows of a company. We identify windows of a company
* by looking at the caption colour. If it is equal to the company ID
* then we say the window belongs to the company and should be deleted
- * @param id company identifier */
+ * @param id company identifier
+ */
void DeleteCompanyWindows(CompanyID id)
{
Window *w;
@@ -789,7 +790,8 @@ restart_search:
* company in the case of a company merger. Do not change ownership of windows
* that need to be deleted once takeover is complete
* @param old_owner original owner of the window
- * @param new_owner the new owner of the window */
+ * @param new_owner the new owner of the window
+ */
void ChangeWindowOwner(Owner old_owner, Owner new_owner)
{
Window *w;
@@ -822,7 +824,8 @@ static void BringWindowToFront(Window *w);
* The window gets unshaded if it was shaded, and a white border is drawn at its edges for a brief period of time to visualize its "activation".
* @param cls WindowClass of the window to activate
* @param number WindowNumber of the window to activate
- * @return a pointer to the window thus activated */
+ * @return a pointer to the window thus activated
+ */
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number)
{
Window *w = FindWindowById(cls, number);
@@ -1322,7 +1325,8 @@ Window::Window() : hscroll(false), vscroll(true), vscroll2(true)
* at the topmost window, obviously and work our way down to the bottom
* @param x position x to query
* @param y position y to query
- * @return a pointer to the found window if any, NULL otherwise */
+ * @return a pointer to the found window if any, NULL otherwise
+ */
Window *FindWindowFromPt(int x, int y)
{
Window *w;
@@ -1932,7 +1936,8 @@ static EventState HandleViewportScroll()
* The function will return false when a child window of this window is a
* modal-popup; function returns a false and child window gets a white border
* @param w Window to bring on-top
- * @return false if the window has an active modal child, true otherwise */
+ * @return false if the window has an active modal child, true otherwise
+ */
static bool MaybeBringWindowToFront(Window *w)
{
bool bring_to_front = false;
@@ -2564,7 +2569,8 @@ restart_search:
* 'close' button is outside the gaming area. You cannot close it then; except
* with this function. It closes all windows calling the standard function,
* then, does a little hacked loop of closing all stickied windows. Note
- * that standard windows (status bar, etc.) are not stickied, so these aren't affected */
+ * that standard windows (status bar, etc.) are not stickied, so these aren't affected
+ */
void DeleteAllNonVitalWindows()
{
Window *w;