summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-01 19:22:34 +0000
committerfrosch <frosch@openttd.org>2010-08-01 19:22:34 +0000
commited4f806f1dcff2e10d2fdfb687e6bcebe9a81af3 (patch)
treedba65e1ae2fc4538779195db320eccfa441cbbd0
parent4871baf44db96137cf4b72c4f9d9595b2c29f61d (diff)
downloadopenttd-ed4f806f1dcff2e10d2fdfb687e6bcebe9a81af3.tar.xz
(svn r20283) -Codechange: Unify start of doygen comments.
-rw-r--r--src/ai/api/ai_changelog.hpp3
-rw-r--r--src/ai/api/ai_types.hpp3
-rw-r--r--src/aircraft.h9
-rw-r--r--src/aircraft_cmd.cpp33
-rw-r--r--src/airport.cpp6
-rw-r--r--src/autoreplace_cmd.cpp30
-rw-r--r--src/autoreplace_gui.cpp12
-rw-r--r--src/bridge.h6
-rw-r--r--src/build_vehicle_gui.cpp3
-rw-r--r--src/cargo_type.h6
-rw-r--r--src/cargotype.cpp15
-rw-r--r--src/cargotype.h3
-rw-r--r--src/company_cmd.cpp15
-rw-r--r--src/company_gui.cpp21
-rw-r--r--src/console_internal.h6
-rw-r--r--src/core/bitmath_func.hpp6
-rw-r--r--src/core/enum_type.hpp9
-rw-r--r--src/core/random_func.hpp6
-rw-r--r--src/core/smallmap_type.hpp18
-rw-r--r--src/debug.cpp3
-rw-r--r--src/depot_gui.cpp18
-rw-r--r--src/disaster_cmd.cpp21
-rw-r--r--src/driver.cpp3
-rw-r--r--src/driver.h3
-rw-r--r--src/economy.cpp12
-rw-r--r--src/elrail.cpp9
-rw-r--r--src/endian_check.cpp3
-rw-r--r--src/engine.cpp15
-rw-r--r--src/engine_gui.cpp9
-rw-r--r--src/engine_type.h3
-rw-r--r--src/fios.cpp6
-rw-r--r--src/fios_gui.cpp3
-rw-r--r--src/fontcache.cpp3
-rw-r--r--src/gamelog.cpp78
-rw-r--r--src/gfx.cpp27
-rw-r--r--src/graph_gui.cpp6
-rw-r--r--src/highscore_gui.cpp6
-rw-r--r--src/house.h6
-rw-r--r--src/industry_cmd.cpp57
-rw-r--r--src/industry_gui.cpp9
-rw-r--r--src/industrytype.h3
-rw-r--r--src/landscape.cpp12
-rw-r--r--src/landscape.h3
-rw-r--r--src/misc/array.hpp3
-rw-r--r--src/misc/blob.hpp18
-rw-r--r--src/misc/countedptr.hpp6
-rw-r--r--src/misc/dbg_helpers.cpp3
-rw-r--r--src/misc/fixedsizearray.hpp6
-rw-r--r--src/misc/hashtable.hpp6
-rw-r--r--src/misc_cmd.cpp12
-rw-r--r--src/misc_gui.cpp9
-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.cpp9
-rw-r--r--src/network/network_gui.cpp9
-rw-r--r--src/network/network_server.cpp9
-rw-r--r--src/newgrf.cpp18
-rw-r--r--src/newgrf_callbacks.h15
-rw-r--r--src/newgrf_canal.h6
-rw-r--r--src/newgrf_commons.cpp36
-rw-r--r--src/newgrf_commons.h3
-rw-r--r--src/newgrf_config.cpp24
-rw-r--r--src/newgrf_config.h3
-rw-r--r--src/newgrf_engine.cpp3
-rw-r--r--src/newgrf_generic.cpp3
-rw-r--r--src/newgrf_gui.cpp15
-rw-r--r--src/newgrf_house.cpp12
-rw-r--r--src/newgrf_industries.cpp9
-rw-r--r--src/newgrf_industrytiles.cpp6
-rw-r--r--src/newgrf_station.cpp6
-rw-r--r--src/newgrf_station.h6
-rw-r--r--src/newgrf_text.cpp3
-rw-r--r--src/newgrf_town.cpp3
-rw-r--r--src/newgrf_townname.cpp3
-rw-r--r--src/newgrf_townname.h3
-rw-r--r--src/news_gui.cpp9
-rw-r--r--src/openttd.cpp6
-rw-r--r--src/order_base.h6
-rw-r--r--src/order_cmd.cpp24
-rw-r--r--src/order_gui.cpp3
-rw-r--r--src/os/unix/unix.cpp9
-rw-r--r--src/os/windows/win32.cpp12
-rw-r--r--src/pathfinder/follow_track.hpp6
-rw-r--r--src/pathfinder/npf/aystar.h3
-rw-r--r--src/pathfinder/npf/queue.cpp3
-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.hpp15
-rw-r--r--src/pathfinder/yapf/yapf_common.hpp6
-rw-r--r--src/pathfinder/yapf/yapf_costcache.hpp33
-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.cpp9
-rw-r--r--src/rail.h12
-rw-r--r--src/rail_cmd.cpp48
-rw-r--r--src/rail_gui.cpp15
-rw-r--r--src/rail_map.h3
-rw-r--r--src/road_cmd.cpp15
-rw-r--r--src/road_gui.cpp9
-rw-r--r--src/road_map.h3
-rw-r--r--src/roadveh_cmd.cpp15
-rw-r--r--src/saveload/afterload.cpp3
-rw-r--r--src/saveload/airport_sl.cpp3
-rw-r--r--src/saveload/order_sl.cpp6
-rw-r--r--src/saveload/saveload.cpp21
-rw-r--r--src/saveload/saveload.h15
-rw-r--r--src/screenshot.cpp3
-rw-r--r--src/settings.cpp72
-rw-r--r--src/settings_internal.h3
-rw-r--r--src/ship_cmd.cpp18
-rw-r--r--src/signs_cmd.cpp3
-rw-r--r--src/smallmap_gui.cpp21
-rw-r--r--src/sound/allegro_s.cpp3
-rw-r--r--src/spritecache.cpp6
-rw-r--r--src/station.cpp6
-rw-r--r--src/station_cmd.cpp48
-rw-r--r--src/station_gui.cpp15
-rw-r--r--src/strgen/strgen.cpp3
-rw-r--r--src/string.cpp6
-rw-r--r--src/string_func.h6
-rw-r--r--src/strings.cpp9
-rw-r--r--src/table/airporttiles.h3
-rw-r--r--src/table/animcursors.h27
-rw-r--r--src/table/bridge_land.h6
-rw-r--r--src/table/build_industry.h3
-rw-r--r--src/table/elrail_data.h21
-rw-r--r--src/table/engines.h27
-rw-r--r--src/table/industry_land.h3
-rw-r--r--src/table/railtypes.h6
-rw-r--r--src/table/settings.h3
-rw-r--r--src/table/sprites.h6
-rw-r--r--src/table/town_land.h6
-rw-r--r--src/terraform_cmd.cpp6
-rw-r--r--src/terraform_gui.cpp3
-rw-r--r--src/tgp.cpp9
-rw-r--r--src/town.h9
-rw-r--r--src/town_cmd.cpp33
-rw-r--r--src/townname_type.h3
-rw-r--r--src/train_cmd.cpp33
-rw-r--r--src/tree_cmd.cpp3
-rw-r--r--src/tunnelbridge_cmd.cpp30
-rw-r--r--src/unmovable_cmd.cpp12
-rw-r--r--src/vehicle.cpp12
-rw-r--r--src/vehicle_base.h3
-rw-r--r--src/vehicle_cmd.cpp27
-rw-r--r--src/vehicle_gui.cpp12
-rw-r--r--src/vehicle_gui.h3
-rw-r--r--src/video/allegro_v.cpp3
-rw-r--r--src/viewport.cpp33
-rw-r--r--src/viewport_type.h3
-rw-r--r--src/water_cmd.cpp15
-rw-r--r--src/water_map.h57
-rw-r--r--src/waypoint_cmd.cpp6
-rw-r--r--src/widget.cpp12
-rw-r--r--src/widget_type.h54
-rw-r--r--src/widgets/dropdown.cpp9
-rw-r--r--src/window.cpp57
-rw-r--r--src/window_gui.h6
162 files changed, 1304 insertions, 652 deletions
diff --git a/src/ai/api/ai_changelog.hpp b/src/ai/api/ai_changelog.hpp
index b979d0ef1..03ba5dca4 100644
--- a/src/ai/api/ai_changelog.hpp
+++ b/src/ai/api/ai_changelog.hpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file ai_changelog.hpp Lists all changes / additions to the API.
+/**
+ * @file ai_changelog.hpp Lists all changes / additions to the API.
*
* Only new / renamed / deleted api functions will be listed here. A list of
* bug fixes can be found in the normal changelog. Note that removed API
diff --git a/src/ai/api/ai_types.hpp b/src/ai/api/ai_types.hpp
index ff435131d..197391d84 100644
--- a/src/ai/api/ai_types.hpp
+++ b/src/ai/api/ai_types.hpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file ai_types.hpp Defines all the types of the game, like IDs of various objects.
+/**
+ * @file ai_types.hpp Defines all the types of the game, like IDs of various objects.
*
* IDs are used to identify certain objects. They are only unique within the object type, so for example a vehicle may have VehicleID 2009,
* while a station has StationID 2009 at the same time. Also IDs are assigned arbitrary, you cannot assume them to be consecutive.
diff --git a/src/aircraft.h b/src/aircraft.h
index 049dca94f..a0ff21833 100644
--- a/src/aircraft.h
+++ b/src/aircraft.h
@@ -26,12 +26,14 @@ enum AircraftSubType {
};
-/** Handle Aircraft specific tasks when a an Aircraft enters a hangar
+/**
+ * Handle Aircraft specific tasks when a an Aircraft enters a hangar
* @param *v Vehicle that enters the hangar
*/
void HandleAircraftEnterHangar(Aircraft *v);
-/** Get the size of the sprite of an aircraft sprite heading west (used for lists)
+/**
+ * Get the size of the sprite of an aircraft sprite heading west (used for lists)
* @param engine The engine to get the sprite from
* @param width The width of the sprite
* @param height The height of the sprite
@@ -44,7 +46,8 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height);
*/
void UpdateAirplanesOnNewStation(const Station *st);
-/** Update cached values of an aircraft.
+/**
+ * Update cached values of an aircraft.
* Currently caches callback 36 max speed.
* @param v Vehicle
*/
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index c39be771a..cb7e5ffcc 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file aircraft_cmd.cpp
+/**
+ * @file aircraft_cmd.cpp
* This file deals with aircraft and airport movements functionalities */
#include "stdafx.h"
@@ -70,7 +71,8 @@ void Aircraft::UpdateDeltaXY(Direction direction)
}
-/** this maps the terminal to its corresponding state and block flag
+/**
+ * this maps the terminal to its corresponding state and block flag
* 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};
@@ -100,7 +102,8 @@ enum HelicopterRotorStates {
HRS_ROTOR_MOVING_3,
};
-/** Find the nearest hangar to v
+/**
+ * Find the nearest hangar to v
* INVALID_STATION is returned, if the company does not have any suitable
* airports (like helipads only)
* @param v vehicle looking for a hangar
@@ -137,7 +140,8 @@ static StationID FindNearestHangar(const Aircraft *v)
}
#if 0
-/** Check if given vehicle has a goto hangar in his orders
+/**
+ * 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 */
static bool HaveHangarInOrderList(Aircraft *v)
@@ -213,7 +217,8 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
}
}
-/** Get the size of the sprite of an aircraft sprite heading west (used for lists)
+/**
+ * Get the size of the sprite of an aircraft sprite heading west (used for lists)
* @param engine The engine to get the sprite from
* @param width The width of the sprite
* @param height The height of the sprite
@@ -226,7 +231,8 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height)
height = spr->height;
}
-/** Build an aircraft.
+/**
+ * Build an aircraft.
* @param tile tile of depot where aircraft is built
* @param flags for command
* @param p1 aircraft type being built (engine)
@@ -383,7 +389,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
-/** Sell an aircraft.
+/**
+ * Sell an aircraft.
* @param tile unused
* @param flags for command type
* @param p1 vehicle ID to be sold
@@ -431,7 +438,8 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination,
return true;
}
-/** Send an aircraft to the hangar.
+/**
+ * Send an aircraft to the hangar.
* @param tile unused
* @param flags for command type
* @param p1 vehicle ID to send to the hangar
@@ -456,7 +464,8 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, DoCommandFlag flags, uint32
}
-/** Refits an aircraft to the specified cargo type.
+/**
+ * Refits an aircraft to the specified cargo type.
* @param tile unused
* @param flags for command type
* @param p1 vehicle ID of the aircraft to refit
@@ -634,7 +643,8 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
}
}
-/** Handle Aircraft specific tasks when a an Aircraft enters a hangar
+/**
+ * Handle Aircraft specific tasks when a an Aircraft enters a hangar
* @param *v Vehicle that enters the hangar
*/
void HandleAircraftEnterHangar(Aircraft *v)
@@ -1952,7 +1962,8 @@ bool Aircraft::Tick()
}
-/** Returns aircraft's target station if v->target_airport
+/**
+ * Returns aircraft's target station if v->target_airport
* is a valid station with airport.
* @param v vehicle to get target airport for
* @return pointer to target station, NULL if invalid
diff --git a/src/airport.cpp b/src/airport.cpp
index b980e53e0..99e513298 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -227,7 +227,8 @@ AirportFTAClass::~AirportFTAClass()
free(layout);
}
-/** Get the number of elements of a source Airport state automata
+/**
+ * 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 */
static uint16 AirportGetNofElements(const AirportFTAbuildup *apFA)
@@ -245,7 +246,8 @@ static uint16 AirportGetNofElements(const AirportFTAbuildup *apFA)
return nofelements;
}
-/** We calculate the terminal/helipod count based on the data passed to us
+/**
+ * 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 */
static byte AirportGetTerminalCount(const byte *terminals, byte *groups)
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 8b395e6c1..483fb445a 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -30,7 +30,8 @@ extern void ChangeVehicleViewports(VehicleID from_index, VehicleID to_index);
extern void ChangeVehicleNews(VehicleID from_index, VehicleID to_index);
extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index);
-/** Figure out if two engines got at least one type of cargo in common (refitting if needed)
+/**
+ * Figure out if two engines got at least one type of cargo in common (refitting if needed)
* @param engine_a one of the EngineIDs
* @param engine_b the other EngineID
* @param type the type of the engines
@@ -91,7 +92,8 @@ bool CheckAutoreplaceValidity(EngineID from, EngineID to, CompanyID company)
return EnginesHaveCargoInCommon(from, to);
}
-/** Transfer cargo from a single (articulated )old vehicle to the new vehicle chain
+/**
+ * Transfer cargo from a single (articulated )old vehicle to the new vehicle chain
* @param old_veh Old vehicle that will be sold
* @param new_head Head of the completely constructed new vehicle chain
* @param part_of_chain The vehicle is part of a train
@@ -210,7 +212,8 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool
}
}
-/** Get the EngineID of the replacement for a vehicle
+/**
+ * Get the EngineID of the replacement for a vehicle
* @param v The vehicle to find a replacement for
* @param c The vehicle's owner (it's faster to forward the pointer than refinding it)
* @return the EngineID of the replacement. INVALID_ENGINE if no buildable replacement is found
@@ -238,7 +241,8 @@ static EngineID GetNewEngineType(const Vehicle *v, const Company *c)
return INVALID_ENGINE;
}
-/** Builds and refits a replacement vehicle
+/**
+ * Builds and refits a replacement vehicle
* Important: The old vehicle is still in the original vehicle chain (used for determining the cargo when the old vehicle did not carry anything, but the new one does)
* @param old_veh A single (articulated/multiheaded) vehicle that shall be replaced.
* @param new_vehicle Returns the newly build and refittet vehicle
@@ -284,7 +288,8 @@ static CommandCost BuildReplacementVehicle(Vehicle *old_veh, Vehicle **new_vehic
return cost;
}
-/** Issue a start/stop command
+/**
+ * Issue a start/stop command
* @param v a vehicle
* @param evaluate_callback shall the start/stop callback be evaluated?
* @return success or error
@@ -294,7 +299,8 @@ static inline CommandCost StartStopVehicle(const Vehicle *v, bool evaluate_callb
return DoCommand(0, v->index, evaluate_callback ? 1 : 0, DC_EXEC | DC_AUTOREPLACE, CMD_START_STOP_VEHICLE);
}
-/** Issue a train vehicle move command
+/**
+ * Issue a train vehicle move command
* @param v The vehicle to move
* @param after The vehicle to insert 'v' after, or NULL to start new chain
* @param flags the command flags to use
@@ -306,7 +312,8 @@ static inline CommandCost MoveVehicle(const Vehicle *v, const Vehicle *after, Do
return DoCommand(0, v->index | (after != NULL ? after->index : INVALID_VEHICLE) << 16, whole_chain ? 1 : 0, flags, CMD_MOVE_RAIL_VEHICLE);
}
-/** Copy head specific things to the new vehicle chain after it was successfully constructed
+/**
+ * Copy head specific things to the new vehicle chain after it was successfully constructed
* @param old_head The old front vehicle (no wagons attached anymore)
* @param new_head The new head of the completely replaced vehicle chain
* @param flags the command flags to use
@@ -350,7 +357,8 @@ static CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head,
return cost;
}
-/** Replace a single unit in a free wagon chain
+/**
+ * Replace a single unit in a free wagon chain
* @param single_unit vehicle to let autoreplace/renew operator on
* @param flags command flags
* @param nothing_to_do is set to 'false' when something was done (only valid when not failed)
@@ -398,7 +406,8 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, DoCommandFlag flags, b
return cost;
}
-/** Replace a whole vehicle chain
+/**
+ * Replace a whole vehicle chain
* @param chain vehicle chain to let autoreplace/renew operator on
* @param flags command flags
* @param wagon_removal remove wagons when the resulting chain occupies more tiles than the old did
@@ -607,7 +616,8 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon
return cost;
}
-/** Autoreplaces a vehicle
+/**
+ * Autoreplaces a vehicle
* Trains are replaced as a whole chain, free wagons in depot are replaced on their own
* @param tile not used
* @param flags type of operation
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 36612de78..b1b6f03f9 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -63,7 +63,8 @@ static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
return r;
}
-/** Rebuild the left autoreplace list if an engine is removed or added
+/**
+ * Rebuild the left autoreplace list if an engine is removed or added
* @param e Engine to check if it is removed or added
* @param id_g The group the engine belongs to
* Note: this function only works if it is called either
@@ -84,7 +85,8 @@ void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g)
}
}
-/** When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
+/**
+ * When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
* @param type The type of engine
*/
void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type)
@@ -105,7 +107,8 @@ class ReplaceVehicleWindow : public Window {
int details_height; ///< Minimal needed height of the details panels (found so far).
RailType sel_railtype; ///< Type of rail tracks selected.
- /** Figure out if an engine should be added to a list.
+ /**
+ * Figure out if an engine should be added to a list.
* @param e The EngineID.
* @param draw_left If \c true, the left list is drawn (the engines specific to the railtype you selected).
* @param show_engines If \c true, the locomotives are drawn, else the wagons are drawn (never both).
@@ -126,7 +129,8 @@ class ReplaceVehicleWindow : public Window {
}
- /** Generate an engines list
+ /**
+ * Generate an engines list
* @param draw_left true if generating the left list, otherwise false
*/
void GenerateReplaceVehList(bool draw_left)
diff --git a/src/bridge.h b/src/bridge.h
index d7d34ae9b..b0546669b 100644
--- a/src/bridge.h
+++ b/src/bridge.h
@@ -15,7 +15,8 @@
#include "gfx_type.h"
#include "tile_cmd.h"
-/** This enum is related to the definition of bridge pieces,
+/**
+ * This enum is related to the definition of bridge pieces,
* which is used to determine the proper sprite table to use
* while drawing a given bridge part.
*/
@@ -36,7 +37,8 @@ static const uint MAX_BRIDGES = 13;
typedef uint BridgeType;
-/** Struct containing information about a single bridge type
+/**
+ * Struct containing information about a single bridge type
*/
struct BridgeSpec {
Year avail_year; ///< the year where it becomes available
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 0802cc088..ab2e66530 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -711,7 +711,8 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
return y;
}
-/** Engine drawing loop
+/**
+ * Engine drawing loop
* @param type Type of vehicle (VEH_*)
* @param l The left most location of the list
* @param r The right most location of the list
diff --git a/src/cargo_type.h b/src/cargo_type.h
index 8d9a1a825..d2261c037 100644
--- a/src/cargo_type.h
+++ b/src/cargo_type.h
@@ -87,7 +87,8 @@ public:
memset(this->amount, 0, sizeof(this->amount));
}
- /** Read/write access to an amount of a specific cargo type.
+ /**
+ * Read/write access to an amount of a specific cargo type.
* @param cargo Cargo type to access.
*/
FORCEINLINE uint &operator[](CargoID cargo)
@@ -95,7 +96,8 @@ public:
return this->amount[cargo];
}
- /** Read-only access to an amount of a specific cargo type.
+ /**
+ * Read-only access to an amount of a specific cargo type.
* @param cargo Cargo type to access.
*/
FORCEINLINE const uint &operator[](CargoID cargo) const
diff --git a/src/cargotype.cpp b/src/cargotype.cpp
index ecad2308e..94edd27f5 100644
--- a/src/cargotype.cpp
+++ b/src/cargotype.cpp
@@ -22,12 +22,14 @@
CargoSpec CargoSpec::array[NUM_CARGO];
-/** Bitmask of cargo types available.
+/**
+ * Bitmask of cargo types available.
* Initialized during a call to #SetupCargoForClimate.
*/
uint32 _cargo_mask;
-/** Set up the default cargo types for the given landscape type.
+/**
+ * Set up the default cargo types for the given landscape type.
* @param l Landscape
*/
void SetupCargoForClimate(LandscapeID l)
@@ -66,7 +68,8 @@ void SetupCargoForClimate(LandscapeID l)
}
}
-/** Get the cargo ID by cargo label.
+/**
+ * Get the cargo ID by cargo label.
* @param cl Cargo type to get.
* @return ID number if the cargo exists, else #CT_INVALID
*/
@@ -82,7 +85,8 @@ CargoID GetCargoIDByLabel(CargoLabel cl)
}
-/** Find the CargoID of a 'bitnum' value.
+/**
+ * Find the CargoID of a 'bitnum' value.
* @param bitnum 'bitnum' to find.
* @return First CargoID with the given bitnum, or #CT_INVALID if not found or if the provided \a bitnum is invalid.
*/
@@ -99,7 +103,8 @@ CargoID GetCargoIDByBitnum(uint8 bitnum)
return CT_INVALID;
}
-/** Get sprite for showing cargo of this type.
+/**
+ * Get sprite for showing cargo of this type.
* @return Sprite number to use.
*/
SpriteID CargoSpec::GetCargoIcon() const
diff --git a/src/cargotype.h b/src/cargotype.h
index 80fb0de7e..89ce80ed2 100644
--- a/src/cargotype.h
+++ b/src/cargotype.h
@@ -136,7 +136,8 @@ extern const CargoSpec *_sorted_cargo_specs[NUM_CARGO];
extern uint8 _sorted_cargo_specs_size;
extern uint8 _sorted_standard_cargo_specs_size;
-/** Does cargo \a c have cargo class \a cc?
+/**
+ * Does cargo \a c have cargo class \a cc?
* @param c Cargo type.
* @param cc Cargo class.
* @return The type fits in the class.
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 76fab7cc2..671c6406e 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -718,7 +718,8 @@ void CompanyNewsInformation::FillData(const Company *c, const Company *other)
}
-/** Control the companies: add, delete, etc.
+/**
+ * Control the companies: add, delete, etc.
* @param tile unused
* @param flags operation to perform
* @param p1 various functionality
@@ -869,7 +870,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
return CommandCost();
}
-/** Change the company manager's face.
+/**
+ * Change the company manager's face.
* @param tile unused
* @param flags operation to perform
* @param p1 unused
@@ -890,7 +892,8 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32
return CommandCost();
}
-/** Change the company's company-colour
+/**
+ * Change the company's company-colour
* @param tile unused
* @param flags operation to perform
* @param p1 bitstuffed:
@@ -999,7 +1002,8 @@ static bool IsUniqueCompanyName(const char *name)
return true;
}
-/** Change the name of the company.
+/**
+ * Change the name of the company.
* @param tile unused
* @param flags operation to perform
* @param p1 unused
@@ -1042,7 +1046,8 @@ static bool IsUniquePresidentName(const char *name)
return true;
}
-/** Change the name of the president.
+/**
+ * Change the name of the president.
* @param tile unused
* @param flags operation to perform
* @param p1 unused
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index b9705584b..745bef62b 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -141,7 +141,8 @@ enum CompanyFinancesWindowWidgets {
CFW_REPAY_LOAN, ///< Decrease loan
};
-/** Draw the expenses categories.
+/**
+ * Draw the expenses categories.
* @param r Available space for drawing.
* @note The environment must provide padding at the left and right of \a r.
*/
@@ -168,7 +169,8 @@ static void DrawCategories(const Rect &r)
DrawString(r.left, r.right, y + EXP_LINESPACE, STR_FINANCES_TOTAL_CAPTION, TC_FROMSTRING, SA_RIGHT);
}
-/** Draw an amount of money.
+/**
+ * Draw an amount of money.
* @param amount Amount of money to draw,
* @param left Left coordinate of the space to draw in.
* @param right Right coordinate of the space to draw in.
@@ -185,7 +187,8 @@ static void DrawPrice(Money amount, int left, int right, int top)
DrawString(left, right, top, str, TC_FROMSTRING, SA_RIGHT);
}
-/** Draw a column with prices.
+/**
+ * Draw a column with prices.
* @param r Available space for drawing.
* @param year Year being drawn.
* @param tbl Pointer to table of amounts for \a year.
@@ -278,7 +281,8 @@ static const NWidgetPart _nested_company_finances_widgets[] = {
EndContainer(),
};
-/** Window class displaying the company finances.
+/**
+ * Window class displaying the company finances.
* @todo #money_width should be calculated dynamically.
*/
struct CompanyFinancesWindow : Window {
@@ -387,7 +391,8 @@ struct CompanyFinancesWindow : Window {
}
}
- /** Setup the widgets in the nested tree, such that the finances window is displayed properly.
+ /**
+ * Setup the widgets in the nested tree, such that the finances window is displayed properly.
* @note After setup, the window must be (re-)initialized.
*/
void SetupWidgets()
@@ -477,7 +482,8 @@ static const WindowDesc _company_finances_desc(
_nested_company_finances_widgets, lengthof(_nested_company_finances_widgets)
);
-/** Open the finances window of a company.
+/**
+ * Open the finances window of a company.
* @param company Company to show finances of.
* @pre is company a valid company.
*/
@@ -1145,7 +1151,8 @@ public:
this->UpdateData();
}
- /** Select planes to display to the user with the #NWID_SELECTION widgets #SCMFW_WIDGET_SEL_LOADSAVE, #SCMFW_WIDGET_SEL_MALEFEMALE, and #SCMFW_WIDGET_SEL_PARTS.
+ /**
+ * Select planes to display to the user with the #NWID_SELECTION widgets #SCMFW_WIDGET_SEL_LOADSAVE, #SCMFW_WIDGET_SEL_MALEFEMALE, and #SCMFW_WIDGET_SEL_PARTS.
* @param advanced Display advanced face management window.
*/
void SelectDisplayPlanes(bool advanced)
diff --git a/src/console_internal.h b/src/console_internal.h
index ae3daba37..b4d70fa2e 100644
--- a/src/console_internal.h
+++ b/src/console_internal.h
@@ -24,7 +24,8 @@ enum ConsoleHookResult {
CHR_HIDE, ///< Hide the existence of the command.
};
-/** --Commands--
+/**
+ * --Commands--
* Commands are commands, or functions. They get executed once and any
* effect they produce are carried out. The arguments to the commands
* are given to them, each input word seperated by a double-quote (") is an argument
@@ -41,7 +42,8 @@ struct IConsoleCmd {
IConsoleHook *hook; ///< any special trigger action that needs executing
};
-/** --Aliases--
+/**
+ * --Aliases--
* Aliases are like shortcuts for complex functions, variable assignments,
* etc. You can use a simple alias to rename a longer command (eg 'set' for
* 'setting' for example), or concatenate more commands into one
diff --git a/src/core/bitmath_func.hpp b/src/core/bitmath_func.hpp
index 7a4a5da85..16812c134 100644
--- a/src/core/bitmath_func.hpp
+++ b/src/core/bitmath_func.hpp
@@ -34,7 +34,8 @@ static FORCEINLINE uint GB(const T x, const uint8 s, const uint8 n)
return (x >> s) & ((1U << n) - 1);
}
-/** Set \a n bits in \a x starting at bit \a s to \a d
+/**
+ * Set \a n bits in \a x starting at bit \a s to \a d
*
* This function sets \a n bits from \a x which started as bit \a s to the value of
* \a d. The parameters \a x, \a s and \a n works the same as the parameters of
@@ -59,7 +60,8 @@ static FORCEINLINE T SB(T &x, const uint8 s, const uint8 n, const U d)
return x;
}
-/** Add i to n bits of x starting at bit s.
+/**
+ * Add i to n bits of x starting at bit s.
*
* This add the value of i on n bits of x starting at bit s. The parameters x,
* s, i are similar to #GB besides x must be a variable as the result are
diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp
index ad157f30b..904ba8975 100644
--- a/src/core/enum_type.hpp
+++ b/src/core/enum_type.hpp
@@ -40,7 +40,8 @@
FORCEINLINE mask_t operator ~(mask_t m) {return (mask_t)(~(int)m);}
-/** Informative template class exposing basic enumeration properties used by several
+/**
+ * Informative template class exposing basic enumeration properties used by several
* other templates below. Here we have only forward declaration. For each enum type
* we will create specialization derived from MakeEnumPropsT<>.
* i.e.:
@@ -50,7 +51,8 @@
*/
template <typename Tenum_t> struct EnumPropsT;
-/** Helper template class that makes basic properties of given enumeration type visible
+/**
+ * Helper template class that makes basic properties of given enumeration type visible
* from outsize. It is used as base class of several EnumPropsT specializations each
* dedicated to one of commonly used enumeration types.
* @param Tenum_t enumeration type that you want to describe
@@ -72,7 +74,8 @@ struct MakeEnumPropsT {
-/** In some cases we use byte or uint16 to store values that are defined as enum. It is
+/**
+ * In some cases we use byte or uint16 to store values that are defined as enum. It is
* necessary in order to control the sizeof() such values. Some compilers make enum
* the same size as int (4 or 8 bytes instead of 1 or 2). As a consequence the strict
* compiler type - checking causes errors like:
diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp
index e0e31a08c..88fe3524f 100644
--- a/src/core/random_func.hpp
+++ b/src/core/random_func.hpp
@@ -65,7 +65,8 @@ struct SavedRandomSeeds {
Randomizer interactive_random;
};
-/** Saves the current seeds
+/**
+ * Saves the current seeds
* @param storage Storage for saving
*/
static inline void SaveRandomSeeds(SavedRandomSeeds *storage)
@@ -74,7 +75,8 @@ static inline void SaveRandomSeeds(SavedRandomSeeds *storage)
storage->interactive_random = _interactive_random;
}
-/** Restores previously saved seeds
+/**
+ * Restores previously saved seeds
* @param storage Storage where SaveRandomSeeds() stored th seeds
*/
static inline void RestoreRandomSeeds(const SavedRandomSeeds &storage)
diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp
index 28000145e..8689447c1 100644
--- a/src/core/smallmap_type.hpp
+++ b/src/core/smallmap_type.hpp
@@ -25,7 +25,8 @@ struct SmallPair {
FORCEINLINE SmallPair(const T &first, const U &second) : first(first), second(second) { }
};
-/** Implementation of simple mapping class. Both types have to be POD ("Plain Old Data")!
+/**
+ * Implementation of simple mapping class. Both types have to be POD ("Plain Old Data")!
* It has inherited accessors from SmallVector().
* @see SmallVector
*/
@@ -40,7 +41,8 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
/** Data are freed in SmallVector destructor */
FORCEINLINE ~SmallMap() { }
- /** Finds given key in this map
+ /**
+ * Finds given key in this map
* @param key key to find
* @return &Pair(key, data) if found, this->End() if not
*/
@@ -52,7 +54,8 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
return this->End();
}
- /** Removes given pair from this map
+ /**
+ * Removes given pair from this map
* @param pair pair to remove
* @note it has to be pointer to pair in this map. It is overwritten by the last item.
*/
@@ -62,7 +65,8 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
*pair = this->data[--this->items];
}
- /** Removes given key from this map
+ /**
+ * Removes given key from this map
* @param key key to remove
* @return true iff the key was found
* @note last item is moved to its place, so don't increase your iterator if true is returned!
@@ -78,7 +82,8 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
return false;
}
- /** Adds new item to this map.
+ /**
+ * Adds new item to this map.
* @param key key
* @param data data
* @return true iff the key wasn't already present
@@ -92,7 +97,8 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
return true;
}
- /** Returns data belonging to this key
+ /**
+ * Returns data belonging to this key
* @param key key
* @return data belonging to this key
* @note if this key wasn't present, new entry is created
diff --git a/src/debug.cpp b/src/debug.cpp
index a13cb0efa..0ae0f455a 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -161,7 +161,8 @@ void SetDebugString(const char *s)
}
}
-/** Print out the current debug-level
+/**
+ * Print out the current debug-level
* Just return a string with the values of all the debug categorites
* @return string with debug-levels
*/
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index dc75c2941..39e3fbacf 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -159,7 +159,8 @@ static void TrainDepotMoveVehicle(const Vehicle *wagon, VehicleID sel, const Veh
DoCommandP(v->tile, v->index + ((wagon == NULL ? INVALID_VEHICLE : wagon->index) << 16), _ctrl_pressed ? 1 : 0, CMD_MOVE_RAIL_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_MOVE_VEHICLE));
}
-/** Array containing the cell size in pixels of the #DEPOT_WIDGET_MATRIX widget for each vehicle type.
+/**
+ * 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. */
static Dimension _base_block_sizes[4];
@@ -194,7 +195,8 @@ static void InitBlocksizeForShipAircraft(VehicleType type)
_base_block_sizes[type].height = max(GetVehicleHeight(type), max_height);
}
-/** 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.
+/**
+ * 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. */
void InitDepotWindowBlockSizes()
{
@@ -244,7 +246,8 @@ struct DepotWindow : Window {
DeleteWindowById(WC_BUILD_VEHICLE, this->window_number);
}
- /** Draw a vehicle in the depot window in the box with the top left corner at x,y.
+ /**
+ * Draw a vehicle in the depot window in the box with the top left corner at x,y.
* @param v Vehicle to draw.
* @param left Left side of the box to draw in.
* @param right Right side of the box to draw in.
@@ -457,7 +460,8 @@ struct DepotWindow : Window {
return MODE_DRAG_VEHICLE;
}
- /** Handle click in the depot matrix.
+ /**
+ * Handle click in the depot matrix.
* @param x Horizontal position in the matrix widget in pixels.
* @param y Vertical position in the matrix widget in pixels.
*/
@@ -1031,7 +1035,8 @@ static void DepotSellAllConfirmationCallback(Window *win, bool confirmed)
}
}
-/** Opens a depot window
+/**
+ * Opens a depot window
* @param tile The tile where the depot/hangar is located
* @param type The type of vehicles in the depot
*/
@@ -1051,7 +1056,8 @@ void ShowDepotWindow(TileIndex tile, VehicleType type)
new DepotWindow(desc, tile, type);
}
-/** Removes the highlight of a vehicle in a depot window
+/**
+ * Removes the highlight of a vehicle in a depot window
* @param *v Vehicle to remove all highlights from
*/
void DeleteDepotHighlightOfVehicle(const Vehicle *v)
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp
index c0c838456..aa8a8f2f2 100644
--- a/src/disaster_cmd.cpp
+++ b/src/disaster_cmd.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file disaster_cmd.cpp
+/**
+ * @file disaster_cmd.cpp
* All disaster/easter egg vehicles are handled here.
* The general flow of control for the disaster vehicles is as follows:
* <ol>
@@ -128,7 +129,8 @@ static void DisasterVehicleUpdateImage(DisasterVehicle *v)
v->cur_image = img;
}
-/** Initialize a disaster vehicle. These vehicles are of type VEH_DISASTER, are unclickable
+/**
+ * Initialize a disaster vehicle. These vehicles are of type VEH_DISASTER, are unclickable
* and owned by nobody */
static void InitializeDisasterVehicle(DisasterVehicle *v, int x, int y, byte z, Direction direction, byte subtype)
{
@@ -670,7 +672,8 @@ bool DisasterVehicle::Tick()
typedef void DisasterInitProc();
-/** Zeppeliner which crashes on a small airport if one found,
+/**
+ * Zeppeliner which crashes on a small airport if one found,
* otherwise crashes on a random tile */
static void Disaster_Zeppeliner_Init()
{
@@ -698,7 +701,8 @@ static void Disaster_Zeppeliner_Init()
}
-/** Ufo which flies around aimlessly from the middle of the map a bit
+/**
+ * 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 */
static void Disaster_Small_Ufo_Init()
{
@@ -844,7 +848,8 @@ static void Disaster_Big_Submarine_Init()
}
-/** Coal mine catastrophe, destroys a stretch of 30 tiles of
+/**
+ * Coal mine catastrophe, destroys a stretch of 30 tiles of
* land in a certain direction */
static void Disaster_CoalMine_Init()
{
@@ -927,7 +932,8 @@ void StartupDisasters()
ResetDisasterDelay();
}
-/** Marks all disasters targeting this industry in such a way
+/**
+ * Marks all disasters targeting this industry in such a way
* they won't call Industry::Get(v->dest_tile) on invalid industry anymore.
* @param i deleted industry
*/
@@ -943,7 +949,8 @@ void ReleaseDisastersTargetingIndustry(IndustryID i)
}
}
-/** Notify disasters that we are about to delete a vehicle. So make them head elsewhere.
+/**
+ * Notify disasters that we are about to delete a vehicle. So make them head elsewhere.
* @param vehicle deleted vehicle
*/
void ReleaseDisastersTargetingVehicle(VehicleID vehicle)
diff --git a/src/driver.cpp b/src/driver.cpp
index 931913bf0..f0c27c195 100644
--- a/src/driver.cpp
+++ b/src/driver.cpp
@@ -195,7 +195,8 @@ char *DriverFactoryBase::GetDriversInfo(char *p, const char *last)
return p;
}
-/** Frees memory used for this->name
+/**
+ * Frees memory used for this->name
*/
DriverFactoryBase::~DriverFactoryBase()
{
diff --git a/src/driver.h b/src/driver.h
index 0f17ee3c1..0718ffdad 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -79,7 +79,8 @@ public:
virtual ~DriverFactoryBase();
- /** Shuts down all active drivers
+ /**
+ * Shuts down all active drivers
*/
static void ShutdownDrivers()
{
diff --git a/src/economy.cpp b/src/economy.cpp
index a48eccb7d..9c24e042c 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -156,7 +156,8 @@ Money CalculateCompanyValue(const Company *c, bool including_loan)
return max(value, (Money)1);
}
-/** if update is set to true, the economy is updated with this score
+/**
+ * if update is set to true, the economy is updated with this score
* (also the house is updated, should only be true in the on-tick event)
* @param update the economy with calculated score
* @param c company been evaluated
@@ -1485,7 +1486,8 @@ static void DoAcquireCompany(Company *c)
extern int GetAmountOwnedBy(const Company *c, Owner owner);
-/** Acquire shares in an opposing company.
+/**
+ * Acquire shares in an opposing company.
* @param tile unused
* @param flags type of operation
* @param p1 company to buy the shares from
@@ -1532,7 +1534,8 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
return cost;
}
-/** Sell shares in an opposing company.
+/**
+ * Sell shares in an opposing company.
* @param tile unused
* @param flags type of operation
* @param p1 company to sell the shares from
@@ -1565,7 +1568,8 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
return CommandCost(EXPENSES_OTHER, cost);
}
-/** Buy up another company.
+/**
+ * Buy up another company.
* When a competing company is gone bankrupt you get the chance to purchase
* that company.
* @todo currently this only works for AI companies
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 79e9aa2be..409964460 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file elrail.cpp
+/**
+ * @file elrail.cpp
* This file deals with displaying wires and pylons for electric railways.
* <h2>Basics</h2>
*
@@ -182,7 +183,8 @@ static inline SpriteID GetPylonBase(TileIndex tile, bool upper_halftile = false)
return pylons == 0 ? SPR_PYLON_BASE : pylons;
}
-/** Corrects the tileh for certain tile types. Returns an effective tileh for the track on the tile.
+/**
+ * Corrects the tileh for certain tile types. Returns an effective tileh for the track on the tile.
* @param tile The tile to analyse
* @param *tileh the tileh
*/
@@ -258,7 +260,8 @@ void DrawCatenaryOnTunnel(const TileInfo *ti)
);
}
-/** Draws wires and, if required, pylons on a given tile
+/**
+ * Draws wires and, if required, pylons on a given tile
* @param ti The Tileinfo to draw the tile for
*/
static void DrawCatenaryRailway(const TileInfo *ti)
diff --git a/src/endian_check.cpp b/src/endian_check.cpp
index b2162fb23..5c6d2ecd9 100644
--- a/src/endian_check.cpp
+++ b/src/endian_check.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file endian_check.cpp
+/**
+ * @file endian_check.cpp
* This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN
* it does that by putting a 1 and a 0 in an array, and read it out as one
* number. If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN
diff --git a/src/engine.cpp b/src/engine.cpp
index beb755df5..6d5ace215 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -38,7 +38,8 @@ INSTANTIATE_POOL_METHODS(Engine)
EngineOverrideManager _engine_mngr;
-/** Year that engine aging stops. Engines will not reduce in reliability
+/**
+ * Year that engine aging stops. Engines will not reduce in reliability
* and no more engines will be introduced */
static Year _year_engine_aging_stops;
@@ -399,7 +400,8 @@ EngineID EngineOverrideManager::GetID(VehicleType type, uint16 grf_local_id, uin
return INVALID_ENGINE;
}
-/** Sets cached values in Company::num_vehicles and Group::num_vehicles
+/**
+ * Sets cached values in Company::num_vehicles and Group::num_vehicles
*/
void SetCachedEngineCounts()
{
@@ -653,7 +655,8 @@ void EnginesDailyLoop()
}
}
-/** Accept an engine prototype. XXX - it is possible that the top-company
+/**
+ * Accept an engine prototype. XXX - it is possible that the top-company
* changes while you are waiting to accept the offer? Then it becomes invalid
* @param tile unused
* @param flags operation to perfom
@@ -766,7 +769,8 @@ static bool IsUniqueEngineName(const char *name)
return true;
}
-/** Rename an engine.
+/**
+ * Rename an engine.
* @param tile unused
* @param flags operation to perfom
* @param p1 engine ID to rename
@@ -802,7 +806,8 @@ CommandCost CmdRenameEngine(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
}
-/** Check if an engine is buildable.
+/**
+ * Check if an engine is buildable.
* @param engine index of the engine to check.
* @param type the type the engine should be.
* @param company index of the company.
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index 6d5ba22fc..b2bed8cff 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -24,7 +24,8 @@
#include "table/strings.h"
-/** Return the category of an engine.
+/**
+ * Return the category of an engine.
* @param engine Engine to examine.
* @return String describing the category ("road veh", "train". "airplane", or "ship") of the engine.
*/
@@ -292,7 +293,8 @@ void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID eng
}
}
-/** Sort all items using quick sort and given 'CompareItems' function
+/**
+ * Sort all items using quick sort and given 'CompareItems' function
* @param el list to be sorted
* @param compare function for evaluation of the quicksort
*/
@@ -305,7 +307,8 @@ void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare)
QSortT(el->Begin(), size, compare);
}
-/** Sort selected range of items (on indices @ <begin, begin+num_items-1>)
+/**
+ * Sort selected range of items (on indices @ <begin, begin+num_items-1>)
* @param el list to be sorted
* @param compare function for evaluation of the quicksort
* @param begin start of sorting
diff --git a/src/engine_type.h b/src/engine_type.h
index 70318be30..e1b892fb4 100644
--- a/src/engine_type.h
+++ b/src/engine_type.h
@@ -103,7 +103,8 @@ struct RoadVehicleInfo {
uint8 air_drag; ///< Coefficient of air drag
};
-/** Information about a vehicle
+/**
+ * Information about a vehicle
* @see table/engines.h
*/
struct EngineInfo {
diff --git a/src/fios.cpp b/src/fios.cpp
index 441a48d6e..aa2629894 100644
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file fios.cpp
+/**
+ * @file fios.cpp
* This file contains functions for building file lists for the save/load dialogs.
*/
@@ -262,7 +263,8 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length)
}
-/** Fill the list of the files in a directory, according to some arbitrary rule.
+/**
+ * Fill the list of the files in a directory, according to some arbitrary rule.
* @param mode The mode we are in. Some modes don't allow 'parent'.
* @param callback_proc The function that is called where you need to do the filtering.
* @param subdir The directory from where to start (global) searching.
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index d94398027..79d22e84b 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -696,7 +696,8 @@ static const WindowDesc _save_dialog_desc(
_nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
);
-/** These values are used to convert the file/operations mode into a corresponding file type.
+/**
+ * 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 */
static const FileType _file_modetotype[] = {
FT_SAVEGAME, ///< used for SLD_LOAD_GAME
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index 32a4fd072..aaf3261d0 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -42,7 +42,8 @@ FreeTypeSettings _freetype;
static const byte FACE_COLOUR = 1;
static const byte SHADOW_COLOUR = 2;
-/** Get the font loaded into a Freetype face by using a font-name.
+/**
+ * Get the font loaded into a Freetype face by using a font-name.
* If no appropiate font is found, the function returns an error */
#ifdef WIN32
#include <windows.h>
diff --git a/src/gamelog.cpp b/src/gamelog.cpp
index b1102dff8..6e98be1e4 100644
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -39,7 +39,8 @@ uint _gamelog_actions = 0; ///< number of actions
static LoggedAction *_current_action = NULL; ///< current action we are logging, NULL when there is no action active
-/** Stores information about new action, but doesn't allocate it
+/**
+ * Stores information about new action, but doesn't allocate it
* Action is allocated only when there is at least one change
* @param at type of action
*/
@@ -49,7 +50,8 @@ void GamelogStartAction(GamelogActionType at)
_gamelog_action_type = at;
}
-/** Stops logging of any changes
+/**
+ * Stops logging of any changes
*/
void GamelogStopAction()
{
@@ -63,7 +65,8 @@ void GamelogStopAction()
if (print) GamelogPrintDebug(5);
}
-/** Resets and frees all memory allocated - used before loading or starting a new game
+/**
+ * Resets and frees all memory allocated - used before loading or starting a new game
*/
void GamelogReset()
{
@@ -103,7 +106,8 @@ static void AddDebugText(char *buf, const char *s, ...)
}
-/** Prints GRF filename if found
+/**
+ * Prints GRF filename if found
* @param buf The location in the _dbgofs buffer to draw
* @param grfid GRF which filename to print
*/
@@ -116,7 +120,8 @@ static void PrintGrfFilename(char *buf, uint grfid)
AddDebugText(buf, ", filename: %s", gc->filename);
}
-/** Prints GRF ID, checksum and filename if found
+/**
+ * Prints GRF ID, checksum and filename if found
* @param buf The location in the _dbgofs buffer to draw
* @param grfid GRF ID
* @param md5sum array of md5sum to print
@@ -292,7 +297,8 @@ static void GamelogPrintDebugProc(const char *s)
}
-/** Prints gamelog to debug output. Code is executed even when
+/**
+ * Prints gamelog to debug output. Code is executed even when
* there will be no output. It is called very seldom, so it
* doesn't matter that much. At least it gives more uniform code...
* @param level debug level we need to print stuff
@@ -304,7 +310,8 @@ void GamelogPrintDebug(int level)
}
-/** Allocates new LoggedChange and new LoggedAction if needed.
+/**
+ * Allocates new LoggedChange and new LoggedAction if needed.
* If there is no action active, NULL is returned.
* @param ct type of change
* @return new LoggedChange, or NULL if there is no action active
@@ -332,7 +339,8 @@ static LoggedChange *GamelogChange(GamelogChangeType ct)
}
-/** Logs a emergency savegame
+/**
+ * Logs a emergency savegame
*/
void GamelogEmergency()
{
@@ -343,7 +351,8 @@ void GamelogEmergency()
GamelogStopAction();
}
-/** Finds out if current game is a loaded emergency savegame.
+/**
+ * Finds out if current game is a loaded emergency savegame.
*/
bool GamelogTestEmergency()
{
@@ -360,7 +369,8 @@ bool GamelogTestEmergency()
return (emergency != NULL);
}
-/** Logs a change in game revision
+/**
+ * Logs a change in game revision
*/
void GamelogRevision()
{
@@ -376,7 +386,8 @@ void GamelogRevision()
lc->revision.newgrf = _openttd_newgrf_version;
}
-/** Logs a change in game mode (scenario editor or game)
+/**
+ * Logs a change in game mode (scenario editor or game)
*/
void GamelogMode()
{
@@ -389,7 +400,8 @@ void GamelogMode()
lc->mode.landscape = _settings_game.game_creation.landscape;
}
-/** Logs loading from savegame without gamelog
+/**
+ * Logs loading from savegame without gamelog
*/
void GamelogOldver()
{
@@ -402,7 +414,8 @@ void GamelogOldver()
lc->oldver.version = (_savegame_type == SGT_OTTD ? ((uint32)_sl_version << 8 | _sl_minor_version) : _ttdp_version);
}
-/** Logs change in game settings. Only non-networksafe settings are logged
+/**
+ * Logs change in game settings. Only non-networksafe settings are logged
* @param name setting name
* @param oldval old setting value
* @param newval new setting value
@@ -420,7 +433,8 @@ void GamelogSetting(const char *name, int32 oldval, int32 newval)
}
-/** Finds out if current revision is different than last revision stored in the savegame.
+/**
+ * Finds out if current revision is different than last revision stored in the savegame.
* Appends GLCT_REVISION when the revision string changed
*/
void GamelogTestRevision()
@@ -442,7 +456,8 @@ void GamelogTestRevision()
}
}
-/** Finds last stored game mode or landscape.
+/**
+ * Finds last stored game mode or landscape.
* Any change is logged
*/
void GamelogTestMode()
@@ -461,7 +476,8 @@ void GamelogTestMode()
}
-/** Logs triggered GRF bug.
+/**
+ * Logs triggered GRF bug.
* @param grfid ID of problematic GRF
* @param bug type of bug, @see enum GRFBugs
* @param data additional data
@@ -478,7 +494,8 @@ static void GamelogGRFBug(uint32 grfid, byte bug, uint64 data)
lc->grfbug.bug = bug;
}
-/** Logs GRF bug - rail vehicle has different length after reversing.
+/**
+ * Logs GRF bug - rail vehicle has different length after reversing.
* Ensures this is logged only once for each GRF and engine type
* This check takes some time, but it is called pretty seldom, so it
* doesn't matter that much (ideally it shouldn't be called at all).
@@ -507,7 +524,8 @@ bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id)
}
-/** Decides if GRF should be logged
+/**
+ * Decides if GRF should be logged
* @param g grf to determine
* @return true iff GRF is not static and is loaded
*/
@@ -516,7 +534,8 @@ static inline bool IsLoggableGrfConfig(const GRFConfig *g)
return !HasBit(g->flags, GCF_STATIC) && g->status != GCS_NOT_FOUND;
}
-/** Logs removal of a GRF
+/**
+ * Logs removal of a GRF
* @param grfid ID of removed GRF
*/
void GamelogGRFRemove(uint32 grfid)
@@ -529,7 +548,8 @@ void GamelogGRFRemove(uint32 grfid)
lc->grfrem.grfid = grfid;
}
-/** Logs adding of a GRF
+/**
+ * Logs adding of a GRF
* @param newg added GRF
*/
void GamelogGRFAdd(const GRFConfig *newg)
@@ -544,7 +564,8 @@ void GamelogGRFAdd(const GRFConfig *newg)
lc->grfadd = newg->ident;
}
-/** Logs loading compatible GRF
+/**
+ * Logs loading compatible GRF
* (the same ID, but different MD5 hash)
* @param newg new (updated) GRF
*/
@@ -558,7 +579,8 @@ void GamelogGRFCompatible(const GRFIdentifier *newg)
lc->grfcompat = *newg;
}
-/** Logs changing GRF order
+/**
+ * Logs changing GRF order
* @param grfid GRF that is moved
* @param offset how far it is moved, positive = moved down
*/
@@ -573,7 +595,8 @@ static void GamelogGRFMove(uint32 grfid, int32 offset)
lc->grfmove.offset = offset;
}
-/** Logs change in GRF parameters.
+/**
+ * Logs change in GRF parameters.
* Details about parameters changed are not stored
* @param grfid ID of GRF to store
*/
@@ -587,7 +610,8 @@ static void GamelogGRFParameters(uint32 grfid)
lc->grfparam.grfid = grfid;
}
-/** Logs adding of list of GRFs.
+/**
+ * Logs adding of list of GRFs.
* Useful when old savegame is loaded or when new game is started
* @param newg head of GRF linked list
*/
@@ -606,7 +630,8 @@ struct GRFList {
const GRFConfig *grf[];
};
-/** Generates GRFList
+/**
+ * Generates GRFList
* @param grfc head of GRF linked list
*/
static GRFList *GenerateGRFList(const GRFConfig *grfc)
@@ -626,7 +651,8 @@ static GRFList *GenerateGRFList(const GRFConfig *grfc)
return list;
}
-/** Compares two NewGRF lists and logs any change
+/**
+ * Compares two NewGRF lists and logs any change
* @param oldc original GRF list
* @param newc new GRF list
*/
diff --git a/src/gfx.cpp b/src/gfx.cpp
index bbb93af8f..3ba67d46e 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -68,7 +68,8 @@ struct DrawStringParams {
DrawStringParams(TextColour colour) : fontsize(FS_NORMAL), cur_colour(colour), prev_colour(colour) {}
- /** Switch to new colour \a c.
+ /**
+ * Switch to new colour \a c.
* @param c New colour to use.
*/
FORCEINLINE void SetColour(TextColour c)
@@ -84,7 +85,8 @@ struct DrawStringParams {
Swap(this->cur_colour, this->prev_colour);
}
- /** Switch to using a new font \a f.
+ /**
+ * Switch to using a new font \a f.
* @param f New font to use.
*/
FORCEINLINE void SetFontSize(FontSize f)
@@ -358,7 +360,8 @@ static UChar *HandleBiDiAndArabicShapes(UChar *buffer)
#endif /* WITH_ICU */
-/** Truncate a given string to a maximum width if neccessary.
+/**
+ * Truncate a given string to a maximum width if neccessary.
* If the string is truncated, add three dots ('...') to show this.
* @param *str string that is checked and possibly truncated
* @param maxw maximum width in pixels of the string
@@ -758,7 +761,8 @@ end_of_inner_loop:
}
-/** Calculates height of string (in pixels). Accepts multiline string with '\0' as separators.
+/**
+ * Calculates height of string (in pixels). Accepts multiline string with '\0' as separators.
* @param src string to check
* @param num number of extra lines (output of FormatStringLinebreaks())
* @param start_fontsize Fontsize to start the text with
@@ -787,7 +791,8 @@ static int GetMultilineStringHeight(const char *src, int num, FontSize start_fon
}
-/** Calculates height of string (in pixels). The string is changed to a multiline string if needed.
+/**
+ * Calculates height of string (in pixels). The string is changed to a multiline string if needed.
* @param str string to check
* @param maxw maximum string width
* @return height of pixels of string when it is drawn
@@ -803,7 +808,8 @@ int GetStringHeight(StringID str, int maxw)
return GetMultilineStringHeight(buffer, GB(tmp, 0, 16), FS_NORMAL);
}
-/** Calculate string bounding box for multi-line strings.
+/**
+ * Calculate string bounding box for multi-line strings.
* @param str String to check.
* @param suggestion Suggested bounding box.
* @return Bounding box for the multi-line string, may be bigger than \a suggestion.
@@ -956,7 +962,8 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str,
return DrawStringMultiLine(left, right, top, bottom, buffer, lastof(buffer), colour, align, underline);
}
-/** Return the string dimension in pixels. The height and width are returned
+/**
+ * Return the string dimension in pixels. The height and width are returned
* in a single Dimension value. TINYFONT, BIGFONT modifiers are only
* supported as the first character of the string. The returned dimensions
* are therefore a rough estimation correct for all the current strings
@@ -1027,7 +1034,8 @@ void DrawCharCentered(WChar c, int x, int y, TextColour colour)
GfxMainBlitter(GetGlyph(FS_NORMAL, c), x - GetCharacterWidth(FS_NORMAL, c) / 2, y, BM_COLOUR_REMAP);
}
-/** Draw a string at the given coordinates with the given colour.
+/**
+ * Draw a string at the given coordinates with the given colour.
* While drawing the string, parse it in case some formatting is specified,
* like new colour, new size or even positionning.
* @param string The string to draw. This is already bidi reordered.
@@ -1706,7 +1714,8 @@ void MarkWholeScreenDirty()
SetDirtyBlocks(0, 0, _screen.width, _screen.height);
}
-/** Set up a clipping area for only drawing into a certain area. To do this,
+/**
+ * Set up a clipping area for only drawing into a certain area. To do this,
* Fill a DrawPixelInfo object with the supplied relative rectangle, backup
* the original (calling) _cur_dpi and assign the just returned DrawPixelInfo
* _cur_dpi. When you are done, give restore _cur_dpi's original value
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index 48305a030..3dfdd6c2a 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -261,7 +261,8 @@ protected:
return current_interval;
}
- /** Get width for Y labels.
+ /**
+ * Get width for Y labels.
* @param current_interval Interval that contains all of the graph data.
* @param num_hori_lines Number of horizontal lines to be drawn.
*/
@@ -1519,7 +1520,8 @@ struct PerformanceRatingDetailWindow : Window {
CompanyID PerformanceRatingDetailWindow::company = INVALID_COMPANY;
-/** Make a vertical list of panels for outputting score details.
+/**
+ * Make a vertical list of panels for outputting score details.
* @param biggest_index Storage for collecting the biggest index used in the returned tree.
* @return Panel with performance details.
* @post \c *biggest_index contains the largest used index in the tree.
diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp
index 004648b56..0fd4c7d82 100644
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -217,7 +217,8 @@ static const WindowDesc _endgame_desc(
_nested_highscore_widgets, lengthof(_nested_highscore_widgets)
);
-/** Show the highscore table for a given difficulty. When called from
+/**
+ * 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 */
void ShowHighscoreTable(int difficulty, int8 ranking)
@@ -226,7 +227,8 @@ void ShowHighscoreTable(int difficulty, int8 ranking)
new HighScoreWindow(&_highscore_desc, difficulty, ranking);
}
-/** Show the endgame victory screen in 2050. Update the new highscore
+/**
+ * Show the endgame victory screen in 2050. Update the new highscore
* if it was high enough */
void ShowEndGameChart()
{
diff --git a/src/house.h b/src/house.h
index 266e5e7fd..b087ead57 100644
--- a/src/house.h
+++ b/src/house.h
@@ -18,7 +18,8 @@
#include "date_type.h"
#include "house_type.h"
-/** Simple value that indicates the house has reached the final stage of
+/**
+ * Simple value that indicates the house has reached the final stage of
* construction. */
static const byte TOWN_HOUSE_COMPLETED = 3;
@@ -27,7 +28,8 @@ static const HouseID NEW_HOUSE_OFFSET = 110;
static const HouseID HOUSE_MAX = 512;
static const HouseID INVALID_HOUSE_ID = 0xFFFF;
-/** There can only be as many classes as there are new houses, plus one for
+/**
+ * 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. */
static const uint HOUSE_CLASS_MAX = HOUSE_MAX - NEW_HOUSE_OFFSET + 1;
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 7b1cbce8a..0992cf05c 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -62,7 +62,8 @@ uint16 Industry::counts[NUM_INDUSTRYTYPES];
IndustrySpec _industry_specs[NUM_INDUSTRYTYPES];
IndustryTileSpec _industry_tile_specs[NUM_INDUSTRYTILES];
-/** This function initialize the spec arrays of both
+/**
+ * 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 */
@@ -1119,7 +1120,8 @@ void OnTick_Industry()
}
}
-/** Check the conditions of #CHECK_NOTHING (Always succeeds).
+/**
+ * Check the conditions of #CHECK_NOTHING (Always succeeds).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1128,7 +1130,8 @@ static CommandCost CheckNewIndustry_NULL(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_FOREST (Industry should be build above snow-line in arctic climate).
+/**
+ * Check the conditions of #CHECK_FOREST (Industry should be build above snow-line in arctic climate).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1142,7 +1145,8 @@ static CommandCost CheckNewIndustry_Forest(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_REFINERY (Industry should be positioned near edge of the map).
+/**
+ * Check the conditions of #CHECK_REFINERY (Industry should be positioned near edge of the map).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1156,7 +1160,8 @@ static CommandCost CheckNewIndustry_OilRefinery(TileIndex tile)
extern bool _ignore_restrictions;
-/** Check the conditions of #CHECK_OIL_RIG (Industries at sea should be positioned near edge of the map).
+/**
+ * Check the conditions of #CHECK_OIL_RIG (Industries at sea should be positioned near edge of the map).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1169,7 +1174,8 @@ static CommandCost CheckNewIndustry_OilRig(TileIndex tile)
return_cmd_error(STR_ERROR_CAN_ONLY_BE_POSITIONED);
}
-/** Check the conditions of #CHECK_FARM (Industry should be below snow-line in arctic).
+/**
+ * Check the conditions of #CHECK_FARM (Industry should be below snow-line in arctic).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1183,7 +1189,8 @@ static CommandCost CheckNewIndustry_Farm(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_PLANTATION (Industry should NOT be in the desert).
+/**
+ * Check the conditions of #CHECK_PLANTATION (Industry should NOT be in the desert).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1195,7 +1202,8 @@ static CommandCost CheckNewIndustry_Plantation(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_WATER (Industry should be in the desert).
+/**
+ * Check the conditions of #CHECK_WATER (Industry should be in the desert).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1207,7 +1215,8 @@ static CommandCost CheckNewIndustry_Water(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_LUMBERMILL (Industry should be in the rain forest).
+/**
+ * Check the conditions of #CHECK_LUMBERMILL (Industry should be in the rain forest).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1219,7 +1228,8 @@ static CommandCost CheckNewIndustry_Lumbermill(TileIndex tile)
return CommandCost();
}
-/** Check the conditions of #CHECK_BUBBLEGEN (Industry should be in low land).
+/**
+ * Check the conditions of #CHECK_BUBBLEGEN (Industry should be in low land).
* @param tile %Tile to perform the checking.
* @return Succeeded or failed command.
*/
@@ -1231,7 +1241,8 @@ static CommandCost CheckNewIndustry_BubbleGen(TileIndex tile)
return CommandCost();
}
-/** Industrytype check function signature.
+/**
+ * Industrytype check function signature.
* @param tile %Tile to check.
* @return Succeeded or failed command.
*/
@@ -1250,7 +1261,8 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = {
CheckNewIndustry_OilRig, ///< CHECK_OIL_RIG
};
-/** Find a town for the industry, while checking for multiple industries in the same town.
+/**
+ * Find a town for the industry, while checking for multiple industries in the same town.
* @param tile Position of the industry to build.
* @param type Industry type.
* @param [out] town Pointer to return town for the new industry, \c NULL is written if no good town can be found.
@@ -1293,7 +1305,8 @@ bool IsSlopeRefused(Slope current, Slope refused)
return false;
}
-/** Are the tiles of the industry free?
+/**
+ * Are the tiles of the industry free?
* @param tile Position to check.
* @param it Industry tiles table.
* @param itspec_index The index of the itsepc to build/fund
@@ -1374,7 +1387,8 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
}
-/** Is the industry allowed to be built at this place for the town?
+/**
+ * Is the industry allowed to be built at this place for the town?
* @param tile Tile to construct the industry.
* @param type Type of the industry.
* @param t Town authority that the industry belongs to.
@@ -1494,7 +1508,8 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
}
-/** Check that the new industry is far enough from conflicting industries.
+/**
+ * Check that the new industry is far enough from conflicting industries.
* @param tile Tile to construct the industry.
* @param type Type of the new industry.
* @return Succeeded or failed command.
@@ -1517,7 +1532,8 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t
return CommandCost();
}
-/** Production level maximum, minimum and default values.
+/**
+ * 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. */
enum ProductionLevels {
@@ -1661,7 +1677,8 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
Station::RecomputeIndustriesNearForAll();
}
-/** Helper function for Build/Fund an industry
+/**
+ * Helper function for Build/Fund an industry
* @param tile tile where industry is built
* @param type of industry to build
* @param flags of operations to conduct
@@ -1720,7 +1737,8 @@ static CommandCost CreateNewIndustryHelper(TileIndex tile, IndustryType type, Do
return CommandCost();
}
-/** Build/Fund an industry
+/**
+ * Build/Fund an industry
* @param tile tile where industry is built
* @param flags of operations to conduct
* @param p1 various bitstuffed elements
@@ -2167,7 +2185,8 @@ static void ReportNewsProductionChangeIndustry(Industry *ind, CargoID type, int
static const uint PERCENT_TRANSPORTED_60 = 153;
static const uint PERCENT_TRANSPORTED_80 = 204;
-/** Change industry production or do closure
+/**
+ * Change industry production or do closure
* @param i Industry for which changes are performed
* @param monthly true if it's the monthly call, false if it's the random call
*/
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 2e384ed84..61ad01213 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -121,7 +121,8 @@ static int CDECL IndustryTypeNameSorter(const IndustryType *a, const IndustryTyp
return (r != 0) ? r : (*a - *b);
}
-/** Initialize the list of sorted industry types.
+/**
+ * Initialize the list of sorted industry types.
*/
void SortIndustryTypes()
{
@@ -134,7 +135,8 @@ void SortIndustryTypes()
QSortT(_sorted_industry_types, NUM_INDUSTRYTYPES, &IndustryTypeNameSorter);
}
-/** Command callback. In case of failure to build an industry, show an error message.
+/**
+ * Command callback. In case of failure to build an industry, show an error message.
* @param result Result of the command.
* @param tile Tile where the industry is placed.
* @param p1 Additional data of the #CMD_BUILD_INDUSTRY command.
@@ -665,7 +667,8 @@ public:
}
}
- /** Draw the text in the #IVW_INFO panel.
+ /**
+ * Draw the text in the #IVW_INFO panel.
* @param left Left edge of the panel.
* @param right Right edge of the panel.
* @param top Top edge of the panel.
diff --git a/src/industrytype.h b/src/industrytype.h
index b61fc7c2a..e1d8b3596 100644
--- a/src/industrytype.h
+++ b/src/industrytype.h
@@ -34,7 +34,8 @@ enum IndustryLifeType {
INDUSTRYLIFE_PROCESSING = 1 << 2, ///< Like factories
};
-/** Available procedures to check whether an industry may build at a given location.
+/**
+ * Available procedures to check whether an industry may build at a given location.
* @see CheckNewIndustryProc, _check_new_industry_procs[]
*/
enum CheckProc {
diff --git a/src/landscape.cpp b/src/landscape.cpp
index bf200f0b3..f8aacf3f0 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -45,7 +45,8 @@ extern const TileTypeProcs
_tile_type_tunnelbridge_procs,
_tile_type_unmovable_procs;
-/** Tile callback functions for each type of tile.
+/**
+ * Tile callback functions for each type of tile.
* @ingroup TileCallbackGroup
* @see TileType */
const TileTypeProcs * const _tile_type_procs[16] = {
@@ -485,7 +486,8 @@ void DoClearSquare(TileIndex tile)
MarkTileDirtyByTile(tile);
}
-/** Returns information about trackdirs and signal states.
+/**
+ * Returns information about trackdirs and signal states.
* If there is any trackbit at 'side', return all trackdirbits.
* For TRANSPORT_ROAD, return no trackbits if there is no roadbit (of given subtype) at given side.
* @param tile tile to get info about
@@ -588,7 +590,8 @@ void ClearSnowLine()
_snow_line = NULL;
}
-/** Clear a piece of landscape
+/**
+ * Clear a piece of landscape
* @param tile tile to clear
* @param flags of operation to conduct
* @param p1 unused
@@ -601,7 +604,8 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
return _tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags);
}
-/** Clear a big piece of landscape
+/**
+ * Clear a big piece of landscape
* @param tile end tile of area dragging
* @param flags of operation to conduct
* @param p1 start tile of area dragging
diff --git a/src/landscape.h b/src/landscape.h
index c2c20a4fe..d7346e7b9 100644
--- a/src/landscape.h
+++ b/src/landscape.h
@@ -18,7 +18,8 @@
static const uint SNOW_LINE_MONTHS = 12; ///< Number of months in the snow line table.
static const uint SNOW_LINE_DAYS = 32; ///< Number of days in each month in the snow line table.
-/** Structure describing the height of the snow line each day of the year
+/**
+ * Structure describing the height of the snow line each day of the year
* @ingroup SnowLineGroup */
struct SnowLine {
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]; ///< Height of the snow line each day of the year
diff --git a/src/misc/array.hpp b/src/misc/array.hpp
index 78dd0098f..2832d9299 100644
--- a/src/misc/array.hpp
+++ b/src/misc/array.hpp
@@ -15,7 +15,8 @@
#include "fixedsizearray.hpp"
#include "str.hpp"
-/** Flexible array with size limit. Implemented as fixed size
+/**
+ * Flexible array with size limit. Implemented as fixed size
* array of fixed size arrays */
template <class T, uint B = 1024, uint N = B>
class SmallArray {
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp
index d77a1b9d8..95e0ae1af 100644
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -16,7 +16,8 @@
#include "../core/mem_func.hpp"
#include <new>
-/** Base class for simple binary blobs.
+/**
+ * Base class for simple binary blobs.
* Item is byte.
* The word 'simple' means:
* - no configurable allocator type (always made from heap)
@@ -102,7 +103,8 @@ protected:
return (BlobHeader*)MallocT<byte>(num_bytes);
}
- /** Return header pointer to the static BlobHeader with
+ /**
+ * Return header pointer to the static BlobHeader with
* both items and capacity containing zero */
static FORCEINLINE BlobHeader *Zero()
{
@@ -231,7 +233,8 @@ public:
}
}
- /** Reallocate if there is no free space for num_bytes bytes.
+ /**
+ * Reallocate if there is no free space for num_bytes bytes.
* @return pointer to the new data to be added */
FORCEINLINE byte *Prepare(size_t num_bytes)
{
@@ -240,7 +243,8 @@ public:
return data + Length();
}
- /** Increase Length() by num_bytes.
+ /**
+ * Increase Length() by num_bytes.
* @return pointer to the new data added */
FORCEINLINE byte *Append(size_t num_bytes)
{
@@ -286,7 +290,8 @@ public:
}
};
-/** Blob - simple dynamic T array. T (template argument) is a placeholder for any type.
+/**
+ * Blob - simple dynamic T array. T (template argument) is a placeholder for any type.
* T can be any integral type, pointer, or structure. Using Blob instead of just plain C array
* simplifies the resource management in several ways:
* 1. When adding new item(s) it automatically grows capacity if needed.
@@ -380,7 +385,8 @@ public:
return (T*)base::Append(num_items * type_size);
}
- /** Ensures that given number of items can be added to the end of Blob. Returns pointer to the
+ /**
+ * Ensures that given number of items can be added to the end of Blob. Returns pointer to the
* first free (unused) item */
FORCEINLINE T *MakeFreeSpace(size_t num_items)
{
diff --git a/src/misc/countedptr.hpp b/src/misc/countedptr.hpp
index 643c1b83b..78115c091 100644
--- a/src/misc/countedptr.hpp
+++ b/src/misc/countedptr.hpp
@@ -12,7 +12,8 @@
#ifndef COUNTEDPTR_HPP
#define COUNTEDPTR_HPP
-/** CCountedPtr - simple reference counting smart pointer.
+/**
+ * CCountedPtr - simple reference counting smart pointer.
*
* One of the standard ways how to maintain object's lifetime.
*
@@ -136,7 +137,8 @@ template <class T> struct AdaptT {
};
-/** Simple counted object. Use it as base of your struct/class if you want to use
+/**
+ * Simple counted object. Use it as base of your struct/class if you want to use
* basic reference counting. Your struct/class will destroy and free itself when
* last reference to it is released (using Relese() method). The initial reference
* count (when it is created) is zero (don't forget AddRef() at least one time if
diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp
index 78b2ec493..f87070fa0 100644
--- a/src/misc/dbg_helpers.cpp
+++ b/src/misc/dbg_helpers.cpp
@@ -72,7 +72,8 @@ CStrA TileStr(TileIndex tile)
return out.Transfer();
}
-/** Keep track of the last assigned type_id. Used for anti-recursion.
+/**
+ * Keep track of the last assigned type_id. Used for anti-recursion.
*static*/ size_t& DumpTarget::LastTypeId()
{
static size_t last_type_id = 0;
diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp
index 5c008089c..404db8184 100644
--- a/src/misc/fixedsizearray.hpp
+++ b/src/misc/fixedsizearray.hpp
@@ -14,7 +14,8 @@
#include "../core/alloc_func.hpp"
-/** fixed size array
+/**
+ * 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. */
@@ -32,7 +33,8 @@ protected:
static const uint Tsize = sizeof(T); // size of item
static const uint HeaderSize = sizeof(ArrayHeader); // size of header
- /** the only member of fixed size array is pointer to the block
+ /**
+ * 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). */
T *data;
diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp
index 4c18737d3..8dd1310a7 100644
--- a/src/misc/hashtable.hpp
+++ b/src/misc/hashtable.hpp
@@ -106,7 +106,8 @@ struct CHashTableSlotT
}
};
-/** class CHashTableT<Titem, Thash_bits> - simple hash table
+/**
+ * class CHashTableT<Titem, Thash_bits> - simple hash table
* of pointers allocated elsewhere.
*
* Supports: Add/Find/Remove of Titems.
@@ -136,7 +137,8 @@ public:
static const int Tcapacity = 1 << Thash_bits; // and num of slots 2^bits
protected:
- /** each slot contains pointer to the first item in the list,
+ /**
+ * each slot contains pointer to the first item in the list,
* Titem contains pointer to the next item - GetHashNext(), SetHashNext() */
typedef CHashTableSlotT<Titem_> Slot;
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index f4cc0534b..6bf93ccad 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -25,7 +25,8 @@
#include "table/strings.h"
-/** Increase the loan of your company.
+/**
+ * Increase the loan of your company.
* @param tile unused
* @param flags operation to perform
* @param p1 amount to increase the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
@@ -71,7 +72,8 @@ CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
return CommandCost(EXPENSES_OTHER);
}
-/** Decrease the loan of your company.
+/**
+ * Decrease the loan of your company.
* @param tile unused
* @param flags operation to perform
* @param p1 amount to decrease the loan with, multitude of LOAN_INTERVAL. Only used when p2 == 2.
@@ -187,7 +189,8 @@ CommandCost CmdPause(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2,
return CommandCost();
}
-/** Change the financial flow of your company.
+/**
+ * Change the financial flow of your company.
* This is normally only enabled in offline mode, but if there is a debug
* build, you can cheat (to test).
* @param tile unused
@@ -205,7 +208,8 @@ CommandCost CmdMoneyCheat(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return CommandCost(EXPENSES_OTHER, -(int32)p1);
}
-/** Transfer funds (money) from one company to another.
+/**
+ * Transfer funds (money) from one company to another.
* To prevent abuse in multiplayer games you can only send money to other
* companies if you have paid off your loan (either explicitely, or implicitely
* given the fact that you have more money than loan).
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index a705cd403..91034ac34 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -899,7 +899,8 @@ struct TooltipsWindow : public Window
}
};
-/** Shows a tooltip
+/**
+ * Shows a tooltip
* @param str String to be displayed
* @param paramcount number of params to deal with
* @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
@@ -1410,7 +1411,8 @@ static const WindowDesc _query_string_desc(
_nested_query_string_widgets, lengthof(_nested_query_string_widgets)
);
-/** Show a query popup window with a textbox in it.
+/**
+ * Show a query popup window with a textbox in it.
* @param str StringID for the text shown in the textbox
* @param caption StringID of text shown in caption of querywindow
* @param maxsize maximum size in bytes (including terminating '\0')
@@ -1564,7 +1566,8 @@ static const WindowDesc _query_desc(
_nested_query_widgets, lengthof(_nested_query_widgets)
);
-/** Show a modal confirmation window with standard 'yes' and 'no' buttons
+/**
+ * Show a modal confirmation window with standard 'yes' and 'no' buttons
* The window is aligned to the centre of its parent.
* @param caption string shown as window caption
* @param message string that will be shown for the window
diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp
index ba73e2f64..2093312bd 100644
--- a/src/music/allegro_m.cpp
+++ b/src/music/allegro_m.cpp
@@ -19,7 +19,8 @@
static FMusicDriver_Allegro iFMusicDriver_Allegro;
static MIDI *_midi = NULL;
-/** There are multiple modules that might be using Allegro and
+/**
+ * There are multiple modules that might be using Allegro and
* Allegro can only be initiated once. */
extern int _allegro_instance_count;
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 7079b927b..78e36186d 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -34,7 +34,8 @@ typedef uint8 PacketType; ///< Identifier for the packet
struct Packet {
/** The next packet. Used for queueing packets before sending. */
Packet *next;
- /** The size of the whole packet for received packets. For packets
+ /**
+ * 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. */
PacketSize size;
diff --git a/src/network/network.cpp b/src/network/network.cpp
index a1cb58a9e..af3fbf855 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -471,7 +471,8 @@ static void CheckPauseOnJoin()
CheckPauseHelper(NetworkHasJoiningClient(), PM_PAUSED_JOIN);
}
-/** Converts a string to ip/port/company
+/**
+ * Converts a string to ip/port/company
* Format: IP:port#company
*
* connection_string will be re-terminated to seperate out the hostname, and company and port will
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 97dc0f953..5bb4529f6 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -27,7 +27,8 @@ NetworkGameList *_network_game_list = NULL;
static ThreadMutex *_network_game_list_mutex = ThreadMutex::New();
static NetworkGameList *_network_game_delayed_insertion_list = NULL;
-/** Add a new item to the linked gamelist, but do it delayed in the next tick
+/**
+ * Add a new item to the linked gamelist, but do it delayed in the next tick
* or so to prevent race conditions.
* @param item the item to add. Will be freed once added.
*/
@@ -66,7 +67,8 @@ static void NetworkGameListHandleDelayedInsert()
_network_game_list_mutex->EndCritical();
}
-/** Add a new item to the linked gamelist. If the IP and Port match
+/**
+ * Add a new item to the linked gamelist. If the IP and Port match
* 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
@@ -106,7 +108,8 @@ NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
return item;
}
-/** Remove an item from the gamelist linked list
+/**
+ * Remove an item from the gamelist linked list
* @param remove pointer to the item to be removed */
void NetworkGameListRemoveItem(NetworkGameList *remove)
{
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index b26947a2c..69dd3b0df 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -64,7 +64,8 @@ void SortNetworkLanguages()
QSortT(_language_dropdown, NETLANG_COUNT - 1, &StringIDSorter);
}
-/** Update the network new window because a new server is
+/**
+ * Update the network new window because a new server is
* found on the network.
* @param unselect unselect the currently selected item */
void UpdateNetworkGameWindow(bool unselect)
@@ -279,7 +280,8 @@ protected:
return strcasecmp((*a)->info.server_name, (*b)->info.server_name);
}
- /** Sort servers by the amount of clients online on a
+ /**
+ * 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. */
static int CDECL NGameClientSorter(NetworkGameList * const *a, NetworkGameList * const *b)
@@ -317,7 +319,8 @@ protected:
return (r != 0) ? r : NGameDateSorter(a, b);
}
- /** Sort servers by joinability. If both servers are the
+ /**
+ * Sort servers by joinability. If both servers are the
* same, prefer the non-passworded server first. */
static int CDECL NGameAllowedSorter(NetworkGameList * const *a, NetworkGameList * const *b)
{
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 13a0a42b2..acbcda234 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -884,7 +884,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_MAP_OK)
return SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_NOT_EXPECTED);
}
-/** The client has done a command and wants us to handle it
+/**
+ * The client has done a command and wants us to handle it
* @param *cs the connected client that has sent the command
* @param *p the packet in which the command was sent
*/
@@ -921,7 +922,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)
return SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_KICKED);
}
- /** Only CMD_COMPANY_CTRL is always allowed, for the rest, playas needs
+ /**
+ * Only CMD_COMPANY_CTRL is always allowed, for the rest, playas needs
* to match the company in the packet. If it doesn't, the client has done
* something pretty naughty (or a bug), and will be kicked
*/
@@ -931,7 +933,8 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)
return SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_COMPANY_MISMATCH);
}
- /** @todo CMD_COMPANY_CTRL with p1 = 0 announces a new company to the server. To give the
+ /**
+ * @todo CMD_COMPANY_CTRL with p1 = 0 announces a new company to the server. To give the
* company the correct ID, the server injects p2 and executes the command. Any other p1
* is prohibited. Pretty ugly and should be redone together with its function.
* @see CmdCompanyCtrl()
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 673b42336..738d7b3e5 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -222,7 +222,8 @@ static std::map<GRFLocation, SpriteID> _grm_sprites;
typedef std::map<GRFLocation, byte*> GRFLineToSpriteOverride;
static GRFLineToSpriteOverride _grf_line_to_action6_sprite_override;
-/** DEBUG() function dedicated to newGRF debugging messages
+/**
+ * DEBUG() function dedicated to newGRF debugging messages
* Function is essentially the same as DEBUG(grf, severity, ...) with the
* addition of file:line information when parsing grf files.
* NOTE: for the above reason(s) grfmsg() should ONLY be used for
@@ -281,7 +282,8 @@ static void ClearTemporaryNewGRFData(GRFFile *gf)
typedef std::map<StringID *, uint32> StringIDToGRFIDMapping;
static StringIDToGRFIDMapping _string_to_grf_mapping;
-/** Used when setting an object's property to map to the GRF's strings
+/**
+ * Used when setting an object's property to map to the GRF's strings
* while taking in consideration the "drift" between TTDPatch string system and OpenTTD's one
* @param grfid Id of the grf file
* @param str StringID that we want to have the equivalent in OoenTTD
@@ -423,7 +425,8 @@ EngineID GetNewEngineID(const GRFFile *file, VehicleType type, uint16 internal_i
return _engine_mngr.GetID(type, internal_id, scope_grfid);
}
-/** Map the colour modifiers of TTDPatch to those that Open is using.
+/**
+ * Map the colour modifiers of TTDPatch to those that Open is using.
* @param grf_sprite pointer to the structure been modified
*/
static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite)
@@ -6792,7 +6795,8 @@ static void InitNewGRFFile(const GRFConfig *config, int sprite_offset)
}
-/** List of what cargo labels are refittable for the given the vehicle-type.
+/**
+ * List of what cargo labels are refittable for the given the vehicle-type.
* Only currently active labels are applied. */
static const CargoLabel _default_refitmasks_rail[] = {
'PASS', 'COAL', 'MAIL', 'LVST', 'GOOD', 'GRAI', 'WHEA', 'MAIZ', 'WOOD',
@@ -6925,7 +6929,8 @@ static void FinaliseCargoArray()
}
}
-/** Add all new houses to the house array. House properties can be set at any
+/**
+ * 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. */
@@ -6990,7 +6995,8 @@ static void FinaliseHouseArray()
}
}
-/** Add all new industries to the industry array. Industry properties can be set at any
+/**
+ * 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. */
static void FinaliseIndustriesArray()
diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h
index 4c4a56953..1fd004ea7 100644
--- a/src/newgrf_callbacks.h
+++ b/src/newgrf_callbacks.h
@@ -43,7 +43,8 @@ enum CallbackID {
/** Choose a sprite layout to draw, instead of the standard 0-7 range. */
CBID_STATION_SPRITE_LAYOUT = 0x14,
- /** Refit capacity, the passed vehicle needs to have its ->cargo_type set to
+ /**
+ * Refit capacity, the passed vehicle needs to have its ->cargo_type set to
* the cargo we are refitting to, returns the new cargo capacity. */
CBID_VEHICLE_REFIT_CAPACITY = 0x15, // 15 bit callback
@@ -86,7 +87,8 @@ enum CallbackID {
/** Called to determine if the given industry type is available */
CBID_INDUSTRY_AVAILABLE = 0x22, // 15 bit callback
- /** This callback is called from vehicle purchase lists. It returns a value to be
+ /**
+ * This callback is called from vehicle purchase lists. It returns a value to be
* used as a custom string ID in the 0xD000 range. */
CBID_VEHICLE_ADDITIONAL_TEXT = 0x23,
@@ -117,7 +119,8 @@ enum CallbackID {
/** Called to determine which cargoes an industry should accept. */
CBID_INDTILE_ACCEPT_CARGO = 0x2C, // 15 bit callback
- /** Called to determine if a specific colour map should be used for a vehicle
+ /**
+ * Called to determine if a specific colour map should be used for a vehicle
* instead of the default livery. */
CBID_VEHICLE_COLOUR_MAPPING = 0x2D, // 15 bit callback
@@ -130,7 +133,8 @@ enum CallbackID {
/** Called to determine the type (if any) of foundation to draw for industry tile. */
CBID_INDTILE_DRAW_FOUNDATIONS = 0x30, // 15 bit callback
- /** Called when the company (or AI) tries to start or stop a vehicle. Mainly
+ /**
+ * Called when the company (or AI) tries to start or stop a vehicle. Mainly
* 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
@@ -146,7 +150,8 @@ enum CallbackID {
/** Called monthly on production changes, so it can be adjusted more frequently */
CBID_INDUSTRY_MONTHLYPROD_CHANGE = 0x35, // 15 bit callback
- /** Called to modify various vehicle properties. Callback parameter 1
+ /**
+ * Called to modify various vehicle properties. Callback parameter 1
* specifies the property index, as used in Action 0, to change. */
CBID_VEHICLE_MODIFY_PROPERTY = 0x36, // 8/15 bit depends on queried property
diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h
index 6a9c0c19c..17367cffd 100644
--- a/src/newgrf_canal.h
+++ b/src/newgrf_canal.h
@@ -16,7 +16,8 @@
#include "tile_type.h"
#include "newgrf_generic.h"
-/** List of different canal 'features'.
+/**
+ * List of different canal 'features'.
* Each feature gets an entry in the canal spritegroup table */
enum CanalFeature {
CF_WATERSLOPE,
@@ -42,7 +43,8 @@ struct WaterFeature {
extern WaterFeature _water_feature[CF_END];
-/** Lookup the base sprite to use for a canal.
+/**
+ * Lookup the base sprite to use for a canal.
* @param feature Which canal feature we want.
* @param tile Tile index of canal, if appropriate.
* @return Base sprite returned by GRF, or 0 if none.
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 5a1de575f..4c75891e3 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file newgrf_commons.cpp Implementation of the class OverrideManagerBase
+/**
+ * @file newgrf_commons.cpp Implementation of the class OverrideManagerBase
* and its descendance, present and futur
*/
@@ -23,7 +24,8 @@
#include "tunnelbridge_map.h"
#include "core/mem_func.hpp"
-/** Constructor of generic class
+/**
+ * Constructor of generic class
* @param offset end of original data for this entity. i.e: houses = 110
* @param maximum of entities this manager can deal with. i.e: houses = 512
* @param invalid is the ID used to identify an invalid entity id
@@ -40,7 +42,8 @@ OverrideManagerBase::OverrideManagerBase(uint16 offset, uint16 maximum, uint16 i
grfid_overrides = CallocT<uint32>(max_offset);
}
-/** Destructor of the generic class.
+/**
+ * Destructor of the generic class.
* Frees allocated memory of constructor
*/
OverrideManagerBase::~OverrideManagerBase()
@@ -50,7 +53,8 @@ OverrideManagerBase::~OverrideManagerBase()
free(grfid_overrides);
}
-/** Since the entity IDs defined by the GRF file does not necessarily correlate
+/**
+ * Since the entity IDs defined by the GRF file does not necessarily correlate
* to those used by the game, the IDs used for overriding old entities must be
* translated when the entity spec is set.
* @param local_id ID in grf file
@@ -81,7 +85,8 @@ void OverrideManagerBase::ResetOverride()
}
}
-/** Return the ID (if ever available) of a previously inserted entity.
+/**
+ * Return the ID (if ever available) of a previously inserted entity.
* @param grf_local_id ID of this enity withing the grfID
* @param grfid ID of the grf file
* @return the ID of the candidate, of the Invalid flag item ID
@@ -100,7 +105,8 @@ uint16 OverrideManagerBase::GetID(uint8 grf_local_id, uint32 grfid)
return invalid_ID;
}
-/** Reserves a place in the mapping array for an entity to be installed
+/**
+ * Reserves a place in the mapping array for an entity to be installed
* @param grf_local_id is an arbitrary id given by the grf's author. Also known as setid
* @param grfid is the id of the grf file itself
* @param substitute_id is the original entity from which data is copied for the new one
@@ -134,7 +140,8 @@ uint16 OverrideManagerBase::AddEntityID(byte grf_local_id, uint32 grfid, byte su
return invalid_ID;
}
-/** Gives the substitute of the entity, as specified by the grf file
+/**
+ * Gives the substitute of the entity, as specified by the grf file
* @param entity_id of the entity being queried
* @return mapped id
*/
@@ -143,7 +150,8 @@ uint16 OverrideManagerBase::GetSubstituteID(uint16 entity_id)
return mapping_ID[entity_id].substitute_id;
}
-/** Install the specs into the HouseSpecs array
+/**
+ * Install the specs into the HouseSpecs array
* It will find itself the proper slot onwhich it will go
* @param hs HouseSpec read from the grf file, ready for inclusion
*/
@@ -170,7 +178,8 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs)
}
}
-/** Return the ID (if ever available) of a previously inserted entity.
+/**
+ * Return the ID (if ever available) of a previously inserted entity.
* @param grf_local_id ID of this enity withing the grfID
* @param grfid ID of the grf file
* @return the ID of the candidate, of the Invalid flag item ID
@@ -188,7 +197,8 @@ uint16 IndustryOverrideManager::GetID(uint8 grf_local_id, uint32 grfid)
return invalid_ID;
}
-/** Method to find an entity ID and to mark it as reserved for the Industry to be included.
+/**
+ * Method to find an entity ID and to mark it as reserved for the Industry to be included.
* @param grf_local_id ID used by the grf file for pre-installation work (equivalent of TTDPatch's setid
* @param grfid ID of the current grf file
* @param substitute_id industry from which data has been copied
@@ -223,7 +233,8 @@ uint16 IndustryOverrideManager::AddEntityID(byte grf_local_id, uint32 grfid, byt
return invalid_ID;
}
-/** Method to install the new indistry data in its proper slot
+/**
+ * Method to install the new indistry data in its proper slot
* The slot assigment is internal of this method, since it requires
* checking what is available
* @param inds Industryspec that comes from the grf decoding process
@@ -277,7 +288,8 @@ void IndustryTileOverrideManager::SetEntitySpec(const IndustryTileSpec *its)
}
}
-/** Function used by houses (and soon industries) to get information
+/**
+ * Function used by houses (and soon industries) to get information
* on type of "terrain" the tile it is queries sits on.
* @param tile TileIndex of the tile been queried
* @param upper_halftile If true, query upper halftile in case of rail tiles.
diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h
index a30390603..7b5c6c297 100644
--- a/src/newgrf_commons.h
+++ b/src/newgrf_commons.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file newgrf_commons.h This file simplyfies and embeds a common mechanism of
+/**
+ * @file newgrf_commons.h This file simplyfies and embeds a common mechanism of
* loading/saving and mapping of grf entities.
*/
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index a925f86b0..ef50327a9 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -240,7 +240,8 @@ void UpdateNewGRFConfigPalette()
for (GRFConfig *c = _grfconfig_static; c != NULL; c = c->next) c->SetSuitablePalette();
}
-/** Calculate the MD5 sum for a GRF, and store it in the config.
+/**
+ * Calculate the MD5 sum for a GRF, and store it in the config.
* @param config GRF to compute.
* @return MD5 sum was successfully computed
*/
@@ -268,7 +269,8 @@ static bool CalcGRFMD5Sum(GRFConfig *config)
}
-/** Find the GRFID of a given grf, and calculate its md5sum.
+/**
+ * Find the GRFID of a given grf, and calculate its md5sum.
* @param config grf to fill.
* @param is_static grf is static.
* @return Operation was successfully completed.
@@ -300,7 +302,8 @@ bool FillGRFDetails(GRFConfig *config, bool is_static)
}
-/** Clear a GRF Config list, freeing all nodes.
+/**
+ * Clear a GRF Config list, freeing all nodes.
* @param config Start of the list.
* @post \a config is set to \c NULL.
*/
@@ -315,7 +318,8 @@ void ClearGRFConfigList(GRFConfig **config)
}
-/** Copy a GRF Config list
+/**
+ * Copy a GRF Config list
* @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
@@ -381,7 +385,8 @@ void AppendStaticGRFConfigs(GRFConfig **dst)
RemoveDuplicatesFromGRFConfigList(*dst);
}
-/** Appends an element to a list of GRFs
+/**
+ * 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 */
void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el)
@@ -402,7 +407,8 @@ void ResetGRFConfig(bool defaults)
}
-/** Check if all GRFs in the GRF config from a savegame can be loaded.
+/**
+ * Check if all GRFs in the GRF config from a savegame can be loaded.
* @param grfconfig GrfConfig to check
* @return will return any of the following 3 values:<br>
* <ul>
@@ -573,7 +579,8 @@ void ScanNewGRFFiles()
}
-/** Find a NewGRF in the scanned list.
+/**
+ * Find a NewGRF in the scanned list.
* @param grfid GRFID to look for,
* @param md5sum Expected MD5 sum (set to \c NULL if not relevant).
* @return The matching grf, if it exists in #_all_grfs, else \c NULL.
@@ -641,7 +648,8 @@ char *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create)
#endif /* ENABLE_NETWORK */
-/** Retrieve a NewGRF from the current config by its grfid.
+/**
+ * Retrieve a NewGRF from the current config by its grfid.
* @param grfid grf to look for.
* @param mask GRFID mask to allow for partial matching.
* @return The grf config, if it exists, else \c NULL.
diff --git a/src/newgrf_config.h b/src/newgrf_config.h
index 34e21808e..c4f268e02 100644
--- a/src/newgrf_config.h
+++ b/src/newgrf_config.h
@@ -73,7 +73,8 @@ struct GRFIdentifier {
uint32 grfid; ///< GRF ID (defined by Action 0x08)
uint8 md5sum[16]; ///< MD5 checksum of file to distinguish files with the same GRF ID (eg. newer version of GRF)
- /** Does the identification match the provided values?
+ /**
+ * Does the identification match the provided values?
* @param grfid Expected grfid.
* @param md5sum Expected md5sum, may be \c NULL (in which case, do not check it).
* @return the object has the provided grfid and md5sum.
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index d2a2edca0..cae1d4ad2 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -881,7 +881,8 @@ static inline void NewVehicleResolver(ResolverObject *res, EngineID engine_type,
}
-/** Retrieve the SpriteGroup for the specified vehicle.
+/**
+ * Retrieve the SpriteGroup for the specified vehicle.
* If the vehicle is not specified, the purchase list group for the engine is
* chosen. For trains, an additional engine override lookup is performed.
* @param engine Engine type of the vehicle.
diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp
index 36136a981..7c4c6097e 100644
--- a/src/newgrf_generic.cpp
+++ b/src/newgrf_generic.cpp
@@ -134,7 +134,8 @@ static inline void NewGenericResolver(ResolverObject *res, const GRFFile *grffil
}
-/** Follow a generic feature callback list and return the first successful
+/**
+ * Follow a generic feature callback list and return the first successful
* answer
* @param feature GRF Feature of callback
* @param object pre-populated resolver object
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index c81d85179..be6c53f4d 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -554,7 +554,8 @@ struct NewGRFWindow : public QueryStringBaseWindow {
this->DrawEditBox(SNGRFS_FILTER);
}
- /** Pick the palette for the sprite of the grf to display.
+ /**
+ * Pick the palette for the sprite of the grf to display.
* @param c grf to display.
* @return Palette for the sprite.
*/
@@ -923,7 +924,8 @@ struct NewGRFWindow : public QueryStringBaseWindow {
this->InvalidateData();
}
- /** Calback to update internal data.
+ /**
+ * Calback to update internal data.
* - 0: (optionally) build availables, update button status.
* - 1: build availables, Add newly found grfs, update button status.
* - 2: (optionally) build availables, Reset preset, + 3
@@ -1160,7 +1162,8 @@ NewGRFWindow::GUIGRFConfigList::FilterFunction * const NewGRFWindow::filter_func
&TagNameFilter,
};
-/** Custom nested widget container for the NewGRF gui.
+/**
+ * Custom nested widget container for the NewGRF gui.
* Depending on the space in the gui, it uses either
* - two column mode, put the #acs and the #avs underneath each other and the #info next to it, or
* - three column mode, put the #avs, #acs, and #info each in its own column.
@@ -1491,7 +1494,8 @@ static const WindowDesc _newgrf_desc(
_nested_newgrf_widgets, lengthof(_nested_newgrf_widgets)
);
-/** Callback function for the newgrf 'apply changes' confirmation window
+/**
+ * Callback function for the newgrf 'apply changes' confirmation window
* @param w Window which is calling this callback
* @param confirmed boolean value, true when yes was clicked, false otherwise
*/
@@ -1521,7 +1525,8 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
-/** Setup the NewGRF gui
+/**
+ * Setup the NewGRF gui
* @param editable allow the user to make changes to the grfconfig in the window
* @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
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 4d19ab61c..b6ec223a5 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -146,7 +146,8 @@ typedef struct {
TileIndex north_tile; ///< Northern tile of the house.
} SearchNearbyHouseData;
-/** Callback function to search a house by its HouseID
+/**
+ * Callback function to search a house by its HouseID
* @param tile TileIndex to be examined
* @param user_data SearchNearbyHouseData
* @return true or false, if found or not
@@ -169,7 +170,8 @@ static bool SearchNearbyHouseID(TileIndex tile, void *user_data)
return false;
}
-/** Callback function to search a house by its classID
+/**
+ * Callback function to search a house by its classID
* @param tile TileIndex to be examined
* @param user_data SearchNearbyHouseData
* @return true or false, if found or not
@@ -192,7 +194,8 @@ static bool SearchNearbyHouseClass(TileIndex tile, void *user_data)
return false;
}
-/** Callback function to search a house by its grfID
+/**
+ * Callback function to search a house by its grfID
* @param tile TileIndex to be examined
* @param user_data SearchNearbyHouseData
* @return true or false, if found or not
@@ -214,7 +217,8 @@ static bool SearchNearbyHouseGRFID(TileIndex tile, void *user_data)
return false;
}
-/** This function will activate a search around a central tile, looking for some houses
+/**
+ * This function will activate a search around a central tile, looking for some houses
* that fit the requested characteristics
* @param parameter that is given by the callback.
* bits 0..6 radius of the search
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 155bb0bc3..fb40889e1 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -100,7 +100,8 @@ static uint32 GetClosestIndustry(TileIndex tile, IndustryType type, const Indust
return best_dist;
}
-/** Implementation of both var 67 and 68
+/**
+ * Implementation of both var 67 and 68
* since the mechanism is almost the same, it is easier to regroup them on the same
* function.
* @param param_setID parameter given to the callback, which is the set id, or the local id, in our terminology
@@ -154,7 +155,8 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout
return count << 16 | GB(closest_dist, 0, 16);
}
-/** This function implements the industries variables that newGRF defines.
+/**
+ * This function implements the industries variables that newGRF defines.
* @param object the object that we want to query
* @param variable that is queried
* @param parameter unused
@@ -447,7 +449,8 @@ uint32 IndustryLocationGetVariable(const ResolverObject *object, byte variable,
return IndustryGetVariable(object, variable, parameter, available);
}
-/** Check that the industry callback allows creation of the industry.
+/**
+ * Check that the industry callback allows creation of the industry.
* @param tile %Tile to build the industry.
* @param type Type of industry to build.
* @param layout Layout number.
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 2e5b404f8..00fb10295 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -45,7 +45,8 @@ uint32 GetNearbyIndustryTileInformation(byte parameter, TileIndex tile, Industry
return GetNearbyTileInformation(tile) | (is_same_industry ? 1 : 0) << 8;
}
-/** This is the position of the tile relative to the northernmost tile of the industry.
+/**
+ * This is the position of the tile relative to the northernmost tile of the industry.
* Format: 00yxYYXX
* Variable Content
* x the x offset from the northernmost tile
@@ -250,7 +251,8 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
extern bool IsSlopeRefused(Slope current, Slope refused);
-/** Check the slope of a tile of a new industry.
+/**
+ * Check the slope of a tile of a new industry.
* @param ind_base_tile Base tile of the industry.
* @param ind_tile Tile to check.
* @param its Tile specification.
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 199f66541..24c14ef10 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -821,7 +821,8 @@ int AllocateSpecToStation(const StationSpec *statspec, BaseStation *st, bool exe
}
-/** Deallocate a StationSpec from a Station. Called when removing a single station tile.
+/**
+ * Deallocate a StationSpec from a Station. Called when removing a single station tile.
* @param st Station to work with.
* @param specindex Index of the custom station within the Station's spec list.
* @return Indicates whether the StationSpec was deallocated.
@@ -862,7 +863,8 @@ void DeallocateSpecFromStation(BaseStation *st, byte specindex)
StationUpdateAnimTriggers(st);
}
-/** Draw representation of a station tile for GUI purposes.
+/**
+ * Draw representation of a station tile for GUI purposes.
* @param x Position x of image.
* @param y Position y of image.
* @param axis Axis.
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 9d803b7df..c65a6be81 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -64,7 +64,8 @@ struct StationSpec {
*/
byte disallowed_lengths;
- /** Number of tile layouts.
+ /**
+ * Number of tile layouts.
* A minimum of 8 is required is required for stations.
* 0-1 = plain platform
* 2-3 = platform with building
@@ -75,7 +76,8 @@ struct StationSpec {
DrawTileSprites *renderdata; ///< Array of tile layouts.
bool copied_renderdata;
- /** Cargo threshold for choosing between little and lots of cargo
+ /**
+ * Cargo threshold for choosing between little and lots of cargo
* @note little/lots are equivalent to the moving/loading states for vehicles
*/
uint16 cargo_threshold;
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index 7cb8fd334..e7505a106 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file newgrf_text.cpp
+/**
+ * @file newgrf_text.cpp
* Implementation of Action 04 "universal holder" structure and functions.
* This file implements a linked-lists of strings,
* holding everything that the newgrf action 04 will send over to OpenTTD.
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index d6fe83b90..6e8d2306e 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -13,7 +13,8 @@
#include "debug.h"
#include "town.h"
-/** This function implements the town variables that newGRF defines.
+/**
+ * This function implements the town variables that newGRF defines.
* @param variable that is queried
* @param parameter unused
* @param available will return false if ever the variable asked for does not exist
diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp
index 9c05c1bb8..29ca06817 100644
--- a/src/newgrf_townname.cpp
+++ b/src/newgrf_townname.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file newgrf_townname.cpp
+/**
+ * @file newgrf_townname.cpp
* Implementation of Action 0F "universal holder" structure and functions.
* This file implements a linked-lists of townname generators,
* holding everything that the newgrf action 0F will send over to OpenTTD.
diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h
index fe6b70bf3..e6b8ec2be 100644
--- a/src/newgrf_townname.h
+++ b/src/newgrf_townname.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file newgrf_townname.h
+/**
+ * @file newgrf_townname.h
* Header of Action 0F "universal holder" structure and functions
*/
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index c268604f1..ce073f0dd 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -41,7 +41,8 @@ static uint _total_news = 0; ///< current number of news items
static NewsItem *_oldest_news = NULL; ///< head of news items queue
static NewsItem *_latest_news = NULL; ///< tail of news items queue
-/** Forced news item.
+/**
+ * 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. */
@@ -766,7 +767,8 @@ void DeleteVehicleNews(VehicleID vid, StringID news)
}
}
-/** Remove news regarding given station so there are no 'unknown station now accepts Mail'
+/**
+ * Remove news regarding given station so there are no 'unknown station now accepts Mail'
* or 'First train arrived at unknown station' news items.
* @param sid station to remove news about
*/
@@ -783,7 +785,8 @@ void DeleteStationNews(StationID sid)
}
}
-/** Remove news regarding given industry
+/**
+ * Remove news regarding given industry
* @param iid industry to remove news about
*/
void DeleteIndustryNews(IndustryID iid)
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 2e6b604b5..ee0ebf89d 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -316,7 +316,8 @@ static void InitializeDynamicVariables()
}
-/** Unitializes drivers, frees allocated memory, cleans pools, ...
+/**
+ * Unitializes drivers, frees allocated memory, cleans pools, ...
* Generally, prepares the game for shutting down
*/
static void ShutdownGame()
@@ -1273,7 +1274,8 @@ void StateGameLoop()
assert(IsLocalCompany());
}
-/** Create an autosave. The default name is "autosave#.sav". However with
+/**
+ * Create an autosave. The default name is "autosave#.sav". However with
* the setting 'keep_all_autosave' the name defaults to company-name + date */
static void DoAutosave()
{
diff --git a/src/order_base.h b/src/order_base.h
index 3e74f4c79..464400f9f 100644
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -254,7 +254,8 @@ public:
void ConvertFromOldSavegame();
};
-/** Shared order list linking together the linked list of orders and the list
+/**
+ * Shared order list linking together the linked list of orders and the list
* of vehicles sharing this order list.
*/
struct OrderList : OrderListPool::PoolItem<&_orderlist_pool> {
@@ -275,7 +276,8 @@ public:
: first(NULL), num_orders(num_orders), num_vehicles(0), first_shared(NULL),
timetable_duration(0) { }
- /** Create an order list with the given order chain for the given vehicle.
+ /**
+ * Create an order list with the given order chain for the given vehicle.
* @param chain pointer to the first order of the order chain
* @param v any vehicle using this orderlist
*/
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 2f4c3bbab..d91f5d375 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -450,7 +450,8 @@ static uint GetOrderDistance(const Order *prev, const Order *cur, const Vehicle
return DistanceManhattan(prev_tile, cur_tile);
}
-/** Add an order to the orderlist of a vehicle.
+/**
+ * Add an order to the orderlist of a vehicle.
* @param tile unused
* @param flags operation to perform
* @param p1 various bitstuffed elements
@@ -718,7 +719,8 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
return CommandCost();
}
-/** Declone an order-list
+/**
+ * Declone an order-list
* @param *dst delete the orders of this vehicle
* @param flags execution flags
*/
@@ -732,7 +734,8 @@ static CommandCost DecloneOrder(Vehicle *dst, DoCommandFlag flags)
return CommandCost();
}
-/** Delete an order from the orderlist of a vehicle.
+/**
+ * Delete an order from the orderlist of a vehicle.
* @param tile unused
* @param flags operation to perform
* @param p1 the ID of the vehicle
@@ -800,7 +803,8 @@ CommandCost CmdDeleteOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
return CommandCost();
}
-/** Goto order of order-list.
+/**
+ * Goto order of order-list.
* @param tile unused
* @param flags operation to perform
* @param p1 The ID of the vehicle which order is skipped
@@ -914,7 +918,8 @@ CommandCost CmdMoveOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return CommandCost();
}
-/** Modify an order in the orderlist of a vehicle.
+/**
+ * Modify an order in the orderlist of a vehicle.
* @param tile unused
* @param flags operation to perform
* @param p1 various bitstuffed elements
@@ -1150,7 +1155,8 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
return CommandCost();
}
-/** Clone/share/copy an order-list of another vehicle.
+/**
+ * Clone/share/copy an order-list of another vehicle.
* @param tile unused
* @param flags operation to perform
* @param p1 various bitstuffed elements
@@ -1278,7 +1284,8 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return CommandCost();
}
-/** Add/remove refit orders from an order
+/**
+ * Add/remove refit orders from an order
* @param tile Not used
* @param flags operation to perform
* @param p1 VehicleIndex of the vehicle having the order
@@ -1431,7 +1438,8 @@ void RestoreVehicleOrders(const Vehicle *v, const BackuppedOrders *bak)
DoCommandP(0, bak->group, v->index, CMD_ADD_VEHICLE_GROUP);
}
-/** Restore the current order-index of a vehicle and sets service-interval.
+/**
+ * Restore the current order-index of a vehicle and sets service-interval.
* @param tile unused
* @param flags operation to perform
* @param p1 the ID of the vehicle
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 0a6965b8a..650e32a68 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -391,7 +391,8 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
return order;
}
-/** %Order window code for all vehicles.
+/**
+ * %Order window code for all vehicles.
*
* At the bottom of the window two button rows are located for changing the orders of the vehicle.
*
diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp
index 44b27bbad..97a68f592 100644
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -126,7 +126,8 @@ const char *GetCurrentLocale(const char *param);
#define INTERNALCODE "UTF-8"
-/** Try and try to decipher the current locale from environmental
+/**
+ * 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 "" */
static const char *GetLocalCode()
@@ -174,7 +175,8 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name)
return buf;
}
-/** Convert from OpenTTD's encoding to that of the local environment
+/**
+ * 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 */
const char *OTTD2FS(const char *name)
@@ -193,7 +195,8 @@ const char *OTTD2FS(const char *name)
return convert_tofrom_fs(convd, name);
}
-/** Convert to OpenTTD's encoding from that of the local environment
+/**
+ * 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 */
const char *FS2OTTD(const char *name)
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index 7083e3727..2cc85cbb7 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -41,7 +41,8 @@ bool MyShowCursor(bool show)
return !show;
}
-/** Helper function needed by dynamically loading libraries
+/**
+ * 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 */
bool LoadLibraryList(Function proc[], const char *dll)
@@ -631,7 +632,8 @@ const TCHAR *OTTD2FS(const char *name)
}
-/** Convert to OpenTTD's encoding from that of the environment in
+/**
+ * Convert to OpenTTD's encoding from that of the environment in
* UNICODE. OpenTTD encoding is UTF8, local is wide
* @param name pointer to a valid string that will be converted
* @param utf8_buf pointer to a valid buffer that will receive the converted string
@@ -649,7 +651,8 @@ char *convert_from_fs(const wchar_t *name, char *utf8_buf, size_t buflen)
}
-/** Convert from OpenTTD's encoding to that of the environment in
+/**
+ * Convert from OpenTTD's encoding to that of the environment in
* UNICODE. OpenTTD encoding is UTF8, local is wide
* @param name pointer to a valid string that will be converted
* @param utf16_buf pointer to a valid wide-char buffer that will receive the
@@ -667,7 +670,8 @@ wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen)
return utf16_buf;
}
-/** Our very own SHGetFolderPath function for support of windows operating
+/**
+ * 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 */
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp
index 70660d653..424bdec17 100644
--- a/src/pathfinder/follow_track.hpp
+++ b/src/pathfinder/follow_track.hpp
@@ -21,7 +21,8 @@
#include "../depot_map.h"
#include "pf_performance_timer.hpp"
-/** Track follower helper template class (can serve pathfinders and vehicle
+/**
+ * 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 */
template <TransportType Ttr_type_, typename VehicleType, bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>
@@ -110,7 +111,8 @@ struct CFollowTrackT
return INVALID_DIAGDIR;
}
- /** main follower routine. Fills all members and return true on success.
+ /**
+ * main follower routine. Fills all members and return true on success.
* Otherwise returns false if track can't be followed. */
inline bool Follow(TileIndex old_tile, Trackdir old_td)
{
diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h
index 5be2dd3e4..864cdd486 100644
--- a/src/pathfinder/npf/aystar.h
+++ b/src/pathfinder/npf/aystar.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file aystar.h
+/**
+ * @file aystar.h
* This file has the header for AyStar
* AyStar is a fast pathfinding routine and is used for things like
* AI_pathfinding and Train_pathfinding.
diff --git a/src/pathfinder/npf/queue.cpp b/src/pathfinder/npf/queue.cpp
index d4850a0fc..791cbfe38 100644
--- a/src/pathfinder/npf/queue.cpp
+++ b/src/pathfinder/npf/queue.cpp
@@ -435,7 +435,8 @@ void clear_Hash(Hash *h, bool free_values)
h->size = 0;
}
-/** Finds the node that that saves this key pair. If it is not
+/**
+ * Finds the node that that saves this key pair. If it is not
* found, returns NULL. If it is found, *prev is set to the
* node before the one found, or if the node found was the first in the bucket
* to NULL. If it is not found, *prev is set to the last HashNode in the
diff --git a/src/pathfinder/npf/queue.h b/src/pathfinder/npf/queue.h
index 1d94ac740..3f042b7ad 100644
--- a/src/pathfinder/npf/queue.h
+++ b/src/pathfinder/npf/queue.h
@@ -98,7 +98,8 @@ void init_InsSort(Queue *q);
/* The amount of elements that will be malloc'd at a time */
#define BINARY_HEAP_BLOCKSIZE_BITS 10
-/** Initializes a binary heap and allocates internal memory for maximum of
+/**
+ * Initializes a binary heap and allocates internal memory for maximum of
* max_size elements */
void init_BinaryHeap(Queue *q, uint max_size);
@@ -133,20 +134,24 @@ struct Hash {
/* Call these function to manipulate a hash */
-/** Deletes the value with the specified key pair from the hash and returns
+/**
+ * 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! */
void *Hash_Delete(Hash *h, uint key1, uint key2);
-/** Sets the value associated with the given key pair to the given value.
+/**
+ * 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. */
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
+/**
+ * Gets the value associated with the given key pair, or NULL when it is not
* 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
+/**
+ * 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 */
void init_Hash(Hash *h, Hash_HashProc *hash, uint num_buckets);
/**
diff --git a/src/pathfinder/opf/opf_ship.cpp b/src/pathfinder/opf/opf_ship.cpp
index 47c2ebc92..15c8a9ba7 100644
--- a/src/pathfinder/opf/opf_ship.cpp
+++ b/src/pathfinder/opf/opf_ship.cpp
@@ -178,7 +178,8 @@ bad:;
return best_bird_dist;
}
-/** returns the track to choose on the next tile, or -1 when it's better to
+/**
+ * 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 */
Track OPFShipChooseTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp
index 87b262897..bc24e2893 100644
--- a/src/pathfinder/yapf/nodelist.hpp
+++ b/src/pathfinder/yapf/nodelist.hpp
@@ -16,7 +16,8 @@
#include "../../misc/hashtable.hpp"
#include "../../misc/binaryheap.hpp"
-/** Hash table based node list multi-container class.
+/**
+ * Hash table based node list multi-container class.
* Implements open list, closed list and priority queue for A-star
* path finder. */
template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_>
diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp
index cbebb31ec..f98a5163a 100644
--- a/src/pathfinder/yapf/yapf_base.hpp
+++ b/src/pathfinder/yapf/yapf_base.hpp
@@ -17,7 +17,8 @@
extern int _total_pf_time_us;
-/** CYapfBaseT - A-star type path finder base class.
+/**
+ * CYapfBaseT - A-star type path finder base class.
* Derive your own pathfinder from it. You must provide the following template argument:
* Types - used as collection of local types used in pathfinder
*
@@ -108,7 +109,8 @@ public:
return *m_settings;
}
- /** Main pathfinder routine:
+ /**
+ * Main pathfinder routine:
* - set startup node(s)
* - main loop that stops if:
* - the destination was found
@@ -174,7 +176,8 @@ public:
return bDestFound;
}
- /** If path was found return the best node that has reached the destination. Otherwise
+ /**
+ * If path was found return the best node that has reached the destination. Otherwise
* return the best visited node (which was nearest to the destination).
*/
FORCEINLINE Node *GetBestNode()
@@ -182,7 +185,8 @@ public:
return (m_pBestDestNode != NULL) ? m_pBestDestNode : m_pBestIntermediateNode;
}
- /** Calls NodeList::CreateNewNode() - allocates new node that can be filled and used
+ /**
+ * Calls NodeList::CreateNewNode() - allocates new node that can be filled and used
* as argument for AddStartupNode() or AddNewNode()
*/
FORCEINLINE Node& CreateNewNode()
@@ -217,7 +221,8 @@ public:
}
}
- /** AddNewNode() - called by Tderived::PfFollowNode() for each child node.
+ /**
+ * AddNewNode() - called by Tderived::PfFollowNode() for each child node.
* Nodes are evaluated here and added into open list */
void AddNewNode(Node &n, const TrackFollower &tf)
{
diff --git a/src/pathfinder/yapf/yapf_common.hpp b/src/pathfinder/yapf/yapf_common.hpp
index 51c2fc12a..cb53e2fa1 100644
--- a/src/pathfinder/yapf/yapf_common.hpp
+++ b/src/pathfinder/yapf/yapf_common.hpp
@@ -146,7 +146,8 @@ public:
return bDest;
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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 */
inline bool PfCalcEstimate(Node& n)
{
@@ -174,7 +175,8 @@ public:
}
};
-/** YAPF template that uses Ttypes template argument to determine all YAPF
+/**
+ * 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 */
diff --git a/src/pathfinder/yapf/yapf_costcache.hpp b/src/pathfinder/yapf/yapf_costcache.hpp
index 23bdc2d7b..988a13959 100644
--- a/src/pathfinder/yapf/yapf_costcache.hpp
+++ b/src/pathfinder/yapf/yapf_costcache.hpp
@@ -14,7 +14,8 @@
#include "../../date_func.h"
-/** CYapfSegmentCostCacheNoneT - the formal only yapf cost cache provider that implements
+/**
+ * CYapfSegmentCostCacheNoneT - the formal only yapf cost cache provider that implements
* PfNodeCacheFetch() and PfNodeCacheFlush() callbacks. Used when nodes don't have CachedData
* defined (they don't count with any segment cost caching).
*/
@@ -25,14 +26,16 @@ public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
typedef typename Types::NodeList::Titem Node; ///< this will be our node type
- /** Called by YAPF to attach cached or local segment cost data to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
return false;
}
- /** Called by YAPF to flush the cached segment cost data back into cache storage.
+ /**
+ * Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that. */
FORCEINLINE void PfNodeCacheFlush(Node& n)
{
@@ -40,7 +43,8 @@ public:
};
-/** CYapfSegmentCostCacheLocalT - the yapf cost cache provider that implements fake segment
+/**
+ * CYapfSegmentCostCacheLocalT - the yapf cost cache provider that implements fake segment
* cost caching functionality for yapf. Used when node needs caching, but you don't want to
* cache the segment costs.
*/
@@ -65,7 +69,8 @@ protected:
}
public:
- /** Called by YAPF to attach cached or local segment cost data to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
@@ -74,7 +79,8 @@ public:
return false;
}
- /** Called by YAPF to flush the cached segment cost data back into cache storage.
+ /**
+ * Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that. */
FORCEINLINE void PfNodeCacheFlush(Node& n)
{
@@ -82,7 +88,8 @@ public:
};
-/** Base class for segment cost cache providers. Contains global counter
+/**
+ * Base class for segment cost cache providers. Contains global counter
* 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
@@ -98,7 +105,8 @@ struct CSegmentCostCacheBase
};
-/** CSegmentCostCacheT - template class providing hash-map and storage (heap)
+/**
+ * CSegmentCostCacheT - template class providing hash-map and storage (heap)
* of Tsegment structures. Each rail node contains pointer to the segment
* that contains cached (or non-cached) segment cost information. Nodes can
* differ by key type, but they use the same segment type. Segment key should
@@ -142,7 +150,8 @@ struct CSegmentCostCacheT
}
};
-/** CYapfSegmentCostCacheGlobalT - the yapf cost cache provider that adds the segment cost
+/**
+ * CYapfSegmentCostCacheGlobalT - the yapf cost cache provider that adds the segment cost
* caching functionality to yapf. Using this class as base of your will provide the global
* segment cost caching services for your Nodes.
*/
@@ -192,7 +201,8 @@ protected:
}
public:
- /** Called by YAPF to attach cached or local segment cost data to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfNodeCacheFetch(Node& n)
{
@@ -206,7 +216,8 @@ public:
return found;
}
- /** Called by YAPF to flush the cached segment cost data back into cache storage.
+ /**
+ * Called by YAPF to flush the cached segment cost data back into cache storage.
* 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 e38ae52c8..088634daf 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -276,7 +276,8 @@ public:
m_max_cost = max_cost;
}
- /** Called by YAPF to calculate the cost from the origin to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfCalcCost(Node &n, const TrackFollower *tf)
diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp
index c7594df6c..0b046b207 100644
--- a/src/pathfinder/yapf/yapf_destrail.hpp
+++ b/src/pathfinder/yapf/yapf_destrail.hpp
@@ -63,7 +63,8 @@ public:
return bDest;
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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 */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
@@ -102,7 +103,8 @@ public:
IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns());
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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. */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
@@ -181,7 +183,8 @@ public:
return bDest;
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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 */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp
index 1fd6cfa0c..303cfd9e5 100644
--- a/src/pathfinder/yapf/yapf_rail.cpp
+++ b/src/pathfinder/yapf/yapf_rail.cpp
@@ -201,7 +201,8 @@ protected:
}
public:
- /** Called by YAPF to move from the given node to the next tile. For each
+ /**
+ * 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) */
inline void PfFollowNode(Node& old_node)
@@ -295,7 +296,8 @@ protected:
}
public:
- /** Called by YAPF to move from the given node to the next tile. For each
+ /**
+ * 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) */
inline void PfFollowNode(Node& old_node)
@@ -376,7 +378,8 @@ protected:
}
public:
- /** Called by YAPF to move from the given node to the next tile. For each
+ /**
+ * 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) */
inline void PfFollowNode(Node& old_node)
diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp
index 47a89ab81..51162d3d2 100644
--- a/src/pathfinder/yapf/yapf_road.cpp
+++ b/src/pathfinder/yapf/yapf_road.cpp
@@ -95,7 +95,8 @@ protected:
}
public:
- /** Called by YAPF to calculate the cost from the origin to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfCalcCost(Node& n, const TrackFollower *tf)
@@ -186,7 +187,8 @@ public:
return IsRoadDepotTile(tile);
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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 */
FORCEINLINE bool PfCalcEstimate(Node& n)
{
@@ -254,7 +256,8 @@ public:
return tile == m_destTile && ((m_destTrackdirs & TrackdirToTrackdirBits(trackdir)) != TRACKDIR_BIT_NONE);
}
- /** Called by YAPF to calculate cost estimate. Calculates distance to the destination
+ /**
+ * 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 */
inline bool PfCalcEstimate(Node& n)
{
@@ -302,7 +305,8 @@ protected:
public:
- /** Called by YAPF to move from the given node to the next tile. For each
+ /**
+ * 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) */
inline void PfFollowNode(Node& old_node)
diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp
index f30004106..f9e5c175d 100644
--- a/src/pathfinder/yapf/yapf_ship.cpp
+++ b/src/pathfinder/yapf/yapf_ship.cpp
@@ -32,7 +32,8 @@ protected:
}
public:
- /** Called by YAPF to move from the given node to the next tile. For each
+ /**
+ * 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) */
inline void PfFollowNode(Node& old_node)
@@ -115,7 +116,8 @@ protected:
}
public:
- /** Called by YAPF to calculate the cost from the origin to the given node.
+ /**
+ * 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 */
FORCEINLINE bool PfCalcCost(Node& n, const TrackFollower *tf)
@@ -136,7 +138,8 @@ public:
}
};
-/** Config struct of YAPF for ships.
+/**
+ * Config struct of YAPF for ships.
* Defines all 6 base YAPF modules as classes providing services for CYapfBaseT.
*/
template <class Tpf_, class Ttrack_follower, class Tnode_list>
diff --git a/src/rail.h b/src/rail.h
index 7a05eda73..caf426b62 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -80,7 +80,8 @@ enum RailTrackBridgeOffset {
RTBO_SLOPE, ///< Sloped rail pieces, in order NE, SE, SW, NW
};
-/** Offsets from base sprite for fence sprites. These are in the order of
+/**
+ * Offsets from base sprite for fence sprites. These are in the order of
* the sprites in the original data files.
*/
enum RailFenceOffset {
@@ -94,10 +95,12 @@ enum RailFenceOffset {
RFO_SLOPE_NW,
};
-/** This struct contains all the info that is needed to draw and construct tracks.
+/**
+ * This struct contains all the info that is needed to draw and construct tracks.
*/
struct RailtypeInfo {
- /** Struct containing the main sprites. @note not all sprites are listed, but only
+ /**
+ * Struct containing the main sprites. @note not all sprites are listed, but only
* the ones used directly in the code */
struct {
SpriteID track_y; ///< single piece of rail in Y direction, with ground
@@ -114,7 +117,8 @@ struct RailtypeInfo {
SpriteID tunnel; ///< tunnel sprites base
} base_sprites;
- /** struct containing the sprites for the rail GUI. @note only sprites referred to
+ /**
+ * struct containing the sprites for the rail GUI. @note only sprites referred to
* directly in the code are listed */
struct {
SpriteID build_ns_rail; ///< button for building single rail in N-S direction
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 9cce011bb..bdc29ef4b 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -160,7 +160,8 @@ static CommandCost EnsureNoTrainOnTrack(TileIndex tile, Track track)
return EnsureNoTrainOnTrackBits(tile, rail_bits);
}
-/** Check that the new track bits may be built.
+/**
+ * Check that the new track bits may be built.
* @param tile %Tile to build on.
* @param to_build New track bits.
* @param flags Flags of the operation.
@@ -350,7 +351,8 @@ static inline bool ValParamTrackOrientation(Track track)
return IsValidTrack(track);
}
-/** Build a single piece of rail
+/**
+ * Build a single piece of rail
* @param tile tile to build on
* @param flags operation to perform
* @param p1 railtype of being built piece (normal, mono, maglev)
@@ -489,7 +491,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u
return cost;
}
-/** Remove a single piece of track
+/**
+ * Remove a single piece of track
* @param tile tile to remove track from
* @param flags operation to perform
* @param p1 unused
@@ -728,7 +731,8 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd
return CommandCost();
}
-/** Build or remove a stretch of railroad tracks.
+/**
+ * Build or remove a stretch of railroad tracks.
* @param tile start tile of drag
* @param flags operation to perform
* @param p1 end tile of drag
@@ -788,7 +792,8 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3
return last_error;
}
-/** Build rail on a stretch of track.
+/**
+ * Build rail on a stretch of track.
* Stub for the unified rail builder/remover
* @param tile start tile of drag
* @param flags operation to perform
@@ -806,7 +811,8 @@ CommandCost CmdBuildRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1
return CmdRailTrackHelper(tile, flags, p1, ClrBit(p2, 7), text);
}
-/** Build rail on a stretch of track.
+/**
+ * Build rail on a stretch of track.
* Stub for the unified rail builder/remover
* @param tile start tile of drag
* @param flags operation to perform
@@ -824,7 +830,8 @@ CommandCost CmdRemoveRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p
return CmdRailTrackHelper(tile, flags, p1, SetBit(p2, 7), text);
}
-/** Build a train depot
+/**
+ * Build a train depot
* @param tile position of the train depot
* @param flags operation to perform
* @param p1 rail type
@@ -884,7 +891,8 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u
return cost;
}
-/** Build signals, alternate between double/single, signal/semaphore,
+/**
+ * Build signals, alternate between double/single, signal/semaphore,
* pre/exit/combo-signals, and what-else not. If the rail piece does not
* have any signals, bit 4 (cycle signal-type) is ignored
* @param tile tile where to build the signals
@@ -1116,7 +1124,8 @@ static bool CheckSignalAutoFill(TileIndex &tile, Trackdir &trackdir, int &signal
}
}
-/** Build many signals by dragging; AutoSignals
+/**
+ * Build many signals by dragging; AutoSignals
* @param tile start tile of drag
* @param flags operation to perform
* @param p1 end tile of drag
@@ -1249,7 +1258,8 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, DoCommandFlag flags, uin
return had_success ? total_cost : last_error;
}
-/** Build signals on a stretch of track.
+/**
+ * Build signals on a stretch of track.
* Stub for the unified signal builder/remover
* @param tile start tile of drag
* @param flags operation to perform
@@ -1271,7 +1281,8 @@ CommandCost CmdBuildSignalTrack(TileIndex tile, DoCommandFlag flags, uint32 p1,
return CmdSignalTrackHelper(tile, flags, p1, p2, text);
}
-/** Remove signals
+/**
+ * Remove signals
* @param tile coordinates where signal is being deleted from
* @param flags operation to perform
* @param p1 various bitstuffed elements, only track information is used
@@ -1338,7 +1349,8 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_SIGNALS]);
}
-/** Remove signals on a stretch of track.
+/**
+ * Remove signals on a stretch of track.
* Stub for the unified signal builder/remover
* @param tile start tile of drag
* @param flags operation to perform
@@ -1376,7 +1388,8 @@ static Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data)
return NULL;
}
-/** Convert one rail type to the other. You can convert normal rail to
+/**
+ * Convert one rail type to the other. You can convert normal rail to
* monorail/maglev easily or vice-versa.
* @param tile end tile of rail conversion drag
* @param flags operation to perform
@@ -2140,7 +2153,8 @@ static void DrawTrackBits(TileInfo *ti, TrackBits track)
}
}
-/** Enums holding the offsets from base signal sprite,
+/**
+ * Enums holding the offsets from base signal sprite,
* 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,
@@ -2682,7 +2696,8 @@ static const int8 _deltacoord_leaveoffset[8] = {
};
-/** Compute number of ticks when next wagon will leave a depot.
+/**
+ * Compute number of ticks when next wagon will leave a depot.
* Negative means next wagon should have left depot n ticks before.
* @param v vehicle outside (leaving) the depot
* @return number of ticks when the next wagon will leave
@@ -2703,7 +2718,8 @@ int TicksToLeaveDepot(const Train *v)
return 0; // make compilers happy
}
-/** Tile callback routine when vehicle enters tile
+/**
+ * Tile callback routine when vehicle enters tile
* @see vehicle_enter_tile_proc */
static VehicleEnterTileStatus VehicleEnter_Track(Vehicle *u, TileIndex tile, int x, int y)
{
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index c0348d95f..a5c7bc01b 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -312,7 +312,8 @@ enum RailToolbarWidgets {
};
-/** Toggles state of the Remove button of Build rail toolbar
+/**
+ * Toggles state of the Remove button of Build rail toolbar
* @param w window the button belongs to
*/
static void ToggleRailButton_Remove(Window *w)
@@ -324,7 +325,8 @@ static void ToggleRailButton_Remove(Window *w)
SetSelectionRed(_remove_button_clicked);
}
-/** Updates the Remove button because of Ctrl state change
+/**
+ * Updates the Remove button because of Ctrl state change
* @param w window the button belongs to
* @return true iff the remove buton was changed
*/
@@ -635,7 +637,8 @@ struct BuildRailToolbarWindow : Window {
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
}
- /** Configures the rail toolbar for railtype given
+ /**
+ * Configures the rail toolbar for railtype given
* @param railtype the railtype to display
*/
void SetupRailToolbar(RailType railtype)
@@ -654,7 +657,8 @@ struct BuildRailToolbarWindow : Window {
this->GetWidget<NWidgetCore>(RTW_BUILD_TUNNEL)->widget_data = rti->gui_sprites.build_tunnel;
}
- /** Switch to another rail type.
+ /**
+ * Switch to another rail type.
* @param railtype New rail type.
*/
void ModifyRailType(RailType railtype)
@@ -1939,7 +1943,8 @@ bool ResetSignalVariant(int32 p = 0)
return true;
}
-/** Resets the rail GUI - sets default railtype to build
+/**
+ * Resets the rail GUI - sets default railtype to build
* and resets the signal GUI
*/
void InitializeRailGUI()
diff --git a/src/rail_map.h b/src/rail_map.h
index 419d97069..d05f54146 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -345,7 +345,8 @@ static inline void SetSignalVariant(TileIndex t, Track track, SignalVariant v)
if (track == INVALID_TRACK) SB(_m[t].m2, 7, 1, v);
}
-/** These are states in which a signal can be. Currently these are only two, so
+/**
+ * These are states in which a signal can be. Currently these are only two, so
* simple boolean logic will do. But do try to compare to this enum instead of
* normal boolean evaluation, since that will make future additions easier.
*/
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 6863e549b..112239a0d 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -168,7 +168,8 @@ CommandCost CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, R
}
-/** Delete a piece of road.
+/**
+ * Delete a piece of road.
* @param tile tile where to remove road from
* @param flags operation to perform
* @param pieces roadbits to remove
@@ -438,7 +439,8 @@ static CommandCost CheckRoadSlope(Slope tileh, RoadBits *pieces, RoadBits existi
return CMD_ERROR;
}
-/** Build a piece of road.
+/**
+ * Build a piece of road.
* @param tile tile where to build road
* @param flags operation to perform
* @param p1 bit 0..3 road pieces to build (RoadBits)
@@ -723,7 +725,8 @@ do_clear:;
return cost;
}
-/** Build a long piece of road.
+/**
+ * Build a long piece of road.
* @param start_tile start tile of drag (the building cost will appear over this tile)
* @param flags operation to perform
* @param p1 end tile of drag
@@ -817,7 +820,8 @@ CommandCost CmdBuildLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32 p
return had_success ? cost : last_error;
}
-/** Remove a long piece of road.
+/**
+ * Remove a long piece of road.
* @param start_tile start tile of drag
* @param flags operation to perform
* @param p1 end tile of drag
@@ -891,7 +895,8 @@ CommandCost CmdRemoveLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32
return had_success ? cost : last_error;
}
-/** Build a road depot.
+/**
+ * Build a road depot.
* @param tile tile where to build the depot
* @param flags operation to perform
* @param p1 bit 0..1 entrance direction (DiagDirection)
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 635a661dd..7ff00def7 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -212,7 +212,8 @@ static void PlaceRoad_Depot(TileIndex tile)
DoCommandP(tile, _cur_roadtype << 2 | _road_depot_orientation, 0, CMD_BUILD_ROAD_DEPOT | CMD_MSG(_road_type_infos[_cur_roadtype].err_depot), CcRoadDepot);
}
-/** Command callback for building road stops.
+/**
+ * Command callback for building road stops.
* @param result Result of the build road stop command.
* @param tile Start tile.
* @param p1 bit 0..7: Width of the road stop.
@@ -312,7 +313,8 @@ enum RoadToolbarWidgets {
typedef void OnButtonClick(Window *w);
-/** Toogles state of the Remove button of Build road toolbar
+/**
+ * Toogles state of the Remove button of Build road toolbar
* @param w window the button belongs to
*/
static void ToggleRoadButton_Remove(Window *w)
@@ -323,7 +325,8 @@ static void ToggleRoadButton_Remove(Window *w)
SetSelectionRed(_remove_button_clicked);
}
-/** Updates the Remove button because of Ctrl state change
+/**
+ * Updates the Remove button because of Ctrl state change
* @param w window the button belongs to
* @return true iff the remove buton was changed
*/
diff --git a/src/road_map.h b/src/road_map.h
index ad5a1de4a..ed1ad4148 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -149,7 +149,8 @@ static inline bool IsRoadOwner(TileIndex t, RoadType rt, Owner o)
return (GetRoadOwner(t, rt) == o);
}
-/** Checks if given tile has town owned road
+/**
+ * Checks if given tile has town owned road
* @param t tile to check
* @return true iff tile has road and the road is owned by a town
* @pre IsTileType(t, MP_ROAD)
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 35d17b7bb..f6135d585 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -191,7 +191,8 @@ void RoadVehUpdateCache(RoadVehicle *v)
}
}
-/** Build a road vehicle.
+/**
+ * Build a road vehicle.
* @param tile tile of depot where road vehicle is built
* @param flags operation to perform
* @param p1 bus/truck type being built (engine)
@@ -322,7 +323,8 @@ bool RoadVehicle::IsStoppedInDepot() const
return true;
}
-/** Sell a road vehicle.
+/**
+ * Sell a road vehicle.
* @param tile unused
* @param flags operation to perform
* @param p1 vehicle ID to be sold
@@ -376,7 +378,8 @@ bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destinati
return true;
}
-/** Send a road vehicle to the depot.
+/**
+ * Send a road vehicle to the depot.
* @param tile unused
* @param flags operation to perform
* @param p1 vehicle ID to send to the depot
@@ -400,7 +403,8 @@ CommandCost CmdSendRoadVehToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1
return v->SendToDepot(flags, (DepotCommand)(p2 & DEPOT_COMMAND_MASK));
}
-/** Turn a roadvehicle around.
+/**
+ * Turn a roadvehicle around.
* @param tile unused
* @param flags operation to perform
* @param p1 vehicle ID to turn
@@ -1751,7 +1755,8 @@ Trackdir RoadVehicle::GetVehicleTrackdir() const
}
-/** Refit a road vehicle to the specified cargo type
+/**
+ * Refit a road vehicle to the specified cargo type
* @param tile unused
* @param flags operation to perform
* @param p1 Vehicle ID of the vehicle to refit
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 6c0f9a7d8..2ce446511 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2153,7 +2153,8 @@ bool AfterLoadGame()
return true;
}
-/** Reload all NewGRF files during a running game. This is a cut-down
+/**
+ * Reload all NewGRF files during a running game. This is a cut-down
* version of AfterLoadGame().
* XXX - We need to reset the vehicle position hash because with a non-empty
* hash AfterLoadVehicles() will loop infinitely. We need AfterLoadVehicles()
diff --git a/src/saveload/airport_sl.cpp b/src/saveload/airport_sl.cpp
index 933114388..893bcc070 100644
--- a/src/saveload/airport_sl.cpp
+++ b/src/saveload/airport_sl.cpp
@@ -14,7 +14,8 @@
#include "saveload.h"
-/** Save and load the mapping between the airport id in the AirportSpec array
+/**
+ * Save and load the mapping between the airport id in the AirportSpec array
* and the grf file it came from. */
static const SaveLoad _airport_id_mapping_desc[] = {
SLE_VAR(EntityIDMapping, grfid, SLE_UINT32),
diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp
index 4c285d743..71bb09bd0 100644
--- a/src/saveload/order_sl.cpp
+++ b/src/saveload/order_sl.cpp
@@ -66,7 +66,8 @@ void Order::ConvertFromOldSavegame()
}
}
-/** Unpacks a order from savegames with version 4 and lower
+/**
+ * Unpacks a order from savegames with version 4 and lower
* @param packed packed order
* @return unpacked order
*/
@@ -75,7 +76,8 @@ static Order UnpackVersion4Order(uint16 packed)
return Order(GB(packed, 8, 8) << 16 | GB(packed, 4, 4) << 8 | GB(packed, 0, 4));
}
-/** Unpacks a order from savegames made with TTD(Patch)
+/**
+ * Unpacks a order from savegames made with TTD(Patch)
* @param packed packed order
* @return unpacked order
*/
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 61474be04..1efa2eee1 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file saveload.cpp
+/**
+ * @file saveload.cpp
* All actions handling saving and loading goes on in this file. The general actions
* are as follows for saving a game (loading is analogous):
* <ol>
@@ -432,7 +433,8 @@ static inline size_t SlGetOffs()
return _sl.offs_base - (_sl.bufe - _sl.bufp);
}
-/** Flush the output buffer by writing to disk with the given reader.
+/**
+ * Flush the output buffer by writing to disk with the given reader.
* If the buffer pointer has not yet been set up, set it up now. Usually
* only called when the buffer is full, or there is no more data to be processed
*/
@@ -451,7 +453,8 @@ static void SlWriteFill()
_sl.bufe = _sl.buf + _sl.bufsize;
}
-/** Read in a single byte from file. If the temporary buffer is full,
+/**
+ * Read in a single byte from file. If the temporary buffer is full,
* flush it to its final destination
* @return return the read byte from file
*/
@@ -464,7 +467,8 @@ static inline byte SlReadByteInternal()
/** Wrapper for SlReadByteInternal */
byte SlReadByte() {return SlReadByteInternal();}
-/** Write away a single byte from memory. If the temporary buffer is full,
+/**
+ * Write away a single byte from memory. If the temporary buffer is full,
* flush it to its destination (file)
* @param b the byte that is currently written
*/
@@ -514,7 +518,8 @@ static inline void SlWriteUint64(uint64 x)
SlWriteUint32((uint32)x);
}
-/** Read in bytes from the file/data structure but don't do
+/**
+ * Read in bytes from the file/data structure but don't do
* anything with them, discarding them in effect
* @param length The amount of bytes that is being treated this way
*/
@@ -1244,7 +1249,8 @@ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld)
return true;
}
-/** Are we going to load this variable when loading a savegame or not?
+/**
+ * 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 */
static inline bool SlSkipVariableOnLoad(const SaveLoad *sld)
@@ -2066,7 +2072,8 @@ static void SaveFileError()
SaveFileDone();
}
-/** We have written the whole game into memory, _memory_savegame, now find
+/**
+ * We have written the whole game into memory, _memory_savegame, now find
* and appropiate compressor and start writing to file.
*/
static SaveOrLoadResult SaveFileToDisk(bool threaded)
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index 32a9429e3..56e447294 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -94,7 +94,8 @@ enum ChunkType {
CH_AUTO_LENGTH = 16,
};
-/** VarTypes is the general bitmasked magic type that tells us
+/**
+ * VarTypes is the general bitmasked magic type that tells us
* certain characteristics about the variable it refers to. For example
* 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
@@ -251,7 +252,8 @@ typedef SaveLoad SaveLoadGlobVarList;
#define SLEG_END() {true, SL_END, 0, 0, 0, 0, NULL}
-/** Checks if the savegame is below major.minor.
+/**
+ * Checks if the savegame is below major.minor.
*/
static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
{
@@ -260,7 +262,8 @@ static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
return (_sl_version < major) || (_sl_version == major && _sl_minor_version < minor);
}
-/** Checks if the savegame is below version.
+/**
+ * Checks if the savegame is below version.
*/
static inline bool CheckSavegameVersion(uint16 version)
{
@@ -268,7 +271,8 @@ static inline bool CheckSavegameVersion(uint16 version)
return _sl_version < version;
}
-/** Checks if some version from/to combination falls within the range of the
+/**
+ * Checks if some version from/to combination falls within the range of the
* active savegame version */
static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to)
{
@@ -310,7 +314,8 @@ static inline bool IsNumericType(VarType conv)
return GetVarMemType(conv) <= SLE_VAR_U64;
}
-/** Get the address of the variable. Which one to pick depends on the object
+/**
+ * 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 */
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 1f9eeb2ba..84e44c192 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -515,7 +515,8 @@ static void CurrentScreenCallback(void *userdata, void *buf, uint y, uint pitch,
blitter->CopyImageToBuffer(src, buf, _screen.width, n, pitch);
}
-/** generate a large piece of the world
+/**
+ * generate a large piece of the world
* @param userdata Viewport area to draw
* @param buf Videobuffer with same bitdepth as current blitter
* @param y First line to render
diff --git a/src/settings.cpp b/src/settings.cpp
index 19f394339..3cd4d1b3b 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file settings.cpp
+/**
+ * @file settings.cpp
* All actions handling saving and loading of the settings/configuration goes on in this file.
* The file consists of three parts:
* <ol>
@@ -94,7 +95,8 @@ static const char * const _list_group_names[] = {
NULL
};
-/** Find the index value of a ONEofMANY type in a string seperated by |
+/**
+ * Find the index value of a ONEofMANY type in a string seperated by |
* @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
@@ -121,7 +123,8 @@ static int LookupOneOfMany(const char *many, const char *one, size_t onelen = 0)
}
}
-/** Find the set-integer value MANYofMANY type in a string
+/**
+ * Find the set-integer value MANYofMANY type in a string
* @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
@@ -150,7 +153,8 @@ static uint32 LookupManyOfMany(const char *many, const char *str)
return res;
}
-/** Parse an integerlist string and set each found value
+/**
+ * Parse an integerlist string and set each found value
* @param p the string to be parsed. Each element in the list is seperated by a
* comma or a space character
* @param items pointer to the integerlist-array that will be filled with values
@@ -193,7 +197,8 @@ int ParseIntList(const char *p, int *items, int maxitems)
return n;
}
-/** Load parsed string-values into an integer-array (intlist)
+/**
+ * Load parsed string-values into an integer-array (intlist)
* @param str the string that contains the values (and will be parsed)
* @param array pointer to the integer-arrays that will be filled
* @param nelems the number of elements the array holds. Maximum is 64 elements
@@ -232,7 +237,8 @@ static bool LoadIntList(const char *str, void *array, int nelems, VarType type)
return true;
}
-/** Convert an integer-array (intlist) to a string representation. Each value
+/**
+ * Convert an integer-array (intlist) to a string representation. Each value
* is seperated by a comma or a space character
* @param buf output buffer where the string-representation will be stored
* @param last last item to write to in the output buffer
@@ -259,7 +265,8 @@ static void MakeIntList(char *buf, const char *last, const void *array, int nele
}
}
-/** Convert a ONEofMANY structure to a string representation.
+/**
+ * Convert a ONEofMANY structure to a string representation.
* @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
@@ -284,7 +291,8 @@ static void MakeOneOfMany(char *buf, const char *last, const char *many, int id)
*buf = '\0';
}
-/** Convert a MANYofMANY structure to a string representation.
+/**
+ * Convert a MANYofMANY structure to a string representation.
* @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
@@ -317,7 +325,8 @@ static void MakeManyOfMany(char *buf, const char *last, const char *many, uint32
*buf = '\0';
}
-/** Convert a string representation (external) of a setting to the internal rep.
+/**
+ * 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 */
@@ -360,7 +369,8 @@ static const void *StringToVal(const SettingDescBase *desc, const char *orig_str
return NULL;
}
-/** Set the value of a setting and if needed clamp the value to
+/**
+ * Set the value of a setting and if needed clamp the value to
* the preset minimum and maximum.
* @param ptr the variable itself
* @param sd pointer to the 'information'-database of the variable
@@ -412,7 +422,8 @@ static void Write_ValidateSetting(void *ptr, const SettingDesc *sd, int32 val)
WriteValue(ptr, sd->save.conv, (int64)val);
}
-/** Load values from a group of an IniFile structure into the internal representation
+/**
+ * Load values from a group of an IniFile structure into the internal representation
* @param ini pointer to IniFile structure that holds administrative information
* @param sd pointer to SettingDesc structure whose internally pointed variables will
* be given values
@@ -495,7 +506,8 @@ static void IniLoadSettings(IniFile *ini, const SettingDesc *sd, const char *grp
}
}
-/** Save the values of settings to the inifile.
+/**
+ * Save the values of settings to the inifile.
* @param ini pointer to IniFile structure
* @param sd read-only SettingDesc structure which contains the unmodified,
* loaded values of the configuration file and various information about it
@@ -618,7 +630,8 @@ static void IniSaveSettings(IniFile *ini, const SettingDesc *sd, const char *grp
}
}
-/** Loads all items from a 'grpname' section into a list
+/**
+ * Loads all items from a 'grpname' section into a list
* The list parameter can be a NULL pointer, in this case nothing will be
* saved and a callback function should be defined that will take over the
* list-handling and store the data itself somewhere.
@@ -639,7 +652,8 @@ static void IniLoadSettingList(IniFile *ini, const char *grpname, StringList *li
}
}
-/** Saves all items from a list into the 'grpname' section
+/**
+ * Saves all items from a list into the 'grpname' section
* The list parameter can be a NULL pointer, in this case a callback function
* should be defined that will provide the source data to be saved.
* @param ini IniFile handle to the ini file where the destination data is saved
@@ -982,7 +996,8 @@ static bool CheckRoadSide(int p1)
return _game_mode == GM_MENU || !RoadVehiclesAreBuilt();
}
-/** Conversion callback for _gameopt_settings_game.landscape
+/**
+ * Conversion callback for _gameopt_settings_game.landscape
* It converts (or try) between old values and the new ones,
* without losing initial setting of the user
* @param value that was read from config file
@@ -1157,7 +1172,8 @@ static void HandleOldDiffCustom(bool savegame)
}
}
-/** tries to convert newly introduced news settings based on old ones
+/**
+ * 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 */
@@ -1539,7 +1555,8 @@ static const SettingDesc *GetSettingDescription(uint index)
return &_settings[index];
}
-/** Network-safe changing of settings (server-only).
+/**
+ * Network-safe changing of settings (server-only).
* @param tile unused
* @param flags operation to perform
* @param p1 the index of the setting in the SettingDesc array which identifies it
@@ -1593,7 +1610,8 @@ CommandCost CmdChangeSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
return CommandCost();
}
-/** Change one of the per-company settings.
+/**
+ * Change one of the per-company settings.
* @param tile unused
* @param flags operation to perform
* @param p1 the index of the setting in the _company_settings array which identifies it
@@ -1629,7 +1647,8 @@ CommandCost CmdChangeCompanySetting(TileIndex tile, DoCommandFlag flags, uint32
return CommandCost();
}
-/** Top function to save the new value of an element of the Settings struct
+/**
+ * Top function to save the new value of an element of the Settings struct
* @param index offset in the SettingDesc array of the Settings struct which
* identifies the setting member we want to change
* @param value new value of the setting
@@ -1668,7 +1687,8 @@ bool SetSettingValue(uint index, int32 value, bool force_newgame)
return false;
}
-/** Top function to save the new value of an element of the Settings struct
+/**
+ * Top function to save the new value of an element of the Settings struct
* @param index offset in the SettingDesc array of the CompanySettings struct
* which identifies the setting member we want to change
* @param value new value of the setting
@@ -1896,7 +1916,8 @@ void IConsoleListSettings(const char *prefilter)
IConsolePrintF(CC_WARNING, "Use 'setting' command to change a value");
}
-/** Save and load handler for settings
+/**
+ * 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 */
@@ -1911,7 +1932,8 @@ static void LoadSettings(const SettingDesc *osd, void *object)
}
}
-/** Loadhandler for a list of global variables
+/**
+ * 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 */
@@ -1920,7 +1942,8 @@ static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
LoadSettings((const SettingDesc*)sdg, NULL);
}
-/** Save and load handler for settings
+/**
+ * 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 */
@@ -1941,7 +1964,8 @@ static void SaveSettings(const SettingDesc *sd, void *object)
}
}
-/** Savehandler for a list of global variables
+/**
+ * Savehandler for a list of global variables
* @note this is actually a stub for SaveSettings with the
* object pointer set to NULL */
static inline void SaveSettingsGlobList(const SettingDescGlobVarList *sdg)
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 8d57a10a8..472e42076 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -16,7 +16,8 @@
#include "settings_type.h"
#include "strings_type.h"
-/** Convention/Type of settings. This is then further specified if necessary
+/**
+ * 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 */
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 195f9158e..1e6f36a70 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -73,7 +73,8 @@ void DrawShipEngine(int left, int right, int preferred_x, int y, EngineID engine
DrawSprite(sprite, pal, preferred_x, y);
}
-/** Get the size of the sprite of a ship sprite heading west (used for lists)
+/**
+ * Get the size of the sprite of a ship sprite heading west (used for lists)
* @param engine The engine to get the sprite from
* @param width The width of the sprite
* @param height The height of the sprite
@@ -373,7 +374,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
+/**
+ * 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 */
static Track ChooseShipTrack(const Ship *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks)
@@ -599,7 +601,8 @@ bool Ship::Tick()
return true;
}
-/** Build a ship.
+/**
+ * Build a ship.
* @param tile tile of depot where ship is built
* @param flags type of operation
* @param p1 ship type being built (engine)
@@ -696,7 +699,8 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return value;
}
-/** Sell a ship.
+/**
+ * Sell a ship.
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID to be sold
@@ -739,7 +743,8 @@ bool Ship::FindClosestDepot(TileIndex *location, DestinationID *destination, boo
return true;
}
-/** Send a ship to the depot.
+/**
+ * Send a ship to the depot.
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID to send to the depot
@@ -764,7 +769,8 @@ CommandCost CmdSendShipToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u
}
-/** Refits a ship to the specified cargo type.
+/**
+ * Refits a ship to the specified cargo type.
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID of the ship to refit
diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp
index 90ccb89f8..23af91460 100644
--- a/src/signs_cmd.cpp
+++ b/src/signs_cmd.cpp
@@ -62,7 +62,8 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return CommandCost();
}
-/** Rename a sign. If the new name of the sign is empty, we assume
+/**
+ * Rename a sign. If the new name of the sign is empty, we assume
* the user wanted to delete it. So delete it. Ownership of signs
* has no meaning/effect whatsoever except for eyecandy
* @param tile unused
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index c3b7c0a3e..520e07248 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -63,7 +63,8 @@ static int _smallmap_industry_count; ///< Number of used industries
/** Macro for end of list marker in arrays of LegendAndColour */
#define MKEND() {0, STR_NULL, {INVALID_INDUSTRYTYPE}, true, true, false}
-/** Macro for break marker in arrays of LegendAndColour.
+/**
+ * Macro for break marker in arrays of LegendAndColour.
* It will have valid data, though */
#define MS(a, b) {a, b, {INVALID_INDUSTRYTYPE}, true, false, true}
@@ -149,7 +150,8 @@ static const LegendAndColour _legend_land_owners[] = {
#undef MS
#undef MKEND
-/** Allow room for all industries, plus a terminator entry
+/**
+ * Allow room for all industries, plus a terminator entry
* 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) */
@@ -631,7 +633,8 @@ class SmallMapWindow : public Window {
return scroll;
}
- /** Initialize or change the zoom level.
+ /**
+ * Initialize or change the zoom level.
* @param change Way to change the zoom level.
* @param zoom_pt Position to keep fixed while zooming.
* @pre \c *zoom_pt should contain a point in the smallmap display when zooming in or out.
@@ -983,7 +986,8 @@ public:
this->SmallMapCenterOnCurrentPos();
}
- /** Compute maximal required height of the legends.
+ /**
+ * Compute maximal required height of the legends.
* @return Maximally needed height for displaying the smallmap legends in pixels.
*/
inline uint GetMaxLegendHeight() const
@@ -992,7 +996,8 @@ public:
return WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + num_rows * FONT_HEIGHT_SMALL;
}
- /** Compute minimal required width of the legends.
+ /**
+ * Compute minimal required width of the legends.
* @return Minimally needed width for displaying the smallmap legends in pixels.
*/
inline uint GetMinLegendWidth() const
@@ -1000,7 +1005,8 @@ public:
return WD_FRAMERECT_LEFT + this->min_number_of_columns * this->column_width;
}
- /** Return number of columns that can be displayed in \a width pixels.
+ /**
+ * Return number of columns that can be displayed in \a width pixels.
* @return Number of columns to display.
*/
inline uint GetNumberColumnsLegend(uint width) const
@@ -1008,7 +1014,8 @@ public:
return width / this->column_width;
}
- /** Compute height given a width.
+ /**
+ * Compute height given a width.
* @return Needed height for displaying the smallmap legends in pixels.
*/
uint GetLegendHeight(uint width) const
diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp
index e443403b8..159bb2989 100644
--- a/src/sound/allegro_s.cpp
+++ b/src/sound/allegro_s.cpp
@@ -44,7 +44,8 @@ void SoundDriver_Allegro::MainLoop()
free_audio_stream_buffer(_stream);
}
-/** There are multiple modules that might be using Allegro and
+/**
+ * There are multiple modules that might be using Allegro and
* Allegro can only be initiated once. */
extern int _allegro_instance_count;
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index 35967998e..50e9cb498 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -405,7 +405,8 @@ void IncreaseSpriteLRU()
}
}
-/** Called when holes in the sprite cache should be removed.
+/**
+ * Called when holes in the sprite cache should be removed.
* That is accomplished by moving the cached data. */
static void CompactSpriteCache()
{
@@ -522,7 +523,8 @@ static void *AllocSprite(size_t mem_req)
}
}
-/** Handles the case when a sprite of different type is requested than is present in the SpriteCache.
+/**
+ * Handles the case when a sprite of different type is requested than is present in the SpriteCache.
* For ST_FONT sprites, it is normal. In other cases, default sprite is loaded instead.
* @param sprite ID of loaded sprite
* @param requested requested sprite type
diff --git a/src/station.cpp b/src/station.cpp
index 26305cd40..f6430359d 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -140,7 +140,8 @@ RoadStop *Station::GetPrimaryRoadStop(const RoadVehicle *v) const
return rs;
}
-/** Called when new facility is built on the station. If it is the first facility
+/**
+ * Called when new facility is built on the station. If it is the first facility
* it initializes also 'xy' and 'random_bits' members */
void Station::AddFacility(StationFacility new_facility_bit, TileIndex facil_xy)
{
@@ -217,7 +218,8 @@ void Station::MarkTilesDirty(bool cargo_change) const
return length;
}
-/** Determines the catchment radius of the station
+/**
+ * Determines the catchment radius of the station
* @return The radius
*/
uint Station::GetCatchmentRadius() const
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 55bedff47..fb2ab235a 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -432,7 +432,8 @@ void UpdateAllStationVirtCoords()
}
}
-/** Get a mask of the cargo types that the station accepts.
+/**
+ * Get a mask of the cargo types that the station accepts.
* @param st Station to query
* @return the expected mask
*/
@@ -446,7 +447,8 @@ static uint GetAcceptanceMask(const Station *st)
return mask;
}
-/** Items contains the two cargo names that are to be accepted or rejected.
+/**
+ * Items contains the two cargo names that are to be accepted or rejected.
* msg is the string id of the message to display.
*/
static void ShowRejectOrAcceptNews(const Station *st, uint num_items, CargoID *cargo, StringID msg)
@@ -549,7 +551,8 @@ CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint3
return acceptance;
}
-/** Update the acceptance for a station.
+/**
+ * Update the acceptance for a station.
* @param st Station to update
* @param show_msg controls whether to display a message that acceptance was changed.
*/
@@ -642,7 +645,8 @@ static void UpdateStationSignCoord(BaseStation *st)
st->UpdateVirtCoord();
}
-/** This is called right after a station was deleted.
+/**
+ * This is called right after a station was deleted.
* It checks if the whole station is free of substations, and if so, the station will be
* deleted after a little while.
* @param st Station
@@ -659,7 +663,8 @@ static void DeleteStationIfEmpty(BaseStation *st)
CommandCost ClearTile_Station(TileIndex tile, DoCommandFlag flags);
-/** Checks if the given tile is buildable, flat and has a certain height.
+/**
+ * Checks if the given tile is buildable, flat and has a certain height.
* @param tile TileIndex to check.
* @param invalid_dirs Prohibited directions for slopes (set of #DiagDirection).
* @param allowed_z Height allowed for the tile. If allowed_z is negative, it will be set to the height of this tile.
@@ -711,7 +716,8 @@ CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z
return cost;
}
-/** Tries to clear the given area.
+/**
+ * Tries to clear the given area.
* @param tile_area Area to check.
* @param flags Operation to perform.
* @return The cost in case of success, or an error code if it failed.
@@ -734,7 +740,8 @@ CommandCost CheckFlatLand(TileArea tile_area, DoCommandFlag flags)
return cost;
}
-/** Checks if a rail station can be built at the given area.
+/**
+ * Checks if a rail station can be built at the given area.
* @param tile_area Area to check.
* @param flags Operation to perform.
* @param invalid_dirs Prohibited directions (set of #DiagDirection).
@@ -807,7 +814,8 @@ static CommandCost CheckFlatLandRailStation(TileArea tile_area, DoCommandFlag fl
return cost;
}
-/** Checks if a road stop can be built at the given tile.
+/**
+ * Checks if a road stop can be built at the given tile.
* @param tile_area Area to check.
* @param flags Operation to perform.
* @param invalid_dirs Prohibited directions (set of DiagDirections).
@@ -1461,7 +1469,8 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
return total_cost;
}
-/** Remove a single tile from a rail station.
+/**
+ * Remove a single tile from a rail station.
* This allows for custom-built station with holes and weird layouts
* @param start tile of station piece to remove
* @param flags operation to perform
@@ -1495,7 +1504,8 @@ CommandCost CmdRemoveFromRailStation(TileIndex start, DoCommandFlag flags, uint3
return ret;
}
-/** Remove a single tile from a waypoint.
+/**
+ * Remove a single tile from a waypoint.
* This allows for custom-built waypoint with holes and weird layouts
* @param start tile of waypoint piece to remove
* @param flags operation to perform
@@ -1659,7 +1669,8 @@ static CommandCost FindJoiningRoadStop(StationID existing_stop, StationID statio
return FindJoiningBaseStation<Station, STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST>(existing_stop, station_to_join, adjacent, ta, st);
}
-/** Build a bus or truck stop.
+/**
+ * Build a bus or truck stop.
* @param tile Northernmost tile of the stop.
* @param flags Operation to perform.
* @param p1 bit 0..7: Width of the road stop.
@@ -1910,7 +1921,8 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
return CommandCost(EXPENSES_CONSTRUCTION, _price[is_truck ? PR_CLEAR_STATION_TRUCK : PR_CLEAR_STATION_BUS]);
}
-/** Remove bus or truck stops.
+/**
+ * Remove bus or truck stops.
* @param tile Northernmost tile of the removal area.
* @param flags Operation to perform.
* @param p1 bit 0..7: Width of the removal area.
@@ -1990,7 +2002,8 @@ static uint GetMinimalAirportDistanceToTile(const AirportSpec *as, TileIndex tow
return dx + dy;
}
-/** Get a possible noise reduction factor based on distance from town center.
+/**
+ * Get a possible noise reduction factor based on distance from town center.
* The further you get, the less noise you generate.
* So all those folks at city council can now happily slee... work in their offices
* @param as airport information
@@ -2064,7 +2077,8 @@ void UpdateAirportsNoise()
}
}
-/** Place an Airport.
+/**
+ * Place an Airport.
* @param tile tile where airport will be built
* @param flags operation to perform
* @param p1
@@ -2336,7 +2350,8 @@ static const TileIndexDiffC _dock_tileoffs_chkaround[] = {
static const byte _dock_w_chk[4] = { 2, 1, 2, 1 };
static const byte _dock_h_chk[4] = { 1, 2, 1, 2 };
-/** Build a dock/haven.
+/**
+ * Build a dock/haven.
* @param tile tile where dock will be built
* @param flags operation to perform
* @param p1 (bit 0) - allow docks directly adjacent to other docks.
@@ -3181,7 +3196,8 @@ static bool IsUniqueStationName(const char *name)
return true;
}
-/** Rename a station
+/**
+ * Rename a station
* @param tile unused
* @param flags operation to perform
* @param p1 station ID that is to be renamed
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 30034cc16..a1ef6a764 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -721,7 +721,8 @@ const StringID CompanyStationsWindow::sorter_names[] = {
INVALID_STRING_ID
};
-/** Make a horizontal row of cargo buttons, starting at widget #SLW_CARGOSTART.
+/**
+ * Make a horizontal row of cargo buttons, starting at widget #SLW_CARGOSTART.
* @param biggest_index Pointer to store biggest used widget number of the buttons.
* @return Horizontal row.
*/
@@ -976,7 +977,8 @@ struct StationViewWindow : public Window {
}
}
- /** Order waiting cargo by type and destination.
+ /**
+ * Order waiting cargo by type and destination.
* @param cargolist [out] Ordered cargo.
* @param transfers [out] Bitmask for cargoes being transfered.
* @pre \c *cargolist must be empty.
@@ -1030,7 +1032,8 @@ struct StationViewWindow : public Window {
}
}
- /** Draw waiting cargo.
+ /**
+ * Draw waiting cargo.
* @param r Rectangle of the widget.
* @param cargolist Cargo, ordered by type and destination.
* @param transfers Bitmask for cargoes that are transfered.
@@ -1087,7 +1090,8 @@ struct StationViewWindow : public Window {
}
}
- /** Draw accepted cargo in the #SVW_ACCEPTLIST widget.
+ /**
+ * Draw accepted cargo in the #SVW_ACCEPTLIST widget.
* @param r Rectangle of the widget.
* @return Number of lines needed for drawing the accepted cargo.
*/
@@ -1104,7 +1108,8 @@ struct StationViewWindow : public Window {
return CeilDiv(bottom - r.top - WD_FRAMERECT_TOP, FONT_HEIGHT_NORMAL);
}
- /** Draw cargo ratings in the #SVW_ACCEPTLIST widget.
+ /**
+ * Draw cargo ratings in the #SVW_ACCEPTLIST widget.
* @param r Rectangle of the widget.
* @return Number of lines needed for drawing the cargo ratings.
*/
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 817faab16..9ce72c570 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -1191,7 +1191,8 @@ static inline void ottd_mkdir(const char *directory)
#endif
}
-/** Create a path consisting of an already existing path, a possible
+/**
+ * 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 */
static inline char *mkpath(char *buf, size_t buflen, const char *path, const char *file)
diff --git a/src/string.cpp b/src/string.cpp
index 414abf944..160aa15f9 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -185,7 +185,8 @@ void str_strip_colours(char *str)
*dst = '\0';
}
-/** Convert a given ASCII string to lowercase.
+/**
+ * Convert a given ASCII string to lowercase.
* NOTE: only support ASCII characters, no UTF8 fancy. As currently
* the function is only used to lowercase data-filenames if they are
* not found, this is sufficient. If more, or general functionality is
@@ -290,7 +291,8 @@ int CDECL seprintf(char *str, const char *last, const char *format, ...)
}
-/** Convert the md5sum to a hexadecimal string representation
+/**
+ * Convert the md5sum to a hexadecimal string representation
* @param buf buffer to put the md5sum into
* @param last last character of buffer (usually lastof(buf))
* @param md5sum the md5sum itself
diff --git a/src/string_func.h b/src/string_func.h
index f921397a0..082543dae 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file string_func.h Functions related to low-level strings.
+/**
+ * @file string_func.h Functions related to low-level strings.
*
* @note Be aware of "dangerous" string functions; string functions that
* have behaviour that could easily cause buffer overruns and such:
@@ -167,7 +168,8 @@ static inline WChar Utf8Consume(const char **s)
}
-/** Return the length of a UTF-8 encoded character.
+/**
+ * Return the length of a UTF-8 encoded character.
* @param c Unicode character.
* @return Length of UTF-8 encoding for character.
*/
diff --git a/src/strings.cpp b/src/strings.cpp
index 1ed0a5ea6..a04948b1a 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -94,7 +94,8 @@ const char *GetStringPtr(StringID string)
}
}
-/** The highest 8 bits of string contain the "case index".
+/**
+ * The highest 8 bits of string contain the "case index".
* These 8 bits will only be set when FormatString wants to print
* the string in a different case. No one else except FormatString
* should set those bits, therefore string CANNOT be StringID, but uint32.
@@ -170,7 +171,8 @@ char *InlineString(char *buf, StringID string)
}
-/** This function is used to "bind" a C string to a OpenTTD dparam slot.
+/**
+ * This function is used to "bind" a C string to a OpenTTD dparam slot.
* @param n slot of the string
* @param str string to bind
*/
@@ -1379,7 +1381,8 @@ bool ReadLanguagePack(int lang_index)
/* Win32 implementation in win32.cpp.
* OS X implementation in os/macosx/macos.mm. */
#if !(defined(WIN32) || defined(__APPLE__))
-/** Determine the current charset based on the environment
+/**
+ * Determine the current charset based on the environment
* First check some default values, after this one we passed ourselves
* and if none exist return the value for $LANG
* @param param environment variable to check conditionally if default ones are not
diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h
index 00139478a..06a880df0 100644
--- a/src/table/airporttiles.h
+++ b/src/table/airporttiles.h
@@ -17,7 +17,8 @@
/** Writes an airport tile without animation in the AirportTile struct */
#define AT_NOANIM {0xFFFF, 2, STR_NULL, 0, 0, 0, true, {INVALID_AIRPORTTILE, 0, NULL, NULL, INVALID_AIRPORTTILE}}
-/** All default airport tiles.
+/**
+ * All default airport tiles.
* @see AirportTiles for a list of names. */
static const AirportTileSpec _origin_airporttile_specs[] = {
/* 0..9 */
diff --git a/src/table/animcursors.h b/src/table/animcursors.h
index f0b538beb..4757c5c53 100644
--- a/src/table/animcursors.h
+++ b/src/table/animcursors.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file animcursors.h
+/**
+ * @file animcursors.h
* This file defines all the the animated cursors.
* Animated cursors consist of the number of sprites that are
* displayed in a round-robin manner. Each sprite also has a time
@@ -15,18 +16,21 @@
* is to be displayed.
*/
-/** Creates two array entries that define one
+/**
+ * Creates two array entries that define one
* status of the cursor.
* @param Sprite The Sprite to be displayed
* @param display_time The Number of ticks to display the sprite
*/
#define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time },
-/** This indicates the termination of the cursor list
+/**
+ * This indicates the termination of the cursor list
*/
#define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0)
-/** Animated cursor elements for demolishion
+/**
+ * Animated cursor elements for demolishion
*/
static const AnimCursor _demolish_animcursor[] = {
ANIM_CURSOR_LINE(0x2C0, 8)
@@ -36,7 +40,8 @@ static const AnimCursor _demolish_animcursor[] = {
ANIM_CURSOR_END()
};
-/** Animated cursor elements for lower land
+/**
+ * Animated cursor elements for lower land
*/
static const AnimCursor _lower_land_animcursor[] = {
ANIM_CURSOR_LINE(0x2BB, 10)
@@ -45,7 +50,8 @@ static const AnimCursor _lower_land_animcursor[] = {
ANIM_CURSOR_END()
};
-/** Animated cursor elements for raise land
+/**
+ * Animated cursor elements for raise land
*/
static const AnimCursor _raise_land_animcursor[] = {
ANIM_CURSOR_LINE(0x2B8, 10)
@@ -54,7 +60,8 @@ static const AnimCursor _raise_land_animcursor[] = {
ANIM_CURSOR_END()
};
-/** Animated cursor elements for the goto icon
+/**
+ * Animated cursor elements for the goto icon
*/
static const AnimCursor _order_goto_animcursor[] = {
ANIM_CURSOR_LINE(0x2CC, 10)
@@ -63,7 +70,8 @@ static const AnimCursor _order_goto_animcursor[] = {
ANIM_CURSOR_END()
};
-/** Animated cursor elements for the build signal icon
+/**
+ * Animated cursor elements for the build signal icon
*/
static const AnimCursor _build_signals_animcursor[] = {
ANIM_CURSOR_LINE(0x50C, 20)
@@ -71,7 +79,8 @@ static const AnimCursor _build_signals_animcursor[] = {
ANIM_CURSOR_END()
};
-/** This is an array of pointers to all the animated cursor
+/**
+ * This is an array of pointers to all the animated cursor
* definitions we have above. This is the only thing that is
* accessed directly from other files
*/
diff --git a/src/table/bridge_land.h b/src/table/bridge_land.h
index f5a2b7638..d1c6fefc5 100644
--- a/src/table/bridge_land.h
+++ b/src/table/bridge_land.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file bridge_land.h This file contains all the sprites for bridges
+/**
+ * @file bridge_land.h This file contains all the sprites for bridges
* It consists of a number of arrays.
* <ul><li>_bridge_sprite_table_n_m. Defines all the sprites of a bridge besides the pylons.
* n defines the number of the bridge type, m the number of the section. the highest m for
@@ -726,7 +727,8 @@ static const PalSpriteID * const * const _bridge_sprite_table[MAX_BRIDGES] = {
_bridge_sprite_table_12
};
-/** Describes the data that defines each bridge in the game
+/**
+ * Describes the data that defines each bridge in the game
* @param y year of availablity
* @param mnl minimum length (not counting bridge heads)
* @param mxl maximum length (not counting bridge heads)
diff --git a/src/table/build_industry.h b/src/table/build_industry.h
index 99165df37..b5aa117fe 100644
--- a/src/table/build_industry.h
+++ b/src/table/build_industry.h
@@ -1568,7 +1568,8 @@ static const IndustrySpec _origin_industry_specs[NEW_INDUSTRYOFFSET] = {
};
#undef MI
-/** Writes the properties of an industry tile into the IndustryTileSpec struct.
+/**
+ * Writes the properties of an industry tile into the IndustryTileSpec struct.
* @param ca1 acceptance of first cargo
* @param c1 first type of cargo accepted for this tile
* @param ca2 acceptance of second cargo
diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h
index 4c008a773..2863db781 100644
--- a/src/table/elrail_data.h
+++ b/src/table/elrail_data.h
@@ -7,13 +7,15 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file elrail_data.h Stores all the data for overhead wire and pylon drawing.
+/**
+ * @file elrail_data.h Stores all the data for overhead wire and pylon drawing.
* @see elrail.c */
#ifndef ELRAIL_DATA_H
#define ELRAIL_DATA_H
-/** Tile Location group.
+/**
+ * Tile Location group.
* This defines whether the X and or Y coordinate of a tile is even */
enum TLG {
XEVEN_YEVEN = 0,
@@ -23,7 +25,8 @@ enum TLG {
TLG_END
};
-/** When determining the pylon configuration on the edge, two tiles are taken
+/**
+ * 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 */
enum TileSource {
@@ -43,7 +46,8 @@ static const byte AllowedPPPonPCP[DIAGDIR_END] = {
1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W,
};
-/** Which of the PPPs are inside the tile. For the two PPPs on the tile border
+/**
+ * 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. */
static const byte OwnedPPPonPCP[DIAGDIR_END] = {
@@ -64,7 +68,8 @@ static const DiagDirection PCPpositions[TRACK_END][2] = {
};
#define PCP_NOT_ON_TRACK 0xFF
-/** Preferred points of each trackbit. Those are the ones perpendicular to the
+/**
+ * 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 */
@@ -106,7 +111,8 @@ static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
#define NUM_IGNORE_GROUPS 3
#define IGNORE_NONE 0xFF
-/** In case we have a staight line, we place pylon only every two tiles,
+/**
+ * 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. */
static const byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = {
@@ -395,7 +401,8 @@ static const SortableSpriteStruct CatenarySpriteData_Tunnel[] = {
};
-/** Refers to a certain element of the catenary.
+/**
+ * Refers to a certain element of the catenary.
* Identifiers for Wires:
* <ol><li>Direction of the wire</li>
* <li>Slope of the tile for diagonals, placement inside the track for horiz/vertical pieces</li>
diff --git a/src/table/engines.h b/src/table/engines.h
index 8e7d9da85..ffd29d777 100644
--- a/src/table/engines.h
+++ b/src/table/engines.h
@@ -7,14 +7,16 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file table/engines.h
+/**
+ * @file table/engines.h
* This file contains all the data for vehicles
*/
#ifndef ENGINES_H
#define ENGINES_H
-/** Writes the properties of a train or road vehicle into the EngineInfo struct.
+/**
+ * Writes the properties of a train or road vehicle into the EngineInfo struct.
* @see EngineInfo
* @param a base introduction date (days since 1920-01-01)
* @param b decay speed
@@ -27,7 +29,8 @@
*/
#define MK(a, b, c, d, e, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, e, 0, 8, 0, 0, 0, STR_EMPTY }
-/** Writes the properties of a train carriage into the EngineInfo struct.
+/**
+ * Writes the properties of a train carriage into the EngineInfo struct.
* @param a base introduction date (days since 1920-01-01)
* @param b decay speed
* @param c life length (years)
@@ -39,7 +42,8 @@
*/
#define MW(a, b, c, d, e, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 5, f, e, 0, 8, 0, 0, 0, STR_EMPTY }
-/** Writes the properties of a ship into the EngineInfo struct.
+/**
+ * Writes the properties of a ship into the EngineInfo struct.
* @param a base introduction date (days since 1920-01-01)
* @param b decay speed
* @param c life length (years)
@@ -51,7 +55,8 @@
*/
#define MS(a, b, c, d, e, f) { DAYS_TILL_ORIGINAL_BASE_YEAR + a, c, d, b, 10, f, e, 0, 8, 0, 0, 0, STR_EMPTY }
-/** Writes the properties of an aeroplane into the EngineInfo struct.
+/**
+ * Writes the properties of an aeroplane into the EngineInfo struct.
* @param a base introduction date (days since 1920-01-01)
* @param b decay speed
* @param c life length (years)
@@ -342,7 +347,8 @@ static const EngineInfo _orig_engine_info[] = {
#undef MS
#undef MA
-/** Writes the properties of a rail vehicle into the RailVehicleInfo struct.
+/**
+ * Writes the properties of a rail vehicle into the RailVehicleInfo struct.
* @see RailVehicleInfo
* @param a image_index
* @param b type
@@ -523,7 +529,8 @@ static const RailVehicleInfo _orig_rail_vehicle_info[] = {
#undef M
#undef RVI
-/** Writes the properties of a ship into the ShipVehicleInfo struct.
+/**
+ * Writes the properties of a ship into the ShipVehicleInfo struct.
* @see ShipVehicleInfo
* @param a image_index
* @param b cost_factor
@@ -553,7 +560,8 @@ static const ShipVehicleInfo _orig_ship_vehicle_info[] = {
};
#undef SVI
-/** Writes the properties of an aircraft into the AircraftVehicleInfo struct.
+/**
+ * Writes the properties of an aircraft into the AircraftVehicleInfo struct.
* @see AircraftVehicleInfo
* @param a image_index
* @param b cost_factor
@@ -622,7 +630,8 @@ static const AircraftVehicleInfo _orig_aircraft_vehicle_info[] = {
#undef H
#undef AVI
-/** Writes the properties of a road vehicle into the RoadVehicleInfo struct.
+/**
+ * Writes the properties of a road vehicle into the RoadVehicleInfo struct.
* @see RoadVehicleInfo
* @param a image_index
* @param b cost_factor
diff --git a/src/table/industry_land.h b/src/table/industry_land.h
index 561c116cc..fae7a7b8e 100644
--- a/src/table/industry_land.h
+++ b/src/table/industry_land.h
@@ -862,7 +862,8 @@ static const DrawIndustryCoordinates _drawtile_proc1[5] = {
{ 8, 41},
};
-/** this is ONLY used for Toy Factory.
+/**
+ * this is ONLY used for Toy Factory.
* 255 means no drawing
* @param img1 offset from base sprite SPR_IT_SUGAR_MINE_SIEVE
* @param img2 offset from base sprite SPR_IT_SUGAR_MINE_CLOUDS
diff --git a/src/table/railtypes.h b/src/table/railtypes.h
index d70e22954..eda7e6ff0 100644
--- a/src/table/railtypes.h
+++ b/src/table/railtypes.h
@@ -7,14 +7,16 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file railtypes.h
+/**
+ * @file railtypes.h
* All the railtype-specific information is stored here.
*/
#ifndef RAILTYPES_H
#define RAILTYPES_H
-/** Global Railtype definition
+/**
+ * Global Railtype definition
*/
static const RailtypeInfo _original_railtypes[] = {
/** Railway */
diff --git a/src/table/settings.h b/src/table/settings.h
index 255c7055e..8533f8f25 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -53,7 +53,8 @@ static bool UpdateClientConfigValues(int32 p1);
* OTTD specific INI stuff
****************************/
-/** Settings-macro usage:
+/**
+ * Settings-macro usage:
* The list might look daunting at first, but is in general easy to understand.
* We have two types of list:
* 1. SDTG_something
diff --git a/src/table/sprites.h b/src/table/sprites.h
index 2334a9c68..e5639099d 100644
--- a/src/table/sprites.h
+++ b/src/table/sprites.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file sprites.h
+/**
+ * @file sprites.h
* This file contails all sprite-related enums and defines. These consist mainly of
* the sprite numbers and a bunch of masks and macros to handle sprites and to get
* rid of all the magic numbers in the code.
@@ -1451,7 +1452,8 @@ enum Modifiers {
PALETTE_MODIFIER_COLOUR = RECOLOUR_BIT,
};
-/** Masks needed for sprite operations.
+/**
+ * Masks needed for sprite operations.
* @note Do not modify this enum. Alter SpriteSetup instead
* @see SpriteSetup */
enum SpriteMasks {
diff --git a/src/table/town_land.h b/src/table/town_land.h
index bb0915691..2055cfb26 100644
--- a/src/table/town_land.h
+++ b/src/table/town_land.h
@@ -9,7 +9,8 @@
/** @file town_land.h Sprites to use and how to display them for town tiles. */
-/** Writes the data into the Town Tile Drawing Struct
+/**
+ * Writes the data into the Town Tile Drawing Struct
* @param s1 The first sprite of the building, mostly the ground sprite
* @param p1 The first sprite's palette of the building, mostly the ground sprite
* @param s2 The second sprite of the building.
@@ -1790,7 +1791,8 @@ static const DrawBuildingsTileStruct _town_draw_tile_data[] = {
/** Make sure we have the right number of elements: 4 variants * 4 build stages for each house */
assert_compile(lengthof(_town_draw_tile_data) == (NEW_HOUSE_OFFSET) * 4 * 4);
-/** Describes the data that defines each house in the game
+/**
+ * Describes the data that defines each house in the game
* @param mnd introduction year of the house
* @param mxd last year it can be built
* @param p population
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index 9ff56545c..7dfe13fcc 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -227,7 +227,8 @@ static CommandCost TerraformTileHeight(TerraformerState *ts, TileIndex tile, int
return total_cost;
}
-/** Terraform land
+/**
+ * Terraform land
* @param tile tile to terraform
* @param flags for this command type
* @param p1 corners to terraform (SLOPE_xxx)
@@ -354,7 +355,8 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
-/** Levels a selected (rectangle) area of land
+/**
+ * Levels a selected (rectangle) area of land
* @param tile end tile of area-drag
* @param flags for this command type
* @param p1 start tile of area drag
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 920e9df4c..8f81e08d6 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -587,7 +587,8 @@ static OnButtonClick * const _editor_terraform_button_proc[] = {
};
-/** Callback function for the scenario editor 'reset landscape' confirmation window
+/**
+ * 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 */
static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
diff --git a/src/tgp.cpp b/src/tgp.cpp
index a73b18971..7e31f0637 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -204,7 +204,8 @@ static HeightMap _height_map = {NULL, 0, 0, 0, 0};
/** Maximum index into array of noise amplitudes */
static const int TGP_FREQUENCY_MAX = 6;
-/** Noise amplitudes (multiplied by 1024)
+/**
+ * Noise amplitudes (multiplied by 1024)
* - 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) */
@@ -229,7 +230,8 @@ static const int8 _max_height[4] = {
15 ///< Mountainous
};
-/** Check if a X/Y set are within the map.
+/**
+ * Check if a X/Y set are within the map.
* @param x coordinate x
* @param y coordinate y
* @return true if within the map
@@ -835,7 +837,8 @@ static void HeightMapSmoothSlopes(height_t dh_max)
}
}
-/** Height map terraform post processing:
+/**
+ * Height map terraform post processing:
* - water level adjusting
* - coast Smoothing
* - slope Smoothing
diff --git a/src/town.h b/src/town.h
index ff1ba0214..9cd4f2795 100644
--- a/src/town.h
+++ b/src/town.h
@@ -153,7 +153,8 @@ void UpdateAllTownVirtCoords();
void ShowTownViewWindow(TownID town);
void ExpandTown(Town *t);
-/** Action types that a company must ask permission for to a town authority.
+/**
+ * Action types that a company must ask permission for to a town authority.
* @see CheckforTownRating
*/
enum TownRatingCheckType {
@@ -162,12 +163,14 @@ enum TownRatingCheckType {
TOWN_RATING_CHECK_TYPE_COUNT, ///< Number of town checking action types.
};
-/** This is the number of ticks between towns being processed for building new
+/**
+ * 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. */
static const byte TOWN_GROWTH_FREQUENCY = 70;
-/** This enum is used in conjonction with town->flags.
+/**
+ * This enum is used in conjonction with town->flags.
* IT simply states what bit is used for.
* It is pretty unrealistic (IMHO) to only have one church/stadium
* per town, NO MATTER the population of it.
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index dd88b571a..8ceb95153 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -420,7 +420,8 @@ static void MakeSingleHouseBigger(TileIndex tile)
MarkTileDirtyByTile(tile);
}
-/** Make the house advance in its construction stages until completion
+/**
+ * Make the house advance in its construction stages until completion
* @param tile TileIndex of house
*/
static void MakeTownHouseBigger(TileIndex tile)
@@ -1191,7 +1192,8 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t
GrowTownWithRoad(t1, tile, rcmd);
}
-/** Returns "growth" if a house was built, or no if the build failed.
+/**
+ * Returns "growth" if a house was built, or no if the build failed.
* @param t town to inquiry
* @param tile to inquiry
* @return something other than zero(0)if town expansion was possible
@@ -1275,7 +1277,8 @@ static RoadBits GenRandomRoadBits()
return (RoadBits)((ROAD_NW << a) + (ROAD_NW << b));
}
-/** Grow the town
+/**
+ * Grow the town
* @param t town to grow
* @return true iff a house was built
*/
@@ -1761,7 +1764,8 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
static const byte _num_initial_towns[4] = {5, 11, 23, 46}; // very low, low, normal, high
-/** This function will generate a certain amount of towns, with a certain layout
+/**
+ * This function will generate a certain amount of towns, with a certain layout
* It can be called from the scenario editor (i.e.: generate Random Towns)
* as well as from world creation.
* @param layout which towns will be set to, when created
@@ -1807,7 +1811,8 @@ bool GenerateTowns(TownLayout layout)
}
-/** Returns the bit corresponding to the town zone of the specified tile
+/**
+ * Returns the bit corresponding to the town zone of the specified tile
* @param t Town on which town zone is to be found
* @param tile TileIndex where town zone needs to be found
* @return the bit position of the given zone, as defined in HouseZones
@@ -2278,7 +2283,8 @@ void ClearTownHouse(Town *t, TileIndex tile)
if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1), t, ++house);
}
-/** Rename a town (server-only).
+/**
+ * Rename a town (server-only).
* @param tile unused
* @param flags type of operation
* @param p1 town ID to rename
@@ -2334,7 +2340,8 @@ void ExpandTown(Town *t)
UpdateTownMaxPass(t);
}
-/** Factor in the cost of each town action.
+/**
+ * Factor in the cost of each town action.
* @see TownActions
*/
const byte _town_action_costs[TACT_COUNT] = {
@@ -2506,7 +2513,8 @@ static TownActionProc * const _town_action_proc[] = {
TownActionBribe
};
-/** Get a list of available actions to do at a town.
+/**
+ * Get a list of available actions to do at a town.
* @param nump if not NULL add put the number of available actions in it
* @param cid the company that is querying the town
* @param t the town that is queried
@@ -2548,7 +2556,8 @@ uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t)
return buttons;
}
-/** Do a town action.
+/**
+ * Do a town action.
* This performs an action such as advertising, building a statue, funding buildings,
* but also bribing the town-council
* @param tile unused
@@ -2617,7 +2626,8 @@ static void UpdateTownGrowRate(Town *t)
ClrBit(t->flags, TOWN_IS_FUNDED);
if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return;
- /** Towns are processed every TOWN_GROWTH_FREQUENCY ticks, and this is the
+ /**
+ * Towns are processed every TOWN_GROWTH_FREQUENCY ticks, and this is the
* 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
@@ -2702,7 +2712,8 @@ CommandCost CheckIfAuthorityAllowsNewStation(TileIndex tile, DoCommandFlag flags
return_cmd_error(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS);
}
-/** Return the town closest to the given tile within \a threshold.
+/**
+ * Return the town closest to the given tile within \a threshold.
* @param tile Starting point of the search.
* @param threshold Biggest allowed distance to the town.
* @return Closest town to \a tile within \a threshold, or \c NULL if there is no such town.
diff --git a/src/townname_type.h b/src/townname_type.h
index a9b59cd7d..e67ef9bef 100644
--- a/src/townname_type.h
+++ b/src/townname_type.h
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file townname_type.h
+/**
+ * @file townname_type.h
* Definition of structures used for generating town names.
*/
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index a0972dc1c..b8fdd412e 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -78,7 +78,8 @@ static inline DiagDirection TrainExitDir(Direction direction, TrackBits track)
}
-/** Return the cargo weight multiplier to use for a rail vehicle
+/**
+ * Return the cargo weight multiplier to use for a rail vehicle
* @param cargo Cargo type to get multiplier for
* @return Cargo weight multiplier
*/
@@ -88,7 +89,8 @@ byte FreightWagonMult(CargoID cargo)
return _settings_game.vehicle.freight_trains;
}
-/** Logs a bug in GRF and shows a warning message if this
+/**
+ * Logs a bug in GRF and shows a warning message if this
* is for the first time this happened.
* @param u first vehicle of chain
*/
@@ -679,7 +681,8 @@ static void AddRearEngineToMultiheadedTrain(Train *v)
u->other_multiheaded_part = v;
}
-/** Build a railroad vehicle.
+/**
+ * Build a railroad vehicle.
* @param tile tile of the depot where rail-vehicle is built
* @param flags type of operation
* @param p1 engine type id
@@ -1153,7 +1156,8 @@ static void NormaliseTrainHead(Train *head)
head->unitnumber = GetFreeUnitNumber(VEH_TRAIN);
}
-/** Move a rail vehicle around inside the depot.
+/**
+ * Move a rail vehicle around inside the depot.
* @param tile unused
* @param flags type of operation
* Note: DC_AUTOREPLACE is set when autoreplace tries to undo its modifications or moves vehicles to temporary locations inside the depot.
@@ -1333,7 +1337,8 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
return CommandCost();
}
-/** Sell a (single) train wagon/engine.
+/**
+ * Sell a (single) train wagon/engine.
* @param tile unused
* @param flags type of operation
* @param p1 the wagon/engine index
@@ -1815,7 +1820,8 @@ static void ReverseTrainDirection(Train *v)
}
}
-/** Reverse train.
+/**
+ * Reverse train.
* @param tile unused
* @param flags type of operation
* @param p1 train to reverse
@@ -1885,7 +1891,8 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32
return CommandCost();
}
-/** Force a train through a red signal
+/**
+ * Force a train through a red signal
* @param tile unused
* @param flags type of operation
* @param p1 train to ignore the red signal
@@ -1915,7 +1922,8 @@ CommandCost CmdForceTrainProceed(TileIndex tile, DoCommandFlag flags, uint32 p1,
return CommandCost();
}
-/** Refits a train to the specified cargo type.
+/**
+ * Refits a train to the specified cargo type.
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID of the train to refit
@@ -1960,7 +1968,8 @@ CommandCost CmdRefitRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
return cost;
}
-/** returns the tile of a depot to goto to. The given vehicle must not be
+/**
+ * returns the tile of a depot to goto to. The given vehicle must not be
* crashed! */
static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
{
@@ -1991,7 +2000,8 @@ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bo
return true;
}
-/** Send a train to a depot
+/**
+ * Send a train to a depot
* @param tile unused
* @param flags type of operation
* @param p1 train to send to the depot
@@ -3436,7 +3446,8 @@ reverse_train_direction:
ReverseTrainDirection(v);
}
-/** Collect trackbits of all crashed train vehicles on a tile
+/**
+ * Collect trackbits of all crashed train vehicles on a tile
* @param v Vehicle passed from Find/HasVehicleOnPos()
* @param data trackdirbits for the result
* @return NULL to iterate over all vehicles on the tile.
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index 3b537478b..b5b56453d 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -334,7 +334,8 @@ void GenerateTrees()
}
}
-/** Plant a tree.
+/**
+ * Plant a tree.
* @param tile start tile of area-drag of tree plantation
* @param flags type of operation
* @param p1 tree type, TREE_INVALID means random.
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 0996e0009..29e178bc9 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file tunnelbridge_cmd.cpp
+/**
+ * @file tunnelbridge_cmd.cpp
* This file deals with tunnels and bridges (non-gui stuff)
* @todo seperate this file into two
*/
@@ -66,7 +67,8 @@ void ResetBridges()
memcpy(&_bridge, &_orig_bridge, sizeof(_orig_bridge));
}
-/** Calculate the price factor for building a long bridge.
+/**
+ * Calculate the price factor for building a long bridge.
* Basically the cost delta is 1,1, 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5, 6,6,6,6,6,6, 7,7,7,7,7,7,7, 8,8,8,8,8,8,8,8,
* @param length Length of the bridge.
* @return Price factor for the bridge.
@@ -163,7 +165,8 @@ static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, uint *z)
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
}
-/** Is a bridge of the specified type and length available?
+/**
+ * Is a bridge of the specified type and length available?
* @param bridge_type Wanted type of bridge.
* @param bridge_len Wanted length of the bridge.
* @return A succeeded (the requested bridge is available) or failed (it cannot be built) command.
@@ -188,7 +191,8 @@ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoC
return_cmd_error(STR_ERROR_BRIDGE_TOO_LONG);
}
-/** Build a Bridge
+/**
+ * Build a Bridge
* @param end_tile end tile
* @param flags type of operation
* @param p1 packed start tile coords (~ dx)
@@ -486,7 +490,8 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
}
-/** Build Tunnel.
+/**
+ * Build Tunnel.
* @param start_tile start tile of tunnel
* @param flags type of operation
* @param p1 bit 0-3 railtype or roadtypes
@@ -622,7 +627,8 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
}
-/** Are we allowed to remove the tunnel or bridge at \a tile?
+/**
+ * Are we allowed to remove the tunnel or bridge at \a tile?
* @param tile End point of the tunnel or bridge.
* @return A succeeded command if the tunnel or bridge may be removed, a failed command otherwise.
*/
@@ -660,7 +666,8 @@ static inline CommandCost CheckAllowRemoveTunnelBridge(TileIndex tile)
}
}
-/** Remove a tunnel from the game, update town rating, etc.
+/**
+ * Remove a tunnel from the game, update town rating, etc.
* @param tile Tile containing one of the endpoints of the tunnel.
* @param flags Command flags.
* @return Succeeded or failed command.
@@ -726,7 +733,8 @@ static CommandCost DoClearTunnel(TileIndex tile, DoCommandFlag flags)
}
-/** Remove a bridge from the game, update town rating, etc.
+/**
+ * Remove a bridge from the game, update town rating, etc.
* @param tile Tile containing one of the endpoints of the bridge.
* @param flags Command flags.
* @return Succeeded or failed command.
@@ -802,7 +810,8 @@ static CommandCost DoClearBridge(TileIndex tile, DoCommandFlag flags)
return CommandCost(EXPENSES_CONSTRUCTION, (GetTunnelBridgeLength(tile, endtile) + 2) * base_cost);
}
-/** Remove a tunnel or a bridge from the game.
+/**
+ * Remove a tunnel or a bridge from the game.
* @param tile Tile containing one of the endpoints.
* @param flags Command flags.
* @return Succeeded or failed command.
@@ -1119,7 +1128,8 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
}
-/** Compute bridge piece. Computes the bridge piece to display depending on the position inside the bridge.
+/**
+ * Compute bridge piece. Computes the bridge piece to display depending on the position inside the bridge.
* bridges pieces sequence (middle parts).
* Note that it is not covering the bridge heads, which are always referenced by the same sprite table.
* bridge len 1: BRIDGE_PIECE_NORTH
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index ff89b909e..3df78ef7e 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -49,7 +49,8 @@ static inline const UnmovableSpec *GetUnmovableSpec(UnmovableType type)
return &_original_unmovable[type];
}
-/** Destroy a HQ.
+/**
+ * Destroy a HQ.
* During normal gameplay you can only implicitely destroy a HQ when you are
* rebuilding it. Otherwise, only water can destroy it.
* @param cid Company requesting the destruction of his HQ
@@ -100,7 +101,8 @@ void UpdateCompanyHQ(Company *c, uint score)
extern CommandCost CheckFlatLand(TileArea tile_area, DoCommandFlag flags);
-/** Build or relocate the HQ. This depends if the HQ is already built or not
+/**
+ * Build or relocate the HQ. This depends if the HQ is already built or not
* @param tile tile where the HQ will be built or relocated to
* @param flags type of operation
* @param p1 unused
@@ -134,7 +136,8 @@ CommandCost CmdBuildCompanyHQ(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
return cost;
}
-/** Purchase a land area. Actually you only purchase one tile, so
+/**
+ * Purchase a land area. Actually you only purchase one tile, so
* the name is a bit confusing ;p
* @param tile the tile the company is purchasing
* @param flags for this command type
@@ -163,7 +166,8 @@ CommandCost CmdPurchaseLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1,
return cost;
}
-/** Sell a land area. Actually you only sell one tile, so
+/**
+ * Sell a land area. Actually you only sell one tile, so
* the name is a bit confusing ;p
* @param tile the tile the company is selling
* @param flags for this command type
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 9254b8837..27365a6d4 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -68,7 +68,8 @@ byte _age_cargo_skip_counter; ///< Skip aging of cargo?
VehiclePool _vehicle_pool("Vehicle");
INSTANTIATE_POOL_METHODS(Vehicle)
-/** Function to tell if a vehicle needs to be autorenewed
+/**
+ * Function to tell if a vehicle needs to be autorenewed
* @param *c The vehicle owner
* @return true if the vehicle is old enough for replacement
*/
@@ -395,7 +396,8 @@ bool HasVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc)
return VehicleFromPos(tile, data, proc, true) != NULL;
}
-/** Callback that returns 'real' vehicles lower or at height \c *(byte*)data .
+/**
+ * Callback that returns 'real' vehicles lower or at height \c *(byte*)data .
* @param v Vehicle to examine.
* @param data Pointer to height data.
* @return \a v if conditions are met, else \c NULL.
@@ -590,7 +592,8 @@ uint CountVehiclesInChain(const Vehicle *v)
return count;
}
-/** Check if a vehicle is counted in num_engines in each company struct
+/**
+ * Check if a vehicle is counted in num_engines in each company struct
* @return true if the vehicle is counted in num_engines
*/
bool Vehicle::IsEngineCountable() const
@@ -689,7 +692,8 @@ Vehicle::~Vehicle()
DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
}
-/** Adds a vehicle to the list of vehicles, that visited a depot this tick
+/**
+ * Adds a vehicle to the list of vehicles, that visited a depot this tick
* @param *v vehicle to add
*/
void VehicleEnteredDepotThisTick(Vehicle *v)
diff --git a/src/vehicle_base.h b/src/vehicle_base.h
index f12eb16be..0ecb41e45 100644
--- a/src/vehicle_base.h
+++ b/src/vehicle_base.h
@@ -739,7 +739,8 @@ struct FreeUnitIDGenerator {
UnitID maxid; ///< maximum ID at the moment of constructor call
UnitID curid; ///< last ID returned; 0 if none
- /** Initializes the structure. Vehicle unit numbers are supposed not to change after
+ /**
+ * Initializes the structure. Vehicle unit numbers are supposed not to change after
* struct initialization, except after each call to this->NextID() the returned value
* is assigned to a vehicle.
* @param type type of vehicle
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index 2cc91b762..eb55996c9 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -61,7 +61,8 @@ const uint32 _send_to_depot_proc_table[] = {
CMD_SEND_AIRCRAFT_TO_HANGAR | CMD_MSG(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR),
};
-/** Start/Stop a vehicle
+/**
+ * Start/Stop a vehicle
* @param tile unused
* @param flags type of operation
* @param p1 vehicle to start/stop, don't forget to change CcStartStopVehicle if you modify this!
@@ -122,7 +123,8 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
return CommandCost();
}
-/** Starts or stops a lot of vehicles
+/**
+ * Starts or stops a lot of vehicles
* @param tile Tile of the depot where the vehicles are started/stopped (only used for depots)
* @param flags type of operation
* @param p1 Station/Order/Depot ID (only used for vehicle list windows)
@@ -173,7 +175,8 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32
return CommandCost();
}
-/** Sells all vehicles in a depot
+/**
+ * Sells all vehicles in a depot
* @param tile Tile of the depot where the depot is
* @param flags type of operation
* @param p1 Vehicle type
@@ -243,7 +246,8 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32
return cost;
}
-/** Learn the price of refitting a certain engine
+/**
+ * Learn the price of refitting a certain engine
* @param engine_type Which engine to refit
* @return Price for refitting
*/
@@ -335,7 +339,8 @@ CommandCost RefitVehicle(Vehicle *v, bool only_this, CargoID new_cid, byte new_s
return cost;
}
-/** Test if a name is unique among vehicle names.
+/**
+ * Test if a name is unique among vehicle names.
* @param name Name to test.
* @return True ifffffff the name is unique.
*/
@@ -350,7 +355,8 @@ static bool IsUniqueVehicleName(const char *name)
return true;
}
-/** Clone the custom name of a vehicle, adding or incrementing a number.
+/**
+ * Clone the custom name of a vehicle, adding or incrementing a number.
* @param src Source vehicle, with a custom name.
* @param dst Destination vehicle.
*/
@@ -399,7 +405,8 @@ static void CloneVehicleName(const Vehicle *src, Vehicle *dst)
/* All done. If we didn't find a name, it'll just use its default. */
}
-/** Clone a vehicle. If it is a train, it will clone all the cars too
+/**
+ * Clone a vehicle. If it is a train, it will clone all the cars too
* @param tile tile of the depot where the cloned vehicle is build
* @param flags type of operation
* @param p1 the original vehicle's index
@@ -621,7 +628,8 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, DoCommandFlag flags, bool s
return had_success ? CommandCost() : CMD_ERROR;
}
-/** Give a custom name to your vehicle
+/**
+ * Give a custom name to your vehicle
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID to name
@@ -655,7 +663,8 @@ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
-/** Change the service interval of a vehicle
+/**
+ * Change the service interval of a vehicle
* @param tile unused
* @param flags type of operation
* @param p1 vehicle ID that is being service-interval-changed
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f6e51ccd3..613f37f4a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -370,7 +370,8 @@ static void BuildRefitList(const Vehicle *v, RefitList *refit_list)
} while ((v->type == VEH_TRAIN || v->type == VEH_ROAD) && (u = u->Next()) != NULL);
}
-/** Draw the list of available refit options for a consist and highlight the selected refit option (if any).
+/**
+ * Draw the list of available refit options for a consist and highlight the selected refit option (if any).
* @param *list First vehicle in consist to get the refit-options of
* @param sel Selected refit cargo-type in the window
* @param pos Position of the selected item in caller widow
@@ -580,7 +581,8 @@ static const WindowDesc _vehicle_refit_desc(
_nested_vehicle_refit_widgets, lengthof(_nested_vehicle_refit_widgets)
);
-/** Show the refit window for a vehicle
+/**
+ * Show the refit window for a vehicle
* @param *v The vehicle to show the refit window for
* @param order of the vehicle ( ? )
* @param parent the parent window of the refit window
@@ -1855,7 +1857,8 @@ static const WindowDesc _vehicle_view_desc(
_nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
);
-/** Vehicle view window descriptor for trains. Only minimum_height and
+/**
+ * Vehicle view window descriptor for trains. Only minimum_height and
* default_height are different for train view.
*/
static const WindowDesc _train_view_desc(
@@ -1972,7 +1975,8 @@ private:
SEL_RT_BASEPLANE = SEL_RT_REFIT, ///< First plane of the #VVW_WIDGET_SELECT_REFIT_TURN stacked widget.
};
- /** Display a plane in the window.
+ /**
+ * Display a plane in the window.
* @param plane Plane to show.
*/
void SelectPlane(PlaneSelections plane)
diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h
index 51c97de31..67c2f4fa1 100644
--- a/src/vehicle_gui.h
+++ b/src/vehicle_gui.h
@@ -88,7 +88,8 @@ static inline uint GetVehicleHeight(VehicleType type)
return (type == VEH_TRAIN || type == VEH_ROAD) ? 14 : 24;
}
-/** Get WindowClass for vehicle list of given vehicle type
+/**
+ * Get WindowClass for vehicle list of given vehicle type
* @param vt vehicle type to check
* @return corresponding window class
* @note works only for company buildable vehicle types
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 26fe059ae..47df514aa 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -406,7 +406,8 @@ static void PollEvent()
}
}
-/** There are multiple modules that might be using Allegro and
+/**
+ * There are multiple modules that might be using Allegro and
* Allegro can only be initiated once. */
int _allegro_instance_count = 0;
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 56cc51a90..41102ba3b 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -7,7 +7,8 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
-/** @file viewport.cpp Handling of all viewports.
+/**
+ * @file viewport.cpp Handling of all viewports.
*
* \verbatim
* The in-game coordinate system looks like this *
@@ -108,7 +109,8 @@ enum FoundationPart {
FOUNDATION_PART_END
};
-/** Mode of "sprite combining"
+/**
+ * Mode of "sprite combining"
* @see StartSpriteCombine
*/
enum SpriteCombineMode {
@@ -448,7 +450,8 @@ Point GetTileZoomCenterWindow(bool in, Window * w)
return GetTileFromScreenXY(_cursor.pos.x, _cursor.pos.y, x + vp->left, y + vp->top);
}
-/** Update the status of the zoom-buttons according to the zoom-level
+/**
+ * Update the status of the zoom-buttons according to the zoom-level
* of the viewport. This will update their status and invalidate accordingly
* @param w Window pointer to the window that has the zoom buttons
* @param vp pointer to the viewport whose zoom-level the buttons represent
@@ -611,7 +614,8 @@ static void AddCombinedSprite(SpriteID image, PaletteID pal, int x, int y, byte
AddChildSpriteScreen(image, pal, pt.x - pstd->left, pt.y - pstd->top, false, sub);
}
-/** Draw a (transparent) sprite at given coordinates with a given bounding box.
+/**
+ * Draw a (transparent) sprite at given coordinates with a given bounding box.
* The bounding box extends from (x + bb_offset_x, y + bb_offset_y, z + bb_offset_z) to (x + w - 1, y + h - 1, z + dz - 1), both corners included.
* Bounding boxes with bb_offset_x == w or bb_offset_y == h or bb_offset_z == dz are allowed and produce thin slices.
*
@@ -1420,7 +1424,8 @@ void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom
_vd.child_screen_sprites_to_draw.Clear();
}
-/** Make sure we don't draw a too big area at a time.
+/**
+ * Make sure we don't draw a too big area at a time.
* If we do, the sprite memory will overflow. */
static void ViewportDrawChk(const ViewPort *vp, int left, int top, int right, int bottom)
{
@@ -1859,7 +1864,8 @@ void PlaceObject()
}
-/** Scrolls the viewport in a window to a given location.
+/**
+ * Scrolls the viewport in a window to a given location.
* @param x Desired x location of the map to scroll to (world coordinate).
* @param y Desired y location of the map to scroll to (world coordinate).
* @param z Desired z location of the map to scroll to (world coordinate). Use \c -1 to scroll to the height of the map at the \a x, \a y location.
@@ -1905,7 +1911,8 @@ void SetRedErrorSquare(TileIndex tile)
}
}
-/** Highlight \a w by \a h tiles at the cursor.
+/**
+ * Highlight \a w by \a h tiles at the cursor.
* @param w Width of the highlighted tiles rectangle.
* @param h Height of the highlighted tiles rectangle.
*/
@@ -2029,7 +2036,8 @@ void UpdateTileSelection()
}
}
-/** Displays the measurement tooltips when selecting multiple tiles
+/**
+ * Displays the measurement tooltips when selecting multiple tiles
* @param str String to be displayed
* @param paramcount number of params to deal with
* @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
@@ -2102,7 +2110,8 @@ static void VpStartPreSizing()
_special_mouse_mode = WSM_PRESIZE;
}
-/** returns information about the 2x1 piece to be build.
+/**
+ * returns information about the 2x1 piece to be build.
* The lower bits (0-3) are the track type. */
static HighLightStyle Check2x1AutoRail(int mode)
{
@@ -2135,7 +2144,8 @@ static HighLightStyle Check2x1AutoRail(int mode)
}
}
-/** Check if the direction of start and end tile should be swapped based on
+/**
+ * Check if the direction of start and end tile should be swapped based on
* the dragging-style. Default directions are:
* in the case of a line (HT_RAIL, HT_LINE): DIR_NE, DIR_NW, DIR_N, DIR_E
* in the case of a rect (HT_RECT, HT_POINT): DIR_S, DIR_E
@@ -2165,7 +2175,8 @@ static bool SwapDirection(HighLightStyle style, TileIndex start_tile, TileIndex
return false;
}
-/** Calculates height difference between one tile and another.
+/**
+ * Calculates height difference between one tile and another.
* Multiplies the result to suit the standard given by #TILE_HEIGHT_STEP.
*
* To correctly get the height difference we need the direction we are dragging
diff --git a/src/viewport_type.h b/src/viewport_type.h
index f815712d4..e8ca36303 100644
--- a/src/viewport_type.h
+++ b/src/viewport_type.h
@@ -82,7 +82,8 @@ enum ViewportPlaceMethod {
};
DECLARE_ENUM_AS_BIT_SET(ViewportPlaceMethod)
-/** Drag and drop selection process, or, what to do with an area of land when
+/**
+ * Drag and drop selection process, or, what to do with an area of land when
* you've selected it. */
enum ViewportDragDropSelectionProcess {
DDSP_DEMOLISH_AREA, ///< Clear area
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index a5cc258b3..82260738a 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -86,7 +86,8 @@ static void MarkCanalsAndRiversAroundDirty(TileIndex tile)
}
-/** Build a ship depot.
+/**
+ * Build a ship depot.
* @param tile tile where ship depot is built
* @param flags type of operation
* @param p1 bit 0 depot orientation (Axis)
@@ -183,7 +184,8 @@ static CommandCost RemoveShipDepot(TileIndex tile, DoCommandFlag flags)
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_DEPOT_SHIP]);
}
-/** Builds a lock.
+/**
+ * Builds a lock.
* @param tile Central tile of the lock.
* @param dir Uphill direction.
* @param flags Operation to perform.
@@ -244,7 +246,8 @@ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag
return cost;
}
-/** Remove a lock.
+/**
+ * Remove a lock.
* @param tile Central tile of the lock.
* @param flags Operation to perform.
* @return The cost in case of success, or an error code if it failed.
@@ -277,7 +280,8 @@ static CommandCost RemoveLock(TileIndex tile, DoCommandFlag flags)
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_LOCK]);
}
-/** Builds a lock.
+/**
+ * Builds a lock.
* @param tile tile where to place the lock
* @param flags type of operation
* @param p1 unused
@@ -296,7 +300,8 @@ CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
return DoBuildLock(tile, dir, flags);
}
-/** Build a piece of canal.
+/**
+ * Build a piece of canal.
* @param tile end tile of stretch-dragging
* @param flags type of operation
* @param p1 start tile of stretch-dragging
diff --git a/src/water_map.h b/src/water_map.h
index 13b52bf96..d59e5eb74 100644
--- a/src/water_map.h
+++ b/src/water_map.h
@@ -48,7 +48,8 @@ enum LockPart {
LOCK_END = 0x1C
};
-/** Get the water tile type at a tile.
+/**
+ * Get the water tile type at a tile.
* @param t Water tile to query.
* @return Water tile type at the tile.
*/
@@ -64,7 +65,8 @@ static inline WaterTileType GetWaterTileType(TileIndex t)
return WATER_TILE_DEPOT;
}
-/** Get the water class at a tile.
+/**
+ * Get the water class at a tile.
* @param t Water tile to query.
* @return Water class at the tile.
*/
@@ -74,7 +76,8 @@ static inline WaterClass GetWaterClass(TileIndex t)
return (WaterClass)(IsTileType(t, MP_INDUSTRY) ? GB(_m[t].m1, 5, 2) : GB(_m[t].m3, 0, 2));
}
-/** Set the water class at a tile.
+/**
+ * Set the water class at a tile.
* @param t Water tile to change.
* @param wc New water class.
*/
@@ -88,7 +91,8 @@ static inline void SetWaterClass(TileIndex t, WaterClass wc)
}
}
-/** Is it a plain water tile?
+/**
+ * Is it a plain water tile?
* @param t Water tile to query.
* @return \c true if any type of clear water like ocean, river, or canal.
*/
@@ -97,7 +101,8 @@ static inline bool IsWater(TileIndex t)
return GetWaterTileType(t) == WATER_TILE_CLEAR;
}
-/** Is it a sea water tile?
+/**
+ * Is it a sea water tile?
* @param t Water tile to query.
* @return \c true if it is a sea water tile.
*/
@@ -106,7 +111,8 @@ static inline bool IsSea(TileIndex t)
return IsWater(t) && GetWaterClass(t) == WATER_CLASS_SEA;
}
-/** Is it a canal tile?
+/**
+ * Is it a canal tile?
* @param t Water tile to query.
* @return \c true if it is a canal tile.
*/
@@ -115,7 +121,8 @@ static inline bool IsCanal(TileIndex t)
return IsWater(t) && GetWaterClass(t) == WATER_CLASS_CANAL;
}
-/** Is it a river water tile?
+/**
+ * Is it a river water tile?
* @param t Water tile to query.
* @return \c true if it is a river water tile.
*/
@@ -124,7 +131,8 @@ static inline bool IsRiver(TileIndex t)
return IsWater(t) && GetWaterClass(t) == WATER_CLASS_RIVER;
}
-/** Is it a water tile with plain water?
+/**
+ * Is it a water tile with plain water?
* @param t Tile to query.
* @return \c true if it is a plain water tile.
*/
@@ -133,7 +141,8 @@ static inline bool IsWaterTile(TileIndex t)
return IsTileType(t, MP_WATER) && IsWater(t);
}
-/** Is it a coast tile?
+/**
+ * Is it a coast tile?
* @param t Water tile to query.
* @return \c true if it is a sea water tile.
*/
@@ -142,7 +151,8 @@ static inline bool IsCoast(TileIndex t)
return GetWaterTileType(t) == WATER_TILE_COAST;
}
-/** Get the other tile of the ship depot.
+/**
+ * Get the other tile of the ship depot.
* @param t Tile to query, containing one section of a ship depot.
* @return Tile containing the other section of the depot.
*/
@@ -151,7 +161,8 @@ static inline TileIndex GetOtherShipDepotTile(TileIndex t)
return t + (HasBit(_m[t].m5, 0) ? -1 : 1) * (HasBit(_m[t].m5, 1) ? TileDiffXY(0, 1) : TileDiffXY(1, 0));
}
-/** Is it a water tile with a ship depot on it?
+/**
+ * Is it a water tile with a ship depot on it?
* @param t Water tile to query.
* @return \c true if it is a ship depot tile.
*/
@@ -160,7 +171,8 @@ static inline bool IsShipDepot(TileIndex t)
return IsInsideMM(_m[t].m5, DEPOT_NORTH, DEPOT_END);
}
-/** Is it a ship depot tile?
+/**
+ * Is it a ship depot tile?
* @param t Tile to query.
* @return \c true if it is a ship depot tile.
*/
@@ -169,7 +181,8 @@ static inline bool IsShipDepotTile(TileIndex t)
return IsTileType(t, MP_WATER) && IsShipDepot(t);
}
-/** Get the axis of the ship depot.
+/**
+ * Get the axis of the ship depot.
* @param t Water tile to query.
* @return Axis of the depot.
*/
@@ -178,7 +191,8 @@ static inline Axis GetShipDepotAxis(TileIndex t)
return (Axis)GB(_m[t].m5, 1, 1);
}
-/** Get the direction of the ship depot.
+/**
+ * Get the direction of the ship depot.
* @param t Water tile to query.
* @return Direction of the depot.
*/
@@ -187,7 +201,8 @@ static inline DiagDirection GetShipDepotDirection(TileIndex t)
return XYNSToDiagDir(GetShipDepotAxis(t), GB(_m[t].m5, 0, 1));
}
-/** Is it a water lock tile?
+/**
+ * Is it a water lock tile?
* @param t Water tile to query.
* @return \c true if it is a water lock tile.
*/
@@ -196,7 +211,8 @@ static inline bool IsLock(TileIndex t)
return IsInsideMM(_m[t].m5, LOCK_MIDDLE, LOCK_END);
}
-/** Get the direction of the water lock.
+/**
+ * Get the direction of the water lock.
* @param t Water tile to query.
* @return Direction of the lock.
*/
@@ -205,7 +221,8 @@ static inline DiagDirection GetLockDirection(TileIndex t)
return (DiagDirection)GB(_m[t].m5, 0, 2);
}
-/** Get a section of a depot or a lock.
+/**
+ * Get a section of a depot or a lock.
* @param t Water tile to query.
* @return The section.
*/
@@ -215,7 +232,8 @@ static inline byte GetSection(TileIndex t)
return GB(_m[t].m5, 0, 4);
}
-/** Get the random bits of the water tile.
+/**
+ * Get the random bits of the water tile.
* @param t Water tile to query.
* @return Random bits of the tile.
*/
@@ -312,7 +330,8 @@ static inline void MakeShipDepot(TileIndex t, Owner o, DepotID did, DepotPart ba
_me[t].m7 = 0;
}
-/** Make a lock section.
+/**
+ * Make a lock section.
* @param t Tile to place the water lock section.
* @param o Owner of the lock.
* @param section Section to place.
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index cf333f4ed..2d832c924 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -139,7 +139,8 @@ extern void GetStationLayout(byte *layout, int numtracks, int plat_len, const St
extern CommandCost FindJoiningWaypoint(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Waypoint **wp);
extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta, Axis axis);
-/** Convert existing rail to waypoint. Eg build a waypoint station over
+/**
+ * Convert existing rail to waypoint. Eg build a waypoint station over
* piece of rail
* @param start_tile northern most tile where waypoint will be built
* @param flags type of operation
@@ -270,7 +271,8 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
return CommandCost(EXPENSES_CONSTRUCTION, count * _price[PR_BUILD_WAYPOINT_RAIL]);
}
-/** Build a buoy.
+/**
+ * Build a buoy.
* @param tile tile where to place the bouy
* @param flags operation to perform
* @param p1 unused
diff --git a/src/widget.cpp b/src/widget.cpp
index 304ffb6d3..484f632ce 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -141,7 +141,8 @@ static void ScrollbarClickPositioning(Window *w, WidgetType wtp, int x, int y, i
w->SetDirty();
}
-/** Special handling for the scrollbar widget type.
+/**
+ * Special handling for the scrollbar widget type.
* Handles the special scrolling buttons and other scrolling.
* @param w Window on which a scroll was performed.
* @param nw Pointer to the scrollbar widget.
@@ -176,7 +177,8 @@ void ScrollbarClickHandler(Window *w, const NWidgetCore *nw, int x, int y)
ScrollbarClickPositioning(w, nw->type, x, y, mi, ma);
}
-/** Returns the index for the widget located at the given position
+/**
+ * Returns the index for the widget located at the given position
* relative to the window. It includes all widget-corner pixels as well.
* @param *w Window to look inside
* @param x The Window client X coordinate
@@ -1033,7 +1035,8 @@ NWidgetCore *NWidgetStacked::GetWidgetFromPos(int x, int y)
return NULL;
}
-/** Select which plane to show (for #NWID_SELECTION only).
+/**
+ * Select which plane to show (for #NWID_SELECTION only).
* @param plane Plane number to display.
*/
void NWidgetStacked::SetDisplayedPlane(int plane)
@@ -2355,7 +2358,8 @@ NWidgetContainer *MakeNWidgets(const NWidgetPart *parts, int count, int *biggest
return container;
}
-/** Make a nested widget tree for a window from a parts array. Besides loading, it inserts a shading selection widget
+/**
+ * Make a nested widget tree for a window from a parts array. Besides loading, it inserts a shading selection widget
* between the title bar and the window body if the first widget in the parts array looks like a title bar (it is a horizontal
* container with a caption widget) and has a shade box widget.
* @param parts Array with parts of the widgets.
diff --git a/src/widget_type.h b/src/widget_type.h
index fcb8aa4d0..3711b569d 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -219,7 +219,8 @@ FORCEINLINE void NWidgetBase::StoreSizePosition(SizingType sizing, uint x, uint
}
-/** Base class for a resizable nested widget.
+/**
+ * Base class for a resizable nested widget.
* @ingroup NestedWidgets */
class NWidgetResizeBase : public NWidgetBase {
public:
@@ -257,7 +258,8 @@ enum NWidgetDisplay {
};
DECLARE_ENUM_AS_BIT_SET(NWidgetDisplay)
-/** Base class for a 'real' widget.
+/**
+ * Base class for a 'real' widget.
* @ingroup NestedWidgets */
class NWidgetCore : public NWidgetResizeBase {
public:
@@ -314,7 +316,8 @@ inline bool NWidgetCore::IsDisabled() const
}
-/** Baseclass for container widgets.
+/**
+ * Baseclass for container widgets.
* @ingroup NestedWidgets */
class NWidgetContainer : public NWidgetBase {
public:
@@ -343,7 +346,8 @@ enum StackedZeroSizePlanes {
SZSP_BEGIN = SZSP_VERTICAL, ///< First zero-size plane.
};
-/** Stacked widgets, widgets all occupying the same space in the window.
+/**
+ * Stacked widgets, widgets all occupying the same space in the window.
* #NWID_SELECTION allows for selecting one of several panels (planes) to tbe displayed. All planes must have the same size.
* Since all planes are also initialized, switching between different planes can be done while the window is displayed.
*
@@ -397,7 +401,8 @@ protected:
uint8 pip_post; ///< Amount of space after last widget.
};
-/** Horizontal container.
+/**
+ * Horizontal container.
* @ingroup NestedWidgets */
class NWidgetHorizontal : public NWidgetPIPContainer {
public:
@@ -407,7 +412,8 @@ public:
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl);
};
-/** Horizontal container that doesn't change the direction of the widgets for RTL languages.
+/**
+ * Horizontal container that doesn't change the direction of the widgets for RTL languages.
* @ingroup NestedWidgets */
class NWidgetHorizontalLTR : public NWidgetHorizontal {
public:
@@ -416,7 +422,8 @@ public:
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl);
};
-/** Vertical container.
+/**
+ * Vertical container.
* @ingroup NestedWidgets */
class NWidgetVertical : public NWidgetPIPContainer {
public:
@@ -427,7 +434,8 @@ public:
};
-/** Spacer widget.
+/**
+ * Spacer widget.
* @ingroup NestedWidgets */
class NWidgetSpacer : public NWidgetResizeBase {
public:
@@ -441,7 +449,8 @@ public:
/* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y);
};
-/** Nested widget with a child.
+/**
+ * Nested widget with a child.
* @ingroup NestedWidgets */
class NWidgetBackground : public NWidgetCore {
public:
@@ -485,7 +494,8 @@ public:
void UpdateViewportCoordinates(Window *w);
};
-/** Leaf widget.
+/**
+ * Leaf widget.
* @ingroup NestedWidgets */
class NWidgetLeaf : public NWidgetCore {
public:
@@ -569,33 +579,38 @@ static FORCEINLINE uint ComputeMaxSize(uint base, uint max_space, uint step)
* @see NestedWidgets
*/
-/** Widget part for storing data and tooltip information.
+/**
+ * Widget part for storing data and tooltip information.
* @ingroup NestedWidgetParts */
struct NWidgetPartDataTip {
uint16 data; ///< Data value of the widget.
StringID tooltip; ///< Tooltip of the widget.
};
-/** Widget part for storing basic widget information.
+/**
+ * Widget part for storing basic widget information.
* @ingroup NestedWidgetParts */
struct NWidgetPartWidget {
Colours colour; ///< Widget colour.
int16 index; ///< Widget index in the widget array.
};
-/** Widget part for storing padding.
+/**
+ * Widget part for storing padding.
* @ingroup NestedWidgetParts */
struct NWidgetPartPaddings {
uint8 top, right, bottom, left; ///< Paddings for all directions.
};
-/** Widget part for storing pre/inter/post spaces.
+/**
+ * Widget part for storing pre/inter/post spaces.
* @ingroup NestedWidgetParts */
struct NWidgetPartPIP {
uint8 pre, inter, post; ///< Amount of space before/between/after child widgets.
};
-/** Widget part for storing minimal text line data.
+/**
+ * Widget part for storing minimal text line data.
* @ingroup NestedWidgetParts */
struct NWidgetPartTextLines {
uint8 lines; ///< Number of text lines.
@@ -603,14 +618,16 @@ struct NWidgetPartTextLines {
FontSize size; ///< Font size of text lines.
};
-/** Pointer to function returning a nested widget.
+/**
+ * Pointer to function returning a nested widget.
* @param biggest_index Pointer to storage for collecting the biggest index used in the nested widget.
* @return Nested widget (tree).
* @post \c *biggest_index must contain the value of the biggest index in the returned tree.
*/
typedef NWidgetBase *NWidgetFunctionType(int *biggest_index);
-/** Partial widget specification to allow NWidgets to be written nested.
+/**
+ * Partial widget specification to allow NWidgets to be written nested.
* @ingroup NestedWidgetParts */
struct NWidgetPart {
WidgetType type; ///< Type of the part. @see NWidgetPartType.
@@ -710,7 +727,8 @@ static inline NWidgetPart EndContainer()
return part;
}
-/** Widget part function for setting the data and tooltip.
+/**
+ * Widget part function for setting the data and tooltip.
* @param data Data of the widget.
* @param tip Tooltip of the widget.
* @ingroup NestedWidgetParts
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 7bac59bb3..c3c99ad7a 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -100,7 +100,8 @@ struct DropdownWindow : Window {
int scrolling; ///< If non-zero, auto-scroll the item list (one time).
Point position; ///< Position of the topleft corner of the window.
- /** Create a dropdown menu.
+ /**
+ * Create a dropdown menu.
* @param parent Parent window.
* @param list Dropdown item list.
* @param selected Index of the selected item in the list.
@@ -179,7 +180,8 @@ struct DropdownWindow : Window {
return this->position;
}
- /** Find the dropdown item under the cursor.
+ /**
+ * Find the dropdown item under the cursor.
* @param value [out] Selected item, if function returns \c true.
* @return Cursor points to a dropdown item.
*/
@@ -408,7 +410,8 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll);
}
-/** Show a dropdown menu window near a widget of the parent window.
+/**
+ * Show a dropdown menu window near a widget of the parent window.
* The result code of the items is their index in the #strings list.
* @param w Parent window that wants the dropdown menu.
* @param strings Menu list, end with #INVALID_STRING_ID
diff --git a/src/window.cpp b/src/window.cpp
index d6e93ca5f..f9532188b 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -573,7 +573,8 @@ void Window::SetDirty() const
SetDirtyBlocks(this->left, this->top, this->left + this->width, this->top + this->height);
}
-/** Re-initialize a window, and optionally change its size.
+/**
+ * Re-initialize a window, and optionally change its size.
* @param rx Horizontal resize of the window.
* @param ry Vertical resize of the window.
* @note For just resizing the window, use #ResizeWindow instead.
@@ -609,7 +610,8 @@ void Window::ReInit(int rx, int ry)
/* ResizeWindow() does this->SetDirty() already, no need to do it again here. */
}
-/** Set the shaded state of the window to \a make_shaded.
+/**
+ * Set the shaded state of the window to \a make_shaded.
* @param make_shaded If \c true, shade the window (roll up until just the title bar is visible), else unshade/unroll the window to its original size.
* @note The method uses #Window::ReInit(), thus after the call, the whole window should be considered changed.
*/
@@ -633,7 +635,8 @@ void Window::SetShaded(bool make_shaded)
}
}
-/** Find the Window whose parent pointer points to this window
+/**
+ * Find the Window whose parent pointer points to this window
* @param w parent Window to find child of
* @param wc Window class of the window to remove; WC_INVALID if class does not matter
* @return a Window pointer that is the child of w, or NULL otherwise
@@ -757,7 +760,8 @@ restart_search:
}
}
-/** Delete all windows of a company. We identify windows of a company
+/**
+ * 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 */
@@ -780,7 +784,8 @@ restart_search:
DeleteWindowById(WC_BUY_COMPANY, id);
}
-/** Change the owner of all the windows one company can take over from another
+/**
+ * Change the owner of all the windows one company can take over from another
* 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
@@ -812,7 +817,8 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner)
static void BringWindowToFront(Window *w);
-/** Find a window and make it the top-window on the screen.
+/**
+ * Find a window and make it the top-window on the screen.
* 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
@@ -846,7 +852,8 @@ static inline bool IsVitalWindow(const Window *w)
}
}
-/** On clicking on a window, make it the frontmost window of all. However
+/**
+ * On clicking on a window, make it the frontmost window of all. However
* there are certain windows that always need to be on-top; these include
* - Toolbar, Statusbar (always on)
* - New window, Chatbar (only if open)
@@ -1310,7 +1317,8 @@ Window::Window() : hscroll(false), vscroll(true), vscroll2(true)
{
}
-/** Do a search for a window at specific coordinates. For this we start
+/**
+ * Do a search for a window at specific coordinates. For this we start
* 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
@@ -1416,7 +1424,8 @@ static void HandlePlacePresize()
w->OnPlacePresize(pt, TileVirtXY(pt.x, pt.y));
}
-/** Handle drop in mouse dragging mode (#WSM_DRAGDROP).
+/**
+ * Handle drop in mouse dragging mode (#WSM_DRAGDROP).
* @return State of handling the event.
*/
static EventState HandleDragDrop()
@@ -1439,7 +1448,8 @@ static EventState HandleDragDrop()
return ES_HANDLED;
}
-/** Handle dragging in mouse dragging mode (#WSM_DRAGDROP).
+/**
+ * Handle dragging in mouse dragging mode (#WSM_DRAGDROP).
* @return State of handling the event.
*/
static EventState HandleMouseDrag()
@@ -1512,7 +1522,8 @@ void ResizeWindow(Window *w, int delta_x, int delta_y)
w->SetDirty();
}
-/** Return the top of the main view available for general use.
+/**
+ * Return the top of the main view available for general use.
* @return Uppermost vertical coordinate available.
* @note Above the upper y coordinate is often the main toolbar.
*/
@@ -1522,7 +1533,8 @@ int GetMainViewTop()
return (w == NULL) ? 0 : w->top + w->height;
}
-/** Return the bottom of the main view available for general use.
+/**
+ * Return the bottom of the main view available for general use.
* @return The vertical coordinate of the first unusable row, so 'top + height <= bottom' gives the correct result.
* @note At and below the bottom y coordinate is often the status bar.
*/
@@ -1584,7 +1596,8 @@ static void PreventHiding(int *nx, int *ny, const Rect &rect, const Window *v, i
static bool _dragging_window; ///< A window is being dragged or resized.
-/** Handle dragging/resizing of a window.
+/**
+ * Handle dragging/resizing of a window.
* @return State of handling the event.
*/
static EventState HandleWindowDragging()
@@ -1809,7 +1822,8 @@ static void StartWindowSizing(Window *w, bool to_left)
DeleteWindowById(WC_DROPDOWN_MENU, 0);
}
-/** handle scrollbar scrolling with the mouse.
+/**
+ * handle scrollbar scrolling with the mouse.
* @return State of handling the event.
*/
static EventState HandleScrollbarScrolling()
@@ -1860,7 +1874,8 @@ static EventState HandleScrollbarScrolling()
return ES_HANDLED;
}
-/** Handle viewport scrolling with the mouse.
+/**
+ * Handle viewport scrolling with the mouse.
* @return State of handling the event.
*/
static EventState HandleViewportScroll()
@@ -1909,7 +1924,8 @@ static EventState HandleViewportScroll()
return ES_HANDLED;
}
-/** Check if a window can be made top-most window, and if so do
+/**
+ * Check if a window can be made top-most window, and if so do
* it. If a window does not obscure any other windows, it will not
* be brought to the foreground. Also if the only obscuring windows
* are so-called system-windows, the window will not be moved.
@@ -1967,7 +1983,8 @@ static bool MaybeBringWindowToFront(Window *w)
return true;
}
-/** Handle keyboard input.
+/**
+ * Handle keyboard input.
* @param raw_key Lower 8 bits contain the ASCII character, the higher 16 bits the keycode
*/
void HandleKeypress(uint32 raw_key)
@@ -2542,7 +2559,8 @@ restart_search:
}
}
-/** It is possible that a stickied window gets to a position where the
+/**
+ * It is possible that a stickied window gets to a position where the
* '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
@@ -2738,7 +2756,8 @@ void RelocateAllWindows(int neww, int newh)
}
}
-/** Destructor of the base class PickerWindowBase
+/**
+ * Destructor of the base class PickerWindowBase
* Main utility is to stop the base Window destructor from triggering
* a free while the child will already be free, in this case by the ResetObjectToPlace().
*/
diff --git a/src/window_gui.h b/src/window_gui.h
index 49d69ec8b..38a8759d7 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -813,7 +813,8 @@ public:
virtual void ShowNewGRFInspectWindow() const { NOT_REACHED(); }
};
-/** Get the nested widget with number \a widnum from the nested widget tree.
+/**
+ * Get the nested widget with number \a widnum from the nested widget tree.
* @tparam NWID Type of the nested widget.
* @param widnum Widget number of the widget to retrieve.
* @return The requested widget if it is instantiated, \c NULL otherwise.
@@ -835,7 +836,8 @@ inline const NWidgetBase *Window::GetWidget<NWidgetBase>(uint widnum) const
return this->nested_array[widnum];
}
-/** Get the nested widget with number \a widnum from the nested widget tree.
+/**
+ * Get the nested widget with number \a widnum from the nested widget tree.
* @tparam NWID Type of the nested widget.
* @param widnum Widget number of the widget to retrieve.
* @return The requested widget if it is instantiated, \c NULL otherwise.