mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
Doc: Lots and lots of doxymentation fixes
This commit is contained in:
parent
b9273cbe07
commit
f5b1115039
7
Doxyfile
7
Doxyfile
@ -14,7 +14,7 @@ PROJECT_NUMBER =
|
|||||||
PROJECT_BRIEF =
|
PROJECT_BRIEF =
|
||||||
PROJECT_LOGO =
|
PROJECT_LOGO =
|
||||||
OUTPUT_DIRECTORY = docs/source/
|
OUTPUT_DIRECTORY = docs/source/
|
||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = YES
|
||||||
ALLOW_UNICODE_NAMES = NO
|
ALLOW_UNICODE_NAMES = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
@ -72,7 +72,7 @@ EXTRACT_PACKAGE = NO
|
|||||||
EXTRACT_STATIC = YES
|
EXTRACT_STATIC = YES
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
EXTRACT_LOCAL_METHODS = YES
|
EXTRACT_LOCAL_METHODS = YES
|
||||||
EXTRACT_ANON_NSPACES = NO
|
EXTRACT_ANON_NSPACES = YES
|
||||||
HIDE_UNDOC_MEMBERS = NO
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
HIDE_UNDOC_CLASSES = NO
|
HIDE_UNDOC_CLASSES = NO
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
@ -130,7 +130,6 @@ RECURSIVE = YES
|
|||||||
EXCLUDE =
|
EXCLUDE =
|
||||||
EXCLUDE_SYMLINKS = NO
|
EXCLUDE_SYMLINKS = NO
|
||||||
EXCLUDE_PATTERNS = */3rdparty \
|
EXCLUDE_PATTERNS = */3rdparty \
|
||||||
*/.svn \
|
|
||||||
*/script/api
|
*/script/api
|
||||||
EXCLUDE_SYMBOLS =
|
EXCLUDE_SYMBOLS =
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH =
|
||||||
@ -183,7 +182,7 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
|
|||||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
DOCSET_PUBLISHER_NAME = Publisher
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
GENERATE_HTMLHELP = YES
|
GENERATE_HTMLHELP = NO
|
||||||
CHM_FILE =
|
CHM_FILE =
|
||||||
HHC_LOCATION =
|
HHC_LOCATION =
|
||||||
GENERATE_CHI = NO
|
GENERATE_CHI = NO
|
||||||
|
@ -248,7 +248,7 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoff
|
|||||||
* @param flags type of operation.
|
* @param flags type of operation.
|
||||||
* @param e the engine to build.
|
* @param e the engine to build.
|
||||||
* @param data unused.
|
* @param data unused.
|
||||||
* @param ret[out] the vehicle that has been built.
|
* @param[out] ret the vehicle that has been built.
|
||||||
* @return the cost of this operation or an error.
|
* @return the cost of this operation or an error.
|
||||||
*/
|
*/
|
||||||
CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
||||||
@ -694,9 +694,9 @@ int GetTileHeightBelowAircraft(const Vehicle *v)
|
|||||||
* When the maximum is reached the vehicle should consider descending.
|
* When the maximum is reached the vehicle should consider descending.
|
||||||
* When the minimum is reached the vehicle should consider ascending.
|
* When the minimum is reached the vehicle should consider ascending.
|
||||||
*
|
*
|
||||||
* @param v The vehicle to get the flight levels for.
|
* @param v The vehicle to get the flight levels for.
|
||||||
* @param [out] min_level The minimum bounds for flight level.
|
* @param[out] min_level The minimum bounds for flight level.
|
||||||
* @param [out] max_level The maximum bounds for flight level.
|
* @param[out] max_level The maximum bounds for flight level.
|
||||||
*/
|
*/
|
||||||
void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_level)
|
void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_level)
|
||||||
{
|
{
|
||||||
@ -728,7 +728,7 @@ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_lev
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the maximum 'flight level' for the holding pattern of the aircraft,
|
* Gets the maximum 'flight level' for the holding pattern of the aircraft,
|
||||||
* in pixels 'z_pos' 0, depending on terrain below..
|
* in pixels 'z_pos' 0, depending on terrain below.
|
||||||
*
|
*
|
||||||
* @param v The aircraft that may or may not need to decrease its altitude.
|
* @param v The aircraft that may or may not need to decrease its altitude.
|
||||||
* @return Maximal aircraft holding altitude, while in normal flight, in pixels.
|
* @return Maximal aircraft holding altitude, while in normal flight, in pixels.
|
||||||
@ -1889,7 +1889,7 @@ static bool FreeTerminal(Aircraft *v, byte i, byte last_terminal)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of terminals at the airport.
|
* Get the number of terminals at the airport.
|
||||||
* @param afc Airport description.
|
* @param apc Airport description.
|
||||||
* @return Number of terminals.
|
* @return Number of terminals.
|
||||||
*/
|
*/
|
||||||
static uint GetNumTerminals(const AirportFTAClass *apc)
|
static uint GetNumTerminals(const AirportFTAClass *apc)
|
||||||
|
@ -32,7 +32,6 @@ extern void ChangeVehicleViewWindow(VehicleID from_index, VehicleID to_index);
|
|||||||
* Figure out if two engines got at least one type of cargo in common (refitting if needed)
|
* 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_a one of the EngineIDs
|
||||||
* @param engine_b the other EngineID
|
* @param engine_b the other EngineID
|
||||||
* @param type the type of the engines
|
|
||||||
* @return true if they can both carry the same type of cargo (or at least one of them got no capacity at all)
|
* @return true if they can both carry the same type of cargo (or at least one of them got no capacity at all)
|
||||||
*/
|
*/
|
||||||
static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b)
|
static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b)
|
||||||
@ -237,7 +236,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool
|
|||||||
* @param v The vehicle to find a replacement for
|
* @param v The vehicle to find a replacement for
|
||||||
* @param c The vehicle's owner (it's faster to forward the pointer than refinding it)
|
* @param c The vehicle's owner (it's faster to forward the pointer than refinding it)
|
||||||
* @param always_replace Always replace, even if not old.
|
* @param always_replace Always replace, even if not old.
|
||||||
* @param [out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found
|
* @param[out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found
|
||||||
* @return Error if the engine to build is not available
|
* @return Error if the engine to build is not available
|
||||||
*/
|
*/
|
||||||
static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, bool always_replace, EngineID &e)
|
static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, bool always_replace, EngineID &e)
|
||||||
|
@ -81,7 +81,7 @@ class ReplaceVehicleWindow : public Window {
|
|||||||
EngineID sel_engine[2]; ///< Selected engine left and right.
|
EngineID sel_engine[2]; ///< Selected engine left and right.
|
||||||
GUIEngineList engines[2]; ///< Left and right list of engines.
|
GUIEngineList engines[2]; ///< Left and right list of engines.
|
||||||
bool replace_engines; ///< If \c true, engines are replaced, if \c false, wagons are replaced (only for trains).
|
bool replace_engines; ///< If \c true, engines are replaced, if \c false, wagons are replaced (only for trains).
|
||||||
bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right (#update_left and/or #update_right) and no valid engine selected.
|
bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right and no valid engine selected.
|
||||||
GroupID sel_group; ///< Group selected to replace.
|
GroupID sel_group; ///< Group selected to replace.
|
||||||
int details_height; ///< Minimal needed height of the details panels (found so far).
|
int details_height; ///< Minimal needed height of the details panels (found so far).
|
||||||
byte sort_criteria; ///< Criteria of sorting vehicles.
|
byte sort_criteria; ///< Criteria of sorting vehicles.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file 32bpp_sse4_anim.cpp Implementation of the SSE4 32 bpp blitter with animation support. */
|
/** @file 32bpp_anim_sse4.cpp Implementation of the SSE4 32 bpp blitter with animation support. */
|
||||||
|
|
||||||
#ifdef WITH_SSE
|
#ifdef WITH_SSE
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file 32bpp_sse4_anim.hpp A SSE4 32 bpp blitter with animation support. */
|
/** @file 32bpp_anim_sse4.hpp A SSE4 32 bpp blitter with animation support. */
|
||||||
|
|
||||||
#ifndef BLITTER_32BPP_SSE4_ANIM_HPP
|
#ifndef BLITTER_32BPP_SSE4_ANIM_HPP
|
||||||
#define BLITTER_32BPP_SSE4_ANIM_HPP
|
#define BLITTER_32BPP_SSE4_ANIM_HPP
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @file 32bpp_sse_type.hpp Types related to SSE 32 bpp blitter. */
|
/** @file 32bpp_sse_type.h Types related to SSE 32 bpp blitter. */
|
||||||
|
|
||||||
#ifndef BLITTER_32BPP_SSE_TYPE_HPP
|
#ifndef BLITTER_32BPP_SSE_TYPE_H
|
||||||
#define BLITTER_32BPP_SSE_TYPE_HPP
|
#define BLITTER_32BPP_SSE_TYPE_H
|
||||||
|
|
||||||
#ifdef WITH_SSE
|
#ifdef WITH_SSE
|
||||||
|
|
||||||
@ -55,4 +55,4 @@ typedef union ALIGN(16) um128i {
|
|||||||
#define TRANSPARENT_NOM_BASE _mm_setr_epi16(256, 256, 256, 256, 256, 256, 256, 256)
|
#define TRANSPARENT_NOM_BASE _mm_setr_epi16(256, 256, 256, 256, 256, 256, 256, 256)
|
||||||
|
|
||||||
#endif /* WITH_SSE */
|
#endif /* WITH_SSE */
|
||||||
#endif /* BLITTER_32BPP_SSE_TYPE_HPP */
|
#endif /* BLITTER_32BPP_SSE_TYPE_H */
|
||||||
|
@ -56,7 +56,7 @@ TileIndex GetSouthernBridgeEnd(TileIndex t)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Starting at one bridge end finds the other bridge end
|
* Starting at one bridge end finds the other bridge end
|
||||||
* @param t the bridge ramp tile to find the other bridge ramp for
|
* @param tile the bridge ramp tile to find the other bridge ramp for
|
||||||
*/
|
*/
|
||||||
TileIndex GetOtherBridgeEnd(TileIndex tile)
|
TileIndex GetOtherBridgeEnd(TileIndex tile)
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ TileIndex GetOtherBridgeEnd(TileIndex tile)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the height ('z') of a bridge.
|
* Get the height ('z') of a bridge.
|
||||||
* @param tile the bridge ramp tile to get the bridge height from
|
* @param t the bridge ramp tile to get the bridge height from
|
||||||
* @return the height of the bridge.
|
* @return the height of the bridge.
|
||||||
*/
|
*/
|
||||||
int GetBridgeHeight(TileIndex t)
|
int GetBridgeHeight(TileIndex t)
|
||||||
|
@ -602,7 +602,7 @@ uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList:
|
|||||||
* Returns reserved cargo to the station and removes it from the cache.
|
* Returns reserved cargo to the station and removes it from the cache.
|
||||||
* @param max_move Maximum amount of cargo to move.
|
* @param max_move Maximum amount of cargo to move.
|
||||||
* @param dest Station the cargo is returned to.
|
* @param dest Station the cargo is returned to.
|
||||||
* @param ID of next the station the cargo wants to go next.
|
* @param next ID of the next station the cargo wants to go to.
|
||||||
* @return Amount of cargo actually returned.
|
* @return Amount of cargo actually returned.
|
||||||
*/
|
*/
|
||||||
uint VehicleCargoList::Return(uint max_move, StationCargoList *dest, StationID next)
|
uint VehicleCargoList::Return(uint max_move, StationCargoList *dest, StationID next)
|
||||||
@ -668,7 +668,7 @@ uint VehicleCargoList::Truncate(uint max_move)
|
|||||||
* @param dest List to prepend the cargo to.
|
* @param dest List to prepend the cargo to.
|
||||||
* @param avoid Station to exclude from routing and current next hop of packets to reroute.
|
* @param avoid Station to exclude from routing and current next hop of packets to reroute.
|
||||||
* @param avoid2 Additional station to exclude from routing.
|
* @param avoid2 Additional station to exclude from routing.
|
||||||
* @oaram ge GoodsEntry to get the routing info from.
|
* @param ge GoodsEntry to get the routing info from.
|
||||||
*/
|
*/
|
||||||
uint VehicleCargoList::Reroute(uint max_move, VehicleCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge)
|
uint VehicleCargoList::Reroute(uint max_move, VehicleCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge)
|
||||||
{
|
{
|
||||||
@ -859,7 +859,7 @@ uint StationCargoList::Load(uint max_move, VehicleCargoList *dest, TileIndex loa
|
|||||||
* @param dest List to append the cargo to.
|
* @param dest List to append the cargo to.
|
||||||
* @param avoid Station to exclude from routing and current next hop of packets to reroute.
|
* @param avoid Station to exclude from routing and current next hop of packets to reroute.
|
||||||
* @param avoid2 Additional station to exclude from routing.
|
* @param avoid2 Additional station to exclude from routing.
|
||||||
* @oaram ge GoodsEntry to get the routing info from.
|
* @param ge GoodsEntry to get the routing info from.
|
||||||
*/
|
*/
|
||||||
uint StationCargoList::Reroute(uint max_move, StationCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge)
|
uint StationCargoList::Reroute(uint max_move, StationCargoList *dest, StationID avoid, StationID avoid2, const GoodsEntry *ge)
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,6 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
|||||||
/**
|
/**
|
||||||
* Helper to deduplicate the code for returning.
|
* Helper to deduplicate the code for returning.
|
||||||
* @param cmd the command cost to return.
|
* @param cmd the command cost to return.
|
||||||
* @param clear whether to keep the storage changes or not.
|
|
||||||
*/
|
*/
|
||||||
#define return_dcpi(cmd) { _docommand_recursive = 0; return cmd; }
|
#define return_dcpi(cmd) { _docommand_recursive = 0; return cmd; }
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ struct CompanyProperties {
|
|||||||
*/
|
*/
|
||||||
bool is_ai;
|
bool is_ai;
|
||||||
|
|
||||||
Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #Expenses category.
|
Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #ExpensesType category.
|
||||||
CompanyEconomyEntry cur_economy; ///< Economic data of the company of this quarter.
|
CompanyEconomyEntry cur_economy; ///< Economic data of the company of this quarter.
|
||||||
CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters.
|
CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters.
|
||||||
byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy.
|
byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy.
|
||||||
|
@ -188,7 +188,7 @@ void InvalidateCompanyWindows(const Company *company)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify whether the company can pay the bill.
|
* Verify whether the company can pay the bill.
|
||||||
* @param cost [inout] Money to pay, is changed to an error if the company does not have enough money.
|
* @param[in,out] cost Money to pay, is changed to an error if the company does not have enough money.
|
||||||
* @return Function returns \c true if the company has enough money, else it returns \c false.
|
* @return Function returns \c true if the company has enough money, else it returns \c false.
|
||||||
*/
|
*/
|
||||||
bool CheckCompanyHasMoney(CommandCost &cost)
|
bool CheckCompanyHasMoney(CommandCost &cost)
|
||||||
|
@ -268,10 +268,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = {
|
|||||||
EndContainer(),
|
EndContainer(),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** Window class displaying the company finances. */
|
||||||
* Window class displaying the company finances.
|
|
||||||
* @todo #money_width should be calculated dynamically.
|
|
||||||
*/
|
|
||||||
struct CompanyFinancesWindow : Window {
|
struct CompanyFinancesWindow : Window {
|
||||||
static Money max_money; ///< The maximum amount of money a company has had this 'run'
|
static Money max_money; ///< The maximum amount of money a company has had this 'run'
|
||||||
bool small; ///< Window is toggled to 'small'.
|
bool small; ///< Window is toggled to 'small'.
|
||||||
@ -1509,9 +1506,6 @@ static WindowDesc _select_company_manager_face_desc(
|
|||||||
* Open the simple/advanced company manager face selection window
|
* Open the simple/advanced company manager face selection window
|
||||||
*
|
*
|
||||||
* @param parent the parent company window
|
* @param parent the parent company window
|
||||||
* @param adv simple or advanced face selection window
|
|
||||||
* @param top previous top position of the window
|
|
||||||
* @param left previous left position of the window
|
|
||||||
*/
|
*/
|
||||||
static void DoSelectCompanyManagerFace(Window *parent)
|
static void DoSelectCompanyManagerFace(Window *parent)
|
||||||
{
|
{
|
||||||
|
@ -235,8 +235,8 @@ void IConsoleAddSorted(T **base, T *item_new)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove underscores from a string; the string will be modified!
|
* Remove underscores from a string; the string will be modified!
|
||||||
* @param name The string to remove the underscores from.
|
* @param[in,out] name String to remove the underscores from.
|
||||||
* @return #name.
|
* @return \a name, with its contents modified.
|
||||||
*/
|
*/
|
||||||
char *RemoveUnderscores(char *name)
|
char *RemoveUnderscores(char *name)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload.
|
* (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload.
|
||||||
* @param Always reload the file storage cache.
|
* @param force_reload Always reload the file storage cache.
|
||||||
*/
|
*/
|
||||||
void ValidateFileList(bool force_reload = false)
|
void ValidateFileList(bool force_reload = false)
|
||||||
{
|
{
|
||||||
@ -256,8 +256,8 @@ DEF_CONSOLE_CMD(ConResetTile)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Scroll to a tile on the map.
|
* Scroll to a tile on the map.
|
||||||
* @param arg1 tile tile number or tile x coordinate.
|
* param x tile number or tile x coordinate.
|
||||||
* @param arg2 optionally tile y coordinate.
|
* param y optional y coordinate.
|
||||||
* @note When only one argument is given it is intepreted as the tile number.
|
* @note When only one argument is given it is intepreted as the tile number.
|
||||||
* When two arguments are given, they are interpreted as the tile's x
|
* When two arguments are given, they are interpreted as the tile's x
|
||||||
* and y coordinates.
|
* and y coordinates.
|
||||||
@ -304,7 +304,7 @@ DEF_CONSOLE_CMD(ConScrollToTile)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the map to a file.
|
* Save the map to a file.
|
||||||
* @param filename the filename to save the map to.
|
* param filename the filename to save the map to.
|
||||||
* @return True when help was displayed or the file attempted to be saved.
|
* @return True when help was displayed or the file attempted to be saved.
|
||||||
*/
|
*/
|
||||||
DEF_CONSOLE_CMD(ConSave)
|
DEF_CONSOLE_CMD(ConSave)
|
||||||
|
@ -159,7 +159,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Erase a row, replacing it with the last one.
|
* Erase a row, replacing it with the last one.
|
||||||
* @param x Position of the row.
|
* @param y Position of the row.
|
||||||
*/
|
*/
|
||||||
void EraseRow(uint y)
|
void EraseRow(uint y)
|
||||||
{
|
{
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove columns from the matrix while preserving the order of other columns.
|
* Remove columns from the matrix while preserving the order of other columns.
|
||||||
* @param x First column to remove.
|
* @param y First column to remove.
|
||||||
* @param count Number of consecutive columns to remove.
|
* @param count Number of consecutive columns to remove.
|
||||||
*/
|
*/
|
||||||
void EraseRowPreservingOrder(uint y, uint count = 1)
|
void EraseRowPreservingOrder(uint y, uint count = 1)
|
||||||
@ -210,8 +210,8 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Set the size to a specific width and height, preserving item positions
|
* Set the size to a specific width and height, preserving item positions
|
||||||
* as far as possible in the process.
|
* as far as possible in the process.
|
||||||
* @param width Target width.
|
* @param new_width Target width.
|
||||||
* @param height Target height.
|
* @param new_height Target height.
|
||||||
*/
|
*/
|
||||||
inline void Resize(uint new_width, uint new_height)
|
inline void Resize(uint new_width, uint new_height)
|
||||||
{
|
{
|
||||||
@ -297,7 +297,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Get column "number" (const)
|
* Get column "number" (const)
|
||||||
*
|
*
|
||||||
* @param X Position of the column.
|
* @param x Position of the column.
|
||||||
* @return Column at "number".
|
* @return Column at "number".
|
||||||
*/
|
*/
|
||||||
inline const T *operator[](uint x) const
|
inline const T *operator[](uint x) const
|
||||||
@ -309,7 +309,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Get column "number" (const)
|
* Get column "number" (const)
|
||||||
*
|
*
|
||||||
* @param X Position of the column.
|
* @param x Position of the column.
|
||||||
* @return Column at "number".
|
* @return Column at "number".
|
||||||
*/
|
*/
|
||||||
inline T *operator[](uint x)
|
inline T *operator[](uint x)
|
||||||
|
@ -217,22 +217,22 @@ enum Token {
|
|||||||
TOKEN_LOCAL, ///< Read a local include
|
TOKEN_LOCAL, ///< Read a local include
|
||||||
TOKEN_GLOBAL, ///< Read a global include
|
TOKEN_GLOBAL, ///< Read a global include
|
||||||
TOKEN_IDENTIFIER, ///< Identifier within the data.
|
TOKEN_IDENTIFIER, ///< Identifier within the data.
|
||||||
TOKEN_DEFINE, ///< (#)define in code
|
TOKEN_DEFINE, ///< \c \#define in code
|
||||||
TOKEN_IF, ///< (#)if in code
|
TOKEN_IF, ///< \c \#if in code
|
||||||
TOKEN_IFDEF, ///< (#)ifdef in code
|
TOKEN_IFDEF, ///< \c \#ifdef in code
|
||||||
TOKEN_IFNDEF, ///< (#)ifndef in code
|
TOKEN_IFNDEF, ///< \c \#ifndef in code
|
||||||
TOKEN_ELIF, ///< (#)elif in code
|
TOKEN_ELIF, ///< \c \#elif in code
|
||||||
TOKEN_ELSE, ///< (#)else in code
|
TOKEN_ELSE, ///< \c \#else in code
|
||||||
TOKEN_ENDIF, ///< (#)endif in code
|
TOKEN_ENDIF, ///< \c \#endif in code
|
||||||
TOKEN_UNDEF, ///< (#)undef in code
|
TOKEN_UNDEF, ///< \c \#undef in code
|
||||||
TOKEN_OR, ///< '||' within <tt>#if</tt> expression
|
TOKEN_OR, ///< '||' within \c \#if expression
|
||||||
TOKEN_AND, ///< '&&' within <tt>#if</tt> expression
|
TOKEN_AND, ///< '&&' within \c \#if expression
|
||||||
TOKEN_DEFINED, ///< 'defined' within <tt>#if</tt> expression
|
TOKEN_DEFINED, ///< 'defined' within \c \#if expression
|
||||||
TOKEN_OPEN, ///< '(' within <tt>#if</tt> expression
|
TOKEN_OPEN, ///< '(' within \c \#if expression
|
||||||
TOKEN_CLOSE, ///< ')' within <tt>#if</tt> expression
|
TOKEN_CLOSE, ///< ')' within \c \#if expression
|
||||||
TOKEN_NOT, ///< '!' within <tt>#if</tt> expression
|
TOKEN_NOT, ///< '!' within \c \#if expression
|
||||||
TOKEN_ZERO, ///< '0' within <tt>#if</tt> expression
|
TOKEN_ZERO, ///< '0' within \c \#if expression
|
||||||
TOKEN_INCLUDE, ///< (#)include in code
|
TOKEN_INCLUDE, ///< \c \#include in code
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Mapping from a C-style keyword representation to a Token. */
|
/** Mapping from a C-style keyword representation to a Token. */
|
||||||
@ -681,8 +681,8 @@ bool ExpressionOr(Lexer *lexer, StringSet *defines, bool verbose)
|
|||||||
/** Enumerator to tell how long to ignore 'stuff'. */
|
/** Enumerator to tell how long to ignore 'stuff'. */
|
||||||
enum Ignore {
|
enum Ignore {
|
||||||
NOT_IGNORE, ///< No ignoring.
|
NOT_IGNORE, ///< No ignoring.
|
||||||
IGNORE_UNTIL_ELSE, ///< Ignore till a #else is reached.
|
IGNORE_UNTIL_ELSE, ///< Ignore till a \c \#else is reached.
|
||||||
IGNORE_UNTIL_ENDIF, ///< Ignore till a #endif is reached.
|
IGNORE_UNTIL_ENDIF, ///< Ignore till a \c \#endif is reached.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,8 +56,8 @@ void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the other end of the aqueduct, if possible.
|
* Gets the other end of the aqueduct, if possible.
|
||||||
* @param tile_from The begin tile for the aqueduct.
|
* @param tile_from The begin tile for the aqueduct.
|
||||||
* @param [out] tile_to The tile till where to show a selection for the aqueduct.
|
* @param[out] tile_to The tile till where to show a selection for the aqueduct.
|
||||||
* @return The other end of the aqueduct, or otherwise a tile in line with the aqueduct to cause the right error message.
|
* @return The other end of the aqueduct, or otherwise a tile in line with the aqueduct to cause the right error message.
|
||||||
*/
|
*/
|
||||||
static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = NULL)
|
static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = NULL)
|
||||||
|
@ -1242,7 +1242,6 @@ Money CargoPayment::PayTransfer(const CargoPacket *cp, uint count)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare the vehicle to be unloaded.
|
* Prepare the vehicle to be unloaded.
|
||||||
* @param curr_station the station where the consist is at the moment
|
|
||||||
* @param front_v the vehicle to be unloaded
|
* @param front_v the vehicle to be unloaded
|
||||||
*/
|
*/
|
||||||
void PrepareUnload(Vehicle *front_v)
|
void PrepareUnload(Vehicle *front_v)
|
||||||
|
@ -573,7 +573,7 @@ static bool IsWagon(EngineID index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update #reliability of engine \a e, (if needed) update the engine GUIs.
|
* Update #Engine::reliability and (if needed) update the engine GUIs.
|
||||||
* @param e %Engine to update.
|
* @param e %Engine to update.
|
||||||
*/
|
*/
|
||||||
static void CalcEngineReliability(Engine *e)
|
static void CalcEngineReliability(Engine *e)
|
||||||
|
@ -425,7 +425,7 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel
|
|||||||
/**
|
/**
|
||||||
* Schedule a list of errors.
|
* Schedule a list of errors.
|
||||||
* Note: This does not try to display the error now. This is useful if the window system is not yet running.
|
* Note: This does not try to display the error now. This is useful if the window system is not yet running.
|
||||||
* @param data Error message datas; cleared afterwards
|
* @param datas Error message datas; cleared afterwards
|
||||||
*/
|
*/
|
||||||
void ScheduleErrorMessage(ErrorList &datas)
|
void ScheduleErrorMessage(ErrorList &datas)
|
||||||
{
|
{
|
||||||
|
@ -347,7 +347,7 @@ char *FioGetFullPath(char *buf, const char *last, Searchpath sp, Subdirectory su
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a path to the filename in one of the search directories.
|
* Find a path to the filename in one of the search directories.
|
||||||
* @param buf [out] Destination buffer for the path.
|
* @param[out] buf Destination buffer for the path.
|
||||||
* @param last End of the destination buffer.
|
* @param last End of the destination buffer.
|
||||||
* @param subdir Subdirectory to try.
|
* @param subdir Subdirectory to try.
|
||||||
* @param filename Filename to look for.
|
* @param filename Filename to look for.
|
||||||
@ -438,7 +438,7 @@ static FILE *FioFOpenFileSp(const char *filename, const char *mode, Searchpath s
|
|||||||
/**
|
/**
|
||||||
* Opens a file from inside a tar archive.
|
* Opens a file from inside a tar archive.
|
||||||
* @param entry The entry to open.
|
* @param entry The entry to open.
|
||||||
* @param filesize [out] If not \c NULL, size of the opened file.
|
* @param[out] filesize If not \c NULL, size of the opened file.
|
||||||
* @return File handle of the opened file, or \c NULL if the file is not available.
|
* @return File handle of the opened file, or \c NULL if the file is not available.
|
||||||
* @note The file is read from within the tar file, and may not return \c EOF after reading the whole file.
|
* @note The file is read from within the tar file, and may not return \c EOF after reading the whole file.
|
||||||
*/
|
*/
|
||||||
@ -460,7 +460,6 @@ FILE *FioFOpenFileTar(TarFileListEntry *entry, size_t *filesize)
|
|||||||
* Opens a OpenTTD file somewhere in a personal or global directory.
|
* Opens a OpenTTD file somewhere in a personal or global directory.
|
||||||
* @param filename Name of the file to open.
|
* @param filename Name of the file to open.
|
||||||
* @param subdir Subdirectory to open.
|
* @param subdir Subdirectory to open.
|
||||||
* @param filename Name of the file to open.
|
|
||||||
* @return File handle of the opened file, or \c NULL if the file is not available.
|
* @return File handle of the opened file, or \c NULL if the file is not available.
|
||||||
*/
|
*/
|
||||||
FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize)
|
FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, size_t *filesize)
|
||||||
@ -632,7 +631,7 @@ static void SimplifyFileName(char *name)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform the scanning of a particular subdirectory.
|
* Perform the scanning of a particular subdirectory.
|
||||||
* @param subdir The subdirectory to scan.
|
* @param sd The subdirectory to scan.
|
||||||
* @return The number of found tar files.
|
* @return The number of found tar files.
|
||||||
*/
|
*/
|
||||||
uint TarScanner::DoScan(Subdirectory sd)
|
uint TarScanner::DoScan(Subdirectory sd)
|
||||||
@ -1303,7 +1302,7 @@ void SanitizeFilename(char *filename)
|
|||||||
/**
|
/**
|
||||||
* Load a file into memory.
|
* Load a file into memory.
|
||||||
* @param filename Name of the file to load.
|
* @param filename Name of the file to load.
|
||||||
* @param lenp [out] Length of loaded data.
|
* @param[out] lenp Length of loaded data.
|
||||||
* @param maxsize Maximum size to load.
|
* @param maxsize Maximum size to load.
|
||||||
* @return Pointer to new memory containing the loaded data, or \c NULL if loading failed.
|
* @return Pointer to new memory containing the loaded data, or \c NULL if loading failed.
|
||||||
* @note If \a maxsize less than the length of the file, loading fails.
|
* @note If \a maxsize less than the length of the file, loading fails.
|
||||||
|
@ -201,7 +201,7 @@ static const TextColour _fios_colours[] = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sort the collected list save games prior to displaying it in the save/load gui.
|
* Sort the collected list save games prior to displaying it in the save/load gui.
|
||||||
* @param [inout] file_list List of save game files found in the directory.
|
* @param[in,out] file_list List of save game files found in the directory.
|
||||||
*/
|
*/
|
||||||
static void SortSaveGameList(FileList &file_list)
|
static void SortSaveGameList(FileList &file_list)
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ struct StringListReader : StringReader {
|
|||||||
/**
|
/**
|
||||||
* Create the reader.
|
* Create the reader.
|
||||||
* @param data The data to fill during reading.
|
* @param data The data to fill during reading.
|
||||||
* @param file The file we are reading.
|
* @param strings The language strings we are reading.
|
||||||
* @param master Are we reading the master file?
|
* @param master Are we reading the master file?
|
||||||
* @param translation Are we reading a translation?
|
* @param translation Are we reading a translation?
|
||||||
*/
|
*/
|
||||||
|
@ -771,9 +771,9 @@ void GamelogGRFUpdate(const GRFConfig *oldc, const GRFConfig *newc)
|
|||||||
* Get some basic information from the given gamelog.
|
* Get some basic information from the given gamelog.
|
||||||
* @param gamelog_action Pointer to the gamelog to extract information from.
|
* @param gamelog_action Pointer to the gamelog to extract information from.
|
||||||
* @param gamelog_actions Number of actions in the given gamelog.
|
* @param gamelog_actions Number of actions in the given gamelog.
|
||||||
* @param [out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last.
|
* @param[out] last_ottd_rev OpenTTD NewGRF version from the binary that saved the savegame last.
|
||||||
* @param [out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame.
|
* @param[out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame.
|
||||||
* @param [out] removed_newgrfs Set to true if any NewGRFs have been removed.
|
* @param[out] removed_newgrfs Set to true if any NewGRFs have been removed.
|
||||||
*/
|
*/
|
||||||
void GamelogInfo(LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs)
|
void GamelogInfo(LoggedAction *gamelog_action, uint gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs)
|
||||||
{
|
{
|
||||||
|
14
src/gfx.cpp
14
src/gfx.cpp
@ -703,8 +703,8 @@ Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get bounding box of a string. Uses parameters set by #DParam if needed.
|
* Get bounding box of a string. Uses parameters set by #SetDParam if needed.
|
||||||
* Has the same restrictions as #GetStringBoundingBox(const char *str).
|
* Has the same restrictions as #GetStringBoundingBox(const char *str, FontSize start_fontsize).
|
||||||
* @param strid String to examine.
|
* @param strid String to examine.
|
||||||
* @return Width and height of the bounding box for the string in pixels.
|
* @return Width and height of the bounding box for the string in pixels.
|
||||||
*/
|
*/
|
||||||
@ -761,7 +761,7 @@ void DrawCharCentered(WChar c, int x, int y, TextColour colour)
|
|||||||
/**
|
/**
|
||||||
* Get the size of a sprite.
|
* Get the size of a sprite.
|
||||||
* @param sprid Sprite to examine.
|
* @param sprid Sprite to examine.
|
||||||
* @param [out] offset Optionally returns the sprite position offset.
|
* @param[out] offset Optionally returns the sprite position offset.
|
||||||
* @return Sprite size in pixels.
|
* @return Sprite size in pixels.
|
||||||
* @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position.
|
* @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position.
|
||||||
*/
|
*/
|
||||||
@ -1170,8 +1170,8 @@ byte GetDigitWidth(FontSize size)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the broadest digits for guessing the maximum width of a n-digit number.
|
* Determine the broadest digits for guessing the maximum width of a n-digit number.
|
||||||
* @param [out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.)
|
* @param[out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.)
|
||||||
* @param [out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.)
|
* @param[out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.)
|
||||||
* @param size Font of the digit
|
* @param size Font of the digit
|
||||||
*/
|
*/
|
||||||
void GetBroadestDigit(uint *front, uint *next, FontSize size)
|
void GetBroadestDigit(uint *front, uint *next, FontSize size)
|
||||||
@ -1635,8 +1635,8 @@ void SetAnimatedMouseCursor(const AnimCursor *table)
|
|||||||
* Update cursor position on mouse movement.
|
* Update cursor position on mouse movement.
|
||||||
* @param x New X position.
|
* @param x New X position.
|
||||||
* @param y New Y position.
|
* @param y New Y position.
|
||||||
* @param queued True, if the OS queues mouse warps after pending mouse movement events.
|
* @param queued_warp True, if the OS queues mouse warps after pending mouse movement events.
|
||||||
* False, if the warp applies instantaneous.
|
* False, if the warp applies instantaneous.
|
||||||
* @return true, if the OS cursor position should be warped back to this->pos.
|
* @return true, if the OS cursor position should be warped back to this->pos.
|
||||||
*/
|
*/
|
||||||
bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp)
|
bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp)
|
||||||
|
@ -189,7 +189,7 @@ union Colour {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new colour.
|
* Create a new colour.
|
||||||
* @param The colour in the correct packed format.
|
* @param data The colour in the correct packed format.
|
||||||
*/
|
*/
|
||||||
Colour(uint data = 0) : data(data)
|
Colour(uint data = 0) : data(data)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ static uint LoadGrfFile(const char *filename, uint load_index, int file_index)
|
|||||||
/**
|
/**
|
||||||
* Load an old fashioned GRF file to replace already loaded sprites.
|
* Load an old fashioned GRF file to replace already loaded sprites.
|
||||||
* @param filename The name of the file to open.
|
* @param filename The name of the file to open.
|
||||||
* @param index_tlb The offsets of each of the sprites.
|
* @param index_tbl The offsets of each of the sprites.
|
||||||
* @param file_index The Fio offset to load the file in.
|
* @param file_index The Fio offset to load the file in.
|
||||||
* @return The number of loaded sprites.
|
* @return The number of loaded sprites.
|
||||||
*/
|
*/
|
||||||
|
@ -101,7 +101,7 @@ struct GoalListWindow : public Window {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle clicking at a goal.
|
* Handle clicking at a goal.
|
||||||
* @param s @Goal clicked at.
|
* @param s #Goal clicked at.
|
||||||
*/
|
*/
|
||||||
void HandleClick(const Goal *s)
|
void HandleClick(const Goal *s)
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ struct GoalListWindow : public Window {
|
|||||||
/**
|
/**
|
||||||
* Draws either the global goals or the company goal section.
|
* Draws either the global goals or the company goal section.
|
||||||
* This is a helper method for #DrawWidget.
|
* This is a helper method for #DrawWidget.
|
||||||
* @param pos [inout] Vertical line number to draw.
|
* @param[in,out] pos Vertical line number to draw.
|
||||||
* @param cap Number of lines to draw in the window.
|
* @param cap Number of lines to draw in the window.
|
||||||
* @param x Left edge of the text line to draw.
|
* @param x Left edge of the text line to draw.
|
||||||
* @param y Vertical position of the top edge of the window.
|
* @param y Vertical position of the top edge of the window.
|
||||||
@ -250,8 +250,8 @@ struct GoalListWindow : public Window {
|
|||||||
/**
|
/**
|
||||||
* Draws a given column of the goal list.
|
* Draws a given column of the goal list.
|
||||||
* @param column Which column to draw.
|
* @param column Which column to draw.
|
||||||
* @wid Pointer to the goal list widget.
|
* @param wid Pointer to the goal list widget.
|
||||||
* @progress_col_width Width of the progress column.
|
* @param progress_col_width Width of the progress column.
|
||||||
* @return max width of drawn text
|
* @return max width of drawn text
|
||||||
*/
|
*/
|
||||||
void DrawListColumn(GoalColumn column, NWidgetBase *wid, uint progress_col_width) const
|
void DrawListColumn(GoalColumn column, NWidgetBase *wid, uint progress_col_width) const
|
||||||
|
@ -98,7 +98,7 @@ void GroupStatistics::Clear()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update all caches after loading a game, changing NewGRF etc..
|
* Update all caches after loading a game, changing NewGRF, etc.
|
||||||
*/
|
*/
|
||||||
/* static */ void GroupStatistics::UpdateAfterLoad()
|
/* static */ void GroupStatistics::UpdateAfterLoad()
|
||||||
{
|
{
|
||||||
|
@ -977,11 +977,11 @@ static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner o
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a 'Rename group' window for newly created group
|
* Opens a 'Rename group' window for newly created group.
|
||||||
* @param success did command succeed?
|
* @param result Did command succeed?
|
||||||
* @param tile unused
|
* @param tile Unused.
|
||||||
* @param p1 vehicle type
|
* @param p1 Vehicle type.
|
||||||
* @param p2 unused
|
* @param p2 Unused.
|
||||||
* @see CmdCreateGroup
|
* @see CmdCreateGroup
|
||||||
*/
|
*/
|
||||||
void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||||
@ -995,7 +995,7 @@ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open rename window after adding a vehicle to a new group via drag and drop.
|
* Open rename window after adding a vehicle to a new group via drag and drop.
|
||||||
* @param success Did command succeed?
|
* @param result Did command succeed?
|
||||||
* @param tile Unused.
|
* @param tile Unused.
|
||||||
* @param p1 Unused.
|
* @param p1 Unused.
|
||||||
* @param p2 Bit 0-19: Vehicle ID.
|
* @param p2 Bit 0-19: Vehicle ID.
|
||||||
|
@ -447,9 +447,9 @@ void FixSlopes()
|
|||||||
* Reads the heightmap with the correct file reader.
|
* Reads the heightmap with the correct file reader.
|
||||||
* @param dft Type of image file.
|
* @param dft Type of image file.
|
||||||
* @param filename Name of the file to load.
|
* @param filename Name of the file to load.
|
||||||
* @param [out] x Length of the image.
|
* @param[out] x Length of the image.
|
||||||
* @param [out] y Height of the image.
|
* @param[out] y Height of the image.
|
||||||
* @param [inout] map If not \c NULL, destination to store the loaded block of image data.
|
* @param[in,out] map If not \c NULL, destination to store the loaded block of image data.
|
||||||
* @return Whether loading was successful.
|
* @return Whether loading was successful.
|
||||||
*/
|
*/
|
||||||
static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map)
|
static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map)
|
||||||
|
@ -1323,7 +1323,7 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = {
|
|||||||
* Find a town for the industry, while checking for multiple industries in the same town.
|
* Find a town for the industry, while checking for multiple industries in the same town.
|
||||||
* @param tile Position of the industry to build.
|
* @param tile Position of the industry to build.
|
||||||
* @param type Industry type.
|
* @param type Industry type.
|
||||||
* @param [out] town Pointer to return town for the new industry, \c NULL is written if no good town can be found.
|
* @param[out] t Pointer to return town for the new industry, \c NULL is written if no good town can be found.
|
||||||
* @return Succeeded or failed command.
|
* @return Succeeded or failed command.
|
||||||
*
|
*
|
||||||
* @pre \c *t != NULL
|
* @pre \c *t != NULL
|
||||||
@ -1365,14 +1365,14 @@ bool IsSlopeRefused(Slope current, Slope refused)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Are the tiles of the industry free?
|
* Are the tiles of the industry free?
|
||||||
* @param tile Position to check.
|
* @param tile Position to check.
|
||||||
* @param it Industry tiles table.
|
* @param it Industry tiles table.
|
||||||
* @param itspec_index The index of the itsepc to build/fund
|
* @param itspec_index The index of the itsepc to build/fund
|
||||||
* @param type Type of the industry.
|
* @param type Type of the industry.
|
||||||
* @param initial_random_bits The random bits the industry is going to have after construction.
|
* @param initial_random_bits The random bits the industry is going to have after construction.
|
||||||
* @param founder Industry founder
|
* @param founder Industry founder
|
||||||
* @param creation_type The circumstances the industry is created under.
|
* @param creation_type The circumstances the industry is created under.
|
||||||
* @param [out] custom_shape_check Perform custom check for the site.
|
* @param[out] custom_shape_check Perform custom check for the site.
|
||||||
* @return Failed or succeeded command.
|
* @return Failed or succeeded command.
|
||||||
*/
|
*/
|
||||||
static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable *it, uint itspec_index, int type, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type, bool *custom_shape_check = NULL)
|
static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable *it, uint itspec_index, int type, uint16 initial_random_bits, Owner founder, IndustryAvailabilityCallType creation_type, bool *custom_shape_check = NULL)
|
||||||
@ -1793,11 +1793,11 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
|
|||||||
* @param flags of operations to conduct
|
* @param flags of operations to conduct
|
||||||
* @param indspec pointer to industry specifications
|
* @param indspec pointer to industry specifications
|
||||||
* @param itspec_index the index of the itsepc to build/fund
|
* @param itspec_index the index of the itsepc to build/fund
|
||||||
* @param seed random seed (possibly) used by industries
|
* @param random_var8f random seed (possibly) used by industries
|
||||||
* @param initial_random_bits The random bits the industry is going to have after construction.
|
* @param random_initial_bits The random bits the industry is going to have after construction.
|
||||||
* @param founder Founder of the industry
|
* @param founder Founder of the industry
|
||||||
* @param creation_type The circumstances the industry is created under.
|
* @param creation_type The circumstances the industry is created under.
|
||||||
* @param [out] ip Pointer to store newly created industry.
|
* @param[out] ip Pointer to store newly created industry.
|
||||||
* @return Succeeded or failed command.
|
* @return Succeeded or failed command.
|
||||||
*
|
*
|
||||||
* @post \c *ip contains the newly created industry if all checks are successful and the \a flags request actual creation, else it contains \c NULL afterwards.
|
* @post \c *ip contains the newly created industry if all checks are successful and the \a flags request actual creation, else it contains \c NULL afterwards.
|
||||||
@ -1961,7 +1961,7 @@ static Industry *CreateNewIndustry(TileIndex tile, IndustryType type, IndustryAv
|
|||||||
/**
|
/**
|
||||||
* Compute the appearance probability for an industry during map creation.
|
* Compute the appearance probability for an industry during map creation.
|
||||||
* @param it Industry type to compute.
|
* @param it Industry type to compute.
|
||||||
* @param [out] force_at_least_one Returns whether at least one instance should be forced on map creation.
|
* @param[out] force_at_least_one Returns whether at least one instance should be forced on map creation.
|
||||||
* @return Relative probability for the industry to appear.
|
* @return Relative probability for the industry to appear.
|
||||||
*/
|
*/
|
||||||
static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one)
|
static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one)
|
||||||
@ -1986,7 +1986,7 @@ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *forc
|
|||||||
/**
|
/**
|
||||||
* Compute the probability for constructing a new industry during game play.
|
* Compute the probability for constructing a new industry during game play.
|
||||||
* @param it Industry type to compute.
|
* @param it Industry type to compute.
|
||||||
* @param [out] min_number Minimal number of industries that should exist at the map.
|
* @param[out] min_number Minimal number of industries that should exist at the map.
|
||||||
* @return Relative probability for the industry to appear.
|
* @return Relative probability for the industry to appear.
|
||||||
*/
|
*/
|
||||||
static uint16 GetIndustryGamePlayProbability(IndustryType it, byte *min_number)
|
static uint16 GetIndustryGamePlayProbability(IndustryType it, byte *min_number)
|
||||||
|
@ -1580,7 +1580,7 @@ struct CargoesField {
|
|||||||
/**
|
/**
|
||||||
* Connect a cargo from an industry to the #CFT_CARGO column.
|
* Connect a cargo from an industry to the #CFT_CARGO column.
|
||||||
* @param cargo Cargo to connect.
|
* @param cargo Cargo to connect.
|
||||||
* @param produced Cargo is produced (if \c false, cargo is assumed to be accepted).
|
* @param producer Cargo is produced (if \c false, cargo is assumed to be accepted).
|
||||||
* @return Horizontal connection index, or \c -1 if not accepted at all.
|
* @return Horizontal connection index, or \c -1 if not accepted at all.
|
||||||
*/
|
*/
|
||||||
int ConnectCargo(CargoID cargo, bool producer)
|
int ConnectCargo(CargoID cargo, bool producer)
|
||||||
@ -1697,7 +1697,7 @@ struct CargoesField {
|
|||||||
/**
|
/**
|
||||||
* Draw the field.
|
* Draw the field.
|
||||||
* @param xpos Position of the left edge.
|
* @param xpos Position of the left edge.
|
||||||
* @param vpos Position of the top edge.
|
* @param ypos Position of the top edge.
|
||||||
*/
|
*/
|
||||||
void Draw(int xpos, int ypos) const
|
void Draw(int xpos, int ypos) const
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ struct IniLoadFile {
|
|||||||
* Open the INI file.
|
* Open the INI file.
|
||||||
* @param filename Name of the INI file.
|
* @param filename Name of the INI file.
|
||||||
* @param subdir The subdir to load the file from.
|
* @param subdir The subdir to load the file from.
|
||||||
* @param size [out] Size of the opened file.
|
* @param[out] size Size of the opened file.
|
||||||
* @return File handle of the opened file, or \c NULL.
|
* @return File handle of the opened file, or \c NULL.
|
||||||
*/
|
*/
|
||||||
virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) = 0;
|
virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) = 0;
|
||||||
|
@ -115,7 +115,6 @@ public:
|
|||||||
* Check if there is any acceptance left for this node. In asymmetric distribution
|
* Check if there is any acceptance left for this node. In asymmetric distribution
|
||||||
* nodes always accept as long as their demand > 0.
|
* nodes always accept as long as their demand > 0.
|
||||||
* @param to The node to be checked.
|
* @param to The node to be checked.
|
||||||
* @param to_anno Unused.
|
|
||||||
*/
|
*/
|
||||||
inline bool HasDemandLeft(const Node &to) { return to.Demand() > 0; }
|
inline bool HasDemandLeft(const Node &to) { return to.Demand() > 0; }
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call the demand calculator on the given component.
|
* Call the demand calculator on the given component.
|
||||||
* @param graph Component to calculate the demands for.
|
* @param job Component to calculate the demands for.
|
||||||
*/
|
*/
|
||||||
virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); }
|
virtual void Run(LinkGraphJob &job) const { DemandCalculator c(job); }
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Map the paths generated by the MCF solver into flows associated with nodes.
|
* Map the paths generated by the MCF solver into flows associated with nodes.
|
||||||
* @param component the link graph component to be used.
|
* @param job the link graph component to be used.
|
||||||
*/
|
*/
|
||||||
void FlowMapper::Run(LinkGraphJob &job) const
|
void FlowMapper::Run(LinkGraphJob &job) const
|
||||||
{
|
{
|
||||||
|
@ -252,8 +252,6 @@ void LinkGraph::Node::RemoveEdge(NodeID to)
|
|||||||
* least the given capacity and usage, otherwise add the capacity and usage.
|
* least the given capacity and usage, otherwise add the capacity and usage.
|
||||||
* In any case set the respective update timestamp(s), according to the given
|
* In any case set the respective update timestamp(s), according to the given
|
||||||
* mode.
|
* mode.
|
||||||
* @param from Start node of the edge.
|
|
||||||
* @param to End node of the edge.
|
|
||||||
* @param capacity Capacity to be added/updated.
|
* @param capacity Capacity to be added/updated.
|
||||||
* @param usage Usage to be added.
|
* @param usage Usage to be added.
|
||||||
* @param mode Update mode to be applied.
|
* @param mode Update mode to be applied.
|
||||||
|
@ -425,7 +425,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the overlay belonging to this menu and import its company/cargo settings.
|
* Set the overlay belonging to this menu and import its company/cargo settings.
|
||||||
* @params overlay New overlay for this menu.
|
* @param overlay New overlay for this menu.
|
||||||
*/
|
*/
|
||||||
void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) {
|
void LinkGraphLegendWindow::SetOverlay(LinkGraphOverlay *overlay) {
|
||||||
this->overlay = overlay;
|
this->overlay = overlay;
|
||||||
|
@ -193,7 +193,7 @@ public:
|
|||||||
* Determines if an extension to the given Path with the given parameters is
|
* Determines if an extension to the given Path with the given parameters is
|
||||||
* better than this path.
|
* better than this path.
|
||||||
* @param base Other path.
|
* @param base Other path.
|
||||||
* @param cap Capacity of the new edge to be added to base.
|
* @param free_cap Capacity of the new edge to be added to base.
|
||||||
* @param dist Distance of the new edge.
|
* @param dist Distance of the new edge.
|
||||||
* @return True if base + the new edge would be better than the path associated
|
* @return True if base + the new edge would be better than the path associated
|
||||||
* with this annotation.
|
* with this annotation.
|
||||||
@ -227,7 +227,7 @@ bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap,
|
|||||||
* Determines if an extension to the given Path with the given parameters is
|
* Determines if an extension to the given Path with the given parameters is
|
||||||
* better than this path.
|
* better than this path.
|
||||||
* @param base Other path.
|
* @param base Other path.
|
||||||
* @param cap Capacity of the new edge to be added to base.
|
* @param free_cap Capacity of the new edge to be added to base.
|
||||||
* @param dist Distance of the new edge.
|
* @param dist Distance of the new edge.
|
||||||
* @return True if base + the new edge would be better than the path associated
|
* @return True if base + the new edge would be better than the path associated
|
||||||
* with this annotation.
|
* with this annotation.
|
||||||
|
@ -71,7 +71,7 @@ static const uint MAX_MAP_SIZE = 1 << MAX_MAP_SIZE_BITS; ///< Maximal map s
|
|||||||
* Approximation of the length of a straight track, relative to a diagonal
|
* Approximation of the length of a straight track, relative to a diagonal
|
||||||
* track (ie the size of a tile side).
|
* track (ie the size of a tile side).
|
||||||
*
|
*
|
||||||
* #defined instead of const so it can
|
* \#defined instead of const so it can
|
||||||
* stay integer. (no runtime float operations) Is this needed?
|
* stay integer. (no runtime float operations) Is this needed?
|
||||||
* Watch out! There are _no_ brackets around here, to prevent intermediate
|
* Watch out! There are _no_ brackets around here, to prevent intermediate
|
||||||
* rounding! Be careful when using this!
|
* rounding! Be careful when using this!
|
||||||
|
@ -117,7 +117,7 @@ void DumpTarget::WriteIndent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Write a line with indent at the beginning and <LF> at the end. */
|
/** Write a line with indent at the beginning and \<LF\> at the end. */
|
||||||
void DumpTarget::WriteLine(const char *format, ...)
|
void DumpTarget::WriteLine(const char *format, ...)
|
||||||
{
|
{
|
||||||
WriteIndent();
|
WriteIndent();
|
||||||
@ -143,7 +143,7 @@ void DumpTarget::WriteTile(const char *name, TileIndex tile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open new structure (one level deeper than the current one) 'name = {<LF>'.
|
* Open new structure (one level deeper than the current one) 'name = {\<LF\>'.
|
||||||
*/
|
*/
|
||||||
void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr)
|
void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr)
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ void DumpTarget::BeginStruct(size_t type_id, const char *name, const void *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close structure '}<LF>'.
|
* Close structure '}\<LF\>'.
|
||||||
*/
|
*/
|
||||||
void DumpTarget::EndStruct()
|
void DumpTarget::EndStruct()
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ struct GetOptData {
|
|||||||
int numleft; ///< Number of arguments left in #argv.
|
int numleft; ///< Number of arguments left in #argv.
|
||||||
char **argv; ///< Remaining command line arguments.
|
char **argv; ///< Remaining command line arguments.
|
||||||
const OptionData *options; ///< Command line option descriptions.
|
const OptionData *options; ///< Command line option descriptions.
|
||||||
char *cont; ///< Next call to #MyGetOpt should start here (in the middle of an argument).
|
char *cont; ///< Next call to #GetOpt should start here (in the middle of an argument).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of the data store.
|
* Constructor of the data store.
|
||||||
|
@ -732,7 +732,7 @@ struct TooltipsWindow : public Window
|
|||||||
* @param str String to be displayed
|
* @param str String to be displayed
|
||||||
* @param paramcount number of params to deal with
|
* @param paramcount number of params to deal with
|
||||||
* @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
|
* @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
|
||||||
* @param use_left_mouse_button close the tooltip when the left (true) or right (false) mouse button is released
|
* @param close_tooltip when the left (true) or right (false) mouse button is released
|
||||||
*/
|
*/
|
||||||
void GuiShowTooltips(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip)
|
void GuiShowTooltips(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip)
|
||||||
{
|
{
|
||||||
@ -1068,7 +1068,7 @@ void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *paren
|
|||||||
*/
|
*/
|
||||||
struct QueryWindow : public Window {
|
struct QueryWindow : public Window {
|
||||||
QueryCallbackProc *proc; ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise
|
QueryCallbackProc *proc; ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise
|
||||||
uint64 params[10]; ///< local copy of _decode_parameters
|
uint64 params[10]; ///< local copy of #_global_string_params
|
||||||
StringID message; ///< message shown for query window
|
StringID message; ///< message shown for query window
|
||||||
StringID caption; ///< title of window
|
StringID caption; ///< title of window
|
||||||
|
|
||||||
|
@ -520,8 +520,8 @@ struct MpsMachine {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a TTD DOS music format decoder.
|
* Construct a TTD DOS music format decoder.
|
||||||
* @param songdata Buffer of song data from CAT file, ownership remains with caller
|
* @param data Buffer of song data from CAT file, ownership remains with caller
|
||||||
* @param songdatalen Length of the data buffer in bytes
|
* @param length Length of the data buffer in bytes
|
||||||
* @param target MidiFile object to add decoded data to
|
* @param target MidiFile object to add decoded data to
|
||||||
*/
|
*/
|
||||||
MpsMachine(const byte *data, size_t length, MidiFile &target)
|
MpsMachine(const byte *data, size_t length, MidiFile &target)
|
||||||
|
@ -21,7 +21,7 @@ class MusicDriver : public Driver {
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Play a particular song.
|
* Play a particular song.
|
||||||
* @param filename The name of file with the song to play.
|
* @param song The information for the song to play.
|
||||||
*/
|
*/
|
||||||
virtual void PlaySong(const MusicSongInfo &song) = 0;
|
virtual void PlaySong(const MusicSongInfo &song) = 0;
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ public:
|
|||||||
* Create the content list window.
|
* Create the content list window.
|
||||||
* @param desc the window description to pass to Window's constructor.
|
* @param desc the window description to pass to Window's constructor.
|
||||||
* @param select_all Whether the select all button is allowed or not.
|
* @param select_all Whether the select all button is allowed or not.
|
||||||
* @param type the main type of content to display or #CONTENT_TYPE_END.
|
* @param types the main type of content to display or #CONTENT_TYPE_END.
|
||||||
* When a type other than #CONTENT_TYPE_END is given, dependencies of
|
* When a type other than #CONTENT_TYPE_END is given, dependencies of
|
||||||
* other types are only shown when content that depend on them are
|
* other types are only shown when content that depend on them are
|
||||||
* selected.
|
* selected.
|
||||||
|
@ -2137,7 +2137,7 @@ bool NetworkCompanyHasClients(CompanyID company)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name of the client, if the user did not send it yet, Client #<no> is used.
|
* Get the name of the client, if the user did not send it yet, Client ID is used.
|
||||||
* @param client_name The variable to write the name to.
|
* @param client_name The variable to write the name to.
|
||||||
* @param last The pointer to the last element of the destination buffer
|
* @param last The pointer to the last element of the destination buffer
|
||||||
*/
|
*/
|
||||||
|
@ -194,7 +194,7 @@ static GrfProcessingState _cur;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to check whether an image index is valid for a particular NewGRF vehicle.
|
* Helper to check whether an image index is valid for a particular NewGRF vehicle.
|
||||||
* @param <T> The type of vehicle.
|
* @tparam T The type of vehicle.
|
||||||
* @param image_index The image index to check.
|
* @param image_index The image index to check.
|
||||||
* @return True iff the image index is valid, or 0xFD (use new graphics).
|
* @return True iff the image index is valid, or 0xFD (use new graphics).
|
||||||
*/
|
*/
|
||||||
@ -734,9 +734,9 @@ static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite)
|
|||||||
* @param invert_action1_flag Set to true, if palette bit 15 means 'not from action 1'.
|
* @param invert_action1_flag Set to true, if palette bit 15 means 'not from action 1'.
|
||||||
* @param use_cur_spritesets Whether to use currently referenceable action 1 sets.
|
* @param use_cur_spritesets Whether to use currently referenceable action 1 sets.
|
||||||
* @param feature GrfSpecFeature to use spritesets from.
|
* @param feature GrfSpecFeature to use spritesets from.
|
||||||
* @param [out] grf_sprite Read sprite and palette.
|
* @param[out] grf_sprite Read sprite and palette.
|
||||||
* @param [out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset)
|
* @param[out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset)
|
||||||
* @param [out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset)
|
* @param[out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset)
|
||||||
* @return Read TileLayoutFlags.
|
* @return Read TileLayoutFlags.
|
||||||
*/
|
*/
|
||||||
static TileLayoutFlags ReadSpriteLayoutSprite(ByteReader *buf, bool read_flags, bool invert_action1_flag, bool use_cur_spritesets, int feature, PalSpriteID *grf_sprite, uint16 *max_sprite_offset = NULL, uint16 *max_palette_offset = NULL)
|
static TileLayoutFlags ReadSpriteLayoutSprite(ByteReader *buf, bool read_flags, bool invert_action1_flag, bool use_cur_spritesets, int feature, PalSpriteID *grf_sprite, uint16 *max_sprite_offset = NULL, uint16 *max_palette_offset = NULL)
|
||||||
@ -1845,7 +1845,7 @@ static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define properties for stations
|
* Define properties for stations
|
||||||
* @param stdid StationID of the first station tile.
|
* @param stid StationID of the first station tile.
|
||||||
* @param numinfo Number of subsequent station tiles to change the property for.
|
* @param numinfo Number of subsequent station tiles to change the property for.
|
||||||
* @param prop The property to change.
|
* @param prop The property to change.
|
||||||
* @param buf The property value.
|
* @param buf The property value.
|
||||||
@ -2553,7 +2553,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt
|
|||||||
* @param gvid ID of the global variable. This is basically only checked for zerones.
|
* @param gvid ID of the global variable. This is basically only checked for zerones.
|
||||||
* @param numinfo Number of subsequent IDs to change the property for.
|
* @param numinfo Number of subsequent IDs to change the property for.
|
||||||
* @param buf The property value.
|
* @param buf The property value.
|
||||||
* @param [in,out] translation_table Storage location for the translation table.
|
* @param[in,out] translation_table Storage location for the translation table.
|
||||||
* @param name Name of the table for debug output.
|
* @param name Name of the table for debug output.
|
||||||
* @return ChangeInfoResult.
|
* @return ChangeInfoResult.
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +216,6 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a value into the object's persistent storage.
|
* Store a value into the object's persistent storage.
|
||||||
* @param object Object that we want to query.
|
|
||||||
* @param pos Position in the persistent storage to use.
|
* @param pos Position in the persistent storage to use.
|
||||||
* @param value Value to store.
|
* @param value Value to store.
|
||||||
*/
|
*/
|
||||||
|
@ -31,7 +31,6 @@ template <typename Tbase, typename Tspec, typename Tobj, typename Textra, uint16
|
|||||||
struct AnimationBase {
|
struct AnimationBase {
|
||||||
/**
|
/**
|
||||||
* Animate a single tile.
|
* Animate a single tile.
|
||||||
* @param cb The callback to actually call.
|
|
||||||
* @param spec Specification related to the tile.
|
* @param spec Specification related to the tile.
|
||||||
* @param obj Object related to the tile.
|
* @param obj Object related to the tile.
|
||||||
* @param tile Tile to animate changes for.
|
* @param tile Tile to animate changes for.
|
||||||
|
@ -162,8 +162,7 @@ GenericResolverObject::GenericResolverObject(bool ai_callback, CallbackID callba
|
|||||||
* @param object pre-populated resolver object
|
* @param object pre-populated resolver object
|
||||||
* @param param1_grfv7 callback_param1 for GRFs up to version 7.
|
* @param param1_grfv7 callback_param1 for GRFs up to version 7.
|
||||||
* @param param1_grfv8 callback_param1 for GRFs from version 8 on.
|
* @param param1_grfv8 callback_param1 for GRFs from version 8 on.
|
||||||
* @param [out] file Optionally returns the GRFFile which made the final decision for the callback result.
|
* @param[out] file Optionally returns the GRFFile which made the final decision for the callback result. May be NULL if not required.
|
||||||
* May be NULL if not required.
|
|
||||||
* @return callback value if successful or CALLBACK_FAILED
|
* @return callback value if successful or CALLBACK_FAILED
|
||||||
*/
|
*/
|
||||||
static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject &object, uint32 param1_grfv7, uint32 param1_grfv8, const GRFFile **file)
|
static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject &object, uint32 param1_grfv7, uint32 param1_grfv8, const GRFFile **file)
|
||||||
@ -202,8 +201,7 @@ static uint16 GetGenericCallbackResult(uint8 feature, ResolverObject &object, ui
|
|||||||
* @param event 'AI construction event' to pass to callback. (Variable 86)
|
* @param event 'AI construction event' to pass to callback. (Variable 86)
|
||||||
* @param count 'Construction number' to pass to callback. (Variable 87)
|
* @param count 'Construction number' to pass to callback. (Variable 87)
|
||||||
* @param station_size 'Station size' to pass to callback. (Variable 88)
|
* @param station_size 'Station size' to pass to callback. (Variable 88)
|
||||||
* @param [out] file Optionally returns the GRFFile which made the final decision for the callback result.
|
* @param[out] file Optionally returns the GRFFile which made the final decision for the callback result. May be NULL if not required.
|
||||||
* May be NULL if not required.
|
|
||||||
* @return callback value if successful or CALLBACK_FAILED
|
* @return callback value if successful or CALLBACK_FAILED
|
||||||
*/
|
*/
|
||||||
uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 default_selection, IndustryType src_industry, IndustryType dst_industry, uint8 distance, AIConstructionEvent event, uint8 count, uint8 station_size, const GRFFile **file)
|
uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 default_selection, IndustryType src_industry, IndustryType dst_industry, uint8 distance, AIConstructionEvent event, uint8 count, uint8 station_size, const GRFFile **file)
|
||||||
|
@ -1584,8 +1584,8 @@ NewGRFWindow::GUIGRFConfigList::FilterFunction * const NewGRFWindow::filter_func
|
|||||||
/**
|
/**
|
||||||
* 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
|
* 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
|
* - two column mode, put the #acs and the #avs underneath each other and the #inf next to it, or
|
||||||
* - three column mode, put the #avs, #acs, and #info each in its own column.
|
* - three column mode, put the #avs, #acs, and #inf each in its own column.
|
||||||
*/
|
*/
|
||||||
class NWidgetNewGRFDisplay : public NWidgetContainer {
|
class NWidgetNewGRFDisplay : public NWidgetContainer {
|
||||||
public:
|
public:
|
||||||
|
@ -415,7 +415,7 @@ static const GRFFile *GetGrffile(IndustryType type)
|
|||||||
/**
|
/**
|
||||||
* Constructor of the industries resolver.
|
* Constructor of the industries resolver.
|
||||||
* @param tile %Tile owned by the industry.
|
* @param tile %Tile owned by the industry.
|
||||||
* @param industry %Industry being resolved.
|
* @param indus %Industry being resolved.
|
||||||
* @param type Type of the industry.
|
* @param type Type of the industry.
|
||||||
* @param random_bits Random bits of the new industry.
|
* @param random_bits Random bits of the new industry.
|
||||||
* @param callback Callback ID.
|
* @param callback Callback ID.
|
||||||
|
@ -296,7 +296,7 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge
|
|||||||
* @param tile Industry tile to trigger.
|
* @param tile Industry tile to trigger.
|
||||||
* @param trigger Trigger to trigger.
|
* @param trigger Trigger to trigger.
|
||||||
* @param ind Industry of the tile.
|
* @param ind Industry of the tile.
|
||||||
* @param [in,out] reseed_industry Collects bits to reseed for the industry.
|
* @param[in,out] reseed_industry Collects bits to reseed for the industry.
|
||||||
*/
|
*/
|
||||||
static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, Industry *ind, uint32 &reseed_industry)
|
static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, Industry *ind, uint32 &reseed_industry)
|
||||||
{
|
{
|
||||||
|
@ -350,8 +350,8 @@ unhandled:
|
|||||||
* @param tile %Tile of the object.
|
* @param tile %Tile of the object.
|
||||||
* @param view View of the object.
|
* @param view View of the object.
|
||||||
* @param callback Callback ID.
|
* @param callback Callback ID.
|
||||||
* @param callback_param1 First parameter (var 10) of the callback.
|
* @param param1 First parameter (var 10) of the callback.
|
||||||
* @param callback_param2 Second parameter (var 18) of the callback.
|
* @param param2 Second parameter (var 18) of the callback.
|
||||||
*/
|
*/
|
||||||
ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj, TileIndex tile, uint8 view,
|
ObjectResolverObject::ObjectResolverObject(const ObjectSpec *spec, Object *obj, TileIndex tile, uint8 view,
|
||||||
CallbackID callback, uint32 param1, uint32 param2)
|
CallbackID callback, uint32 param1, uint32 param2)
|
||||||
|
@ -87,8 +87,8 @@ RailTypeResolverObject::RailTypeResolverObject(const RailtypeInfo *rti, TileInde
|
|||||||
* @param rti The rail type data (spec).
|
* @param rti The rail type data (spec).
|
||||||
* @param tile The tile to get the sprite for.
|
* @param tile The tile to get the sprite for.
|
||||||
* @param rtsg The type of sprite to draw.
|
* @param rtsg The type of sprite to draw.
|
||||||
* @param content Where are we drawing the tile?
|
* @param context Where are we drawing the tile?
|
||||||
* @param [out] num_results If not NULL, return the number of sprites in the spriteset.
|
* @param[out] num_results If not NULL, return the number of sprites in the spriteset.
|
||||||
* @return The sprite to draw.
|
* @return The sprite to draw.
|
||||||
*/
|
*/
|
||||||
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context, uint *num_results)
|
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context, uint *num_results)
|
||||||
|
@ -118,7 +118,7 @@ static inline uint32 GetVariable(const ResolverObject &object, ScopeResolver *sc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a value into the persistent storage area (PSA). Default implementation does nothing (for newgrf classes without storage).
|
* Store a value into the persistent storage area (PSA). Default implementation does nothing (for newgrf classes without storage).
|
||||||
* @param pos Position to store into.
|
* @param reg Position to store into.
|
||||||
* @param value Value to store.
|
* @param value Value to store.
|
||||||
*/
|
*/
|
||||||
/* virtual */ void ScopeResolver::StorePSA(uint reg, int32 value) {}
|
/* virtual */ void ScopeResolver::StorePSA(uint reg, int32 value) {}
|
||||||
@ -308,7 +308,7 @@ const SpriteGroup *RealSpriteGroup::Resolve(ResolverObject &object) const
|
|||||||
* Process registers and the construction stage into the sprite layout.
|
* Process registers and the construction stage into the sprite layout.
|
||||||
* The passed construction stage might get reset to zero, if it gets incorporated into the layout
|
* The passed construction stage might get reset to zero, if it gets incorporated into the layout
|
||||||
* during the preprocessing.
|
* during the preprocessing.
|
||||||
* @param [in, out] stage Construction stage (0-3), or NULL if not applicable.
|
* @param[in,out] stage Construction stage (0-3), or NULL if not applicable.
|
||||||
* @return sprite layout to draw.
|
* @return sprite layout to draw.
|
||||||
*/
|
*/
|
||||||
const DrawTileSprites *TileLayoutSpriteGroup::ProcessRegisters(uint8 *stage) const
|
const DrawTileSprites *TileLayoutSpriteGroup::ProcessRegisters(uint8 *stage) const
|
||||||
|
@ -881,7 +881,7 @@ bool CanStationTileHaveWires(TileIndex tile)
|
|||||||
return statspec == NULL || !HasBit(statspec->wires, GetStationGfx(tile));
|
return statspec == NULL || !HasBit(statspec->wires, GetStationGfx(tile));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Wrapper for animation control, see #GetStationCallback. */
|
/** Wrapper for animation control, see GetStationCallback. */
|
||||||
uint16 GetAnimStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data)
|
uint16 GetAnimStationCallback(CallbackID callback, uint32 param1, uint32 param2, const StationSpec *statspec, BaseStation *st, TileIndex tile, int extra_data)
|
||||||
{
|
{
|
||||||
return GetStationCallback(callback, param1, param2, statspec, st, tile);
|
return GetStationCallback(callback, param1, param2, statspec, st, tile);
|
||||||
|
@ -329,7 +329,7 @@ struct UnmappedChoiceList : ZeroedMemoryAllocator {
|
|||||||
* @param language_id The (NewGRF) language ID associated with this string.
|
* @param language_id The (NewGRF) language ID associated with this string.
|
||||||
* @param allow_newlines Whether newlines are allowed in the string or not.
|
* @param allow_newlines Whether newlines are allowed in the string or not.
|
||||||
* @param str The string to translate.
|
* @param str The string to translate.
|
||||||
* @param [out] olen The length of the final string.
|
* @param[out] olen The length of the final string.
|
||||||
* @param byte80 The control code to use as replacement for the 0x80-value.
|
* @param byte80 The control code to use as replacement for the 0x80-value.
|
||||||
* @return The translated string.
|
* @return The translated string.
|
||||||
*/
|
*/
|
||||||
|
@ -494,7 +494,7 @@ struct NewsWindow : Window {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Moves the window so #newtop is new 'top' coordinate. Makes screen dirty where needed.
|
* Moves the window to a new #top coordinate. Makes screen dirty where needed.
|
||||||
* @param newtop new top coordinate
|
* @param newtop new top coordinate
|
||||||
*/
|
*/
|
||||||
void SetWindowTop(int newtop)
|
void SetWindowTop(int newtop)
|
||||||
@ -962,7 +962,6 @@ void ShowLastNewsMessage()
|
|||||||
* @param y position of the string
|
* @param y position of the string
|
||||||
* @param colour the colour the string will be shown in
|
* @param colour the colour the string will be shown in
|
||||||
* @param *ni NewsItem being printed
|
* @param *ni NewsItem being printed
|
||||||
* @param maxw maximum width of string in pixels
|
|
||||||
*/
|
*/
|
||||||
static void DrawNewsString(uint left, uint right, int y, TextColour colour, const NewsItem *ni)
|
static void DrawNewsString(uint left, uint right, int y, TextColour colour, const NewsItem *ni)
|
||||||
{
|
{
|
||||||
|
@ -520,10 +520,7 @@ static WindowDesc _build_object_desc(
|
|||||||
_nested_build_object_widgets, lengthof(_nested_build_object_widgets)
|
_nested_build_object_widgets, lengthof(_nested_build_object_widgets)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/** Show our object picker. */
|
||||||
* Show our object picker.
|
|
||||||
* @param w The toolbar window we're associated with.
|
|
||||||
*/
|
|
||||||
void ShowBuildObjectPicker()
|
void ShowBuildObjectPicker()
|
||||||
{
|
{
|
||||||
/* Don't show the place object button when there are no objects to place. */
|
/* Don't show the place object button when there are no objects to place. */
|
||||||
|
@ -989,9 +989,9 @@ static void MakeNewEditorWorld()
|
|||||||
* Load the specified savegame but on error do different things.
|
* Load the specified savegame but on error do different things.
|
||||||
* If loading fails due to corrupt savegame, bad version, etc. go back to
|
* If loading fails due to corrupt savegame, bad version, etc. go back to
|
||||||
* a previous correct state. In the menu for example load the intro game again.
|
* a previous correct state. In the menu for example load the intro game again.
|
||||||
* @param mode mode of loading, either SL_LOAD or SL_OLD_LOAD
|
|
||||||
* @param newgm switch to this mode of loading fails due to some unknown error
|
|
||||||
* @param filename file to be loaded
|
* @param filename file to be loaded
|
||||||
|
* @param fop mode of loading, always SLO_LOAD
|
||||||
|
* @param newgm switch to this mode of loading fails due to some unknown error
|
||||||
* @param subdir default directory to look for filename, set to 0 if not needed
|
* @param subdir default directory to look for filename, set to 0 if not needed
|
||||||
* @param lf Load filter to use, if NULL: use filename + subdir.
|
* @param lf Load filter to use, if NULL: use filename + subdir.
|
||||||
*/
|
*/
|
||||||
|
@ -1948,7 +1948,6 @@ void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist, bool reset_order_indic
|
|||||||
* Clamp the service interval to the correct min/max. The actual min/max values
|
* Clamp the service interval to the correct min/max. The actual min/max values
|
||||||
* depend on whether it's in percent or days.
|
* depend on whether it's in percent or days.
|
||||||
* @param interval proposed service interval
|
* @param interval proposed service interval
|
||||||
* @param company_id the owner of the vehicle
|
|
||||||
* @return Clamped service interval
|
* @return Clamped service interval
|
||||||
*/
|
*/
|
||||||
uint16 GetServiceIntervalClamped(uint interval, bool ispercent)
|
uint16 GetServiceIntervalClamped(uint interval, bool ispercent)
|
||||||
|
@ -625,11 +625,11 @@ char *convert_from_fs(const TCHAR *name, char *utf8_buf, size_t buflen)
|
|||||||
* Convert from OpenTTD's encoding to that of the environment in
|
* Convert from OpenTTD's encoding to that of the environment in
|
||||||
* UNICODE. OpenTTD encoding is UTF8, local is wide
|
* UNICODE. OpenTTD encoding is UTF8, local is wide
|
||||||
* @param name pointer to a valid string that will be converted
|
* @param name pointer to a valid string that will be converted
|
||||||
* @param utf16_buf pointer to a valid wide-char buffer that will receive the
|
* @param system_buf pointer to a valid wide-char buffer that will receive the
|
||||||
* converted string
|
* converted string
|
||||||
* @param buflen length in wide characters of the receiving buffer
|
* @param buflen length in wide characters of the receiving buffer
|
||||||
* @param console_cp convert to the console encoding instead of the normal system encoding.
|
* @param console_cp convert to the console encoding instead of the normal system encoding.
|
||||||
* @return pointer to utf16_buf. If conversion fails the string is of zero-length
|
* @return pointer to system_buf. If conversion fails the string is of zero-length
|
||||||
*/
|
*/
|
||||||
TCHAR *convert_to_fs(const char *name, TCHAR *system_buf, size_t buflen, bool console_cp)
|
TCHAR *convert_to_fs(const char *name, TCHAR *system_buf, size_t buflen, bool console_cp)
|
||||||
{
|
{
|
||||||
|
@ -437,9 +437,9 @@ void UpdateOSKOriginalText(const Window *parent, int button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the OSK is opened for a specific editbox.
|
* Check whether the OSK is opened for a specific editbox.
|
||||||
* @parent w Window to check for
|
* @param w Window to check for
|
||||||
* @param button Editbox of \a w to check for
|
* @param button Editbox of \a w to check for
|
||||||
* @return true if the OSK is oppened for \a button.
|
* @return true if the OSK is opened for \a button.
|
||||||
*/
|
*/
|
||||||
bool IsOSKOpenedFor(const Window *w, int button)
|
bool IsOSKOpenedFor(const Window *w, int button)
|
||||||
{
|
{
|
||||||
|
@ -156,7 +156,7 @@ void AyStar::CheckTile(AyStarNode *current, OpenListNode *parent)
|
|||||||
* his neighbour items. If they are valid, they are added to be checked too.
|
* his neighbour items. If they are valid, they are added to be checked too.
|
||||||
* @return Possible values:
|
* @return Possible values:
|
||||||
* - #AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path has been found.
|
* - #AYSTAR_EMPTY_OPENLIST : indicates all items are tested, and no path has been found.
|
||||||
* - #AYSTAR_LIMIT_REACHED : Indicates that the max_nodes limit has been reached.
|
* - #AYSTAR_LIMIT_REACHED : Indicates that the max_search_nodes limit has been reached.
|
||||||
* - #AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found.
|
* - #AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found.
|
||||||
* - #AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try.
|
* - #AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try.
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ enum AystarStatus {
|
|||||||
AYSTAR_EMPTY_OPENLIST, ///< All items are tested, and no path has been found.
|
AYSTAR_EMPTY_OPENLIST, ///< All items are tested, and no path has been found.
|
||||||
AYSTAR_STILL_BUSY, ///< Some checking was done, but no path found yet, and there are still items left to try.
|
AYSTAR_STILL_BUSY, ///< Some checking was done, but no path found yet, and there are still items left to try.
|
||||||
AYSTAR_NO_PATH, ///< No path to the goal was found.
|
AYSTAR_NO_PATH, ///< No path to the goal was found.
|
||||||
AYSTAR_LIMIT_REACHED, ///< The #max_nodes limit has been reached, aborting search.
|
AYSTAR_LIMIT_REACHED, ///< The #AyStar::max_search_nodes limit has been reached, aborting search.
|
||||||
AYSTAR_DONE, ///< Not an end-tile, or wrong direction.
|
AYSTAR_DONE, ///< Not an end-tile, or wrong direction.
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,9 +93,9 @@ typedef int32 AyStar_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNod
|
|||||||
typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent);
|
typedef int32 AyStar_CalculateH(AyStar *aystar, AyStarNode *current, OpenListNode *parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function requests the tiles around the current tile and put them in #tiles_around.
|
* This function requests the tiles around the current tile and put them in #neighbours.
|
||||||
* #tiles_around is never reset, so if you are not using directions, just leave it alone.
|
* #neighbours is never reset, so if you are not using directions, just leave it alone.
|
||||||
* \warning Never add more tiles_around than memory allocated for it.
|
* @warning Never add more #neighbours than memory allocated for it.
|
||||||
*/
|
*/
|
||||||
typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current);
|
typedef void AyStar_GetNeighbours(AyStar *aystar, OpenListNode *current);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_>
|
|||||||
class CNodeList_HashTableT {
|
class CNodeList_HashTableT {
|
||||||
public:
|
public:
|
||||||
typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class.
|
typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class.
|
||||||
typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of #HashTable.
|
typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of this class.
|
||||||
typedef SmallArray<Titem_, 65536, 256> CItemArray; ///< Type that we will use as item container.
|
typedef SmallArray<Titem_, 65536, 256> CItemArray; ///< Type that we will use as item container.
|
||||||
typedef CHashTableT<Titem_, Thash_bits_open_ > COpenList; ///< How pointers to open nodes will be stored.
|
typedef CHashTableT<Titem_, Thash_bits_open_ > COpenList; ///< How pointers to open nodes will be stored.
|
||||||
typedef CHashTableT<Titem_, Thash_bits_closed_> CClosedList; ///< How pointers to closed nodes will be stored.
|
typedef CHashTableT<Titem_, Thash_bits_closed_> CClosedList; ///< How pointers to closed nodes will be stored.
|
||||||
|
@ -251,7 +251,7 @@ RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the rail types the given company can build.
|
* Get the rail types the given company can build.
|
||||||
* @param c the company to get the rail types for.
|
* @param company the company to get the rail types for.
|
||||||
* @return the rail types.
|
* @return the rail types.
|
||||||
*/
|
*/
|
||||||
RailTypes GetCompanyRailtypes(CompanyID company)
|
RailTypes GetCompanyRailtypes(CompanyID company)
|
||||||
|
@ -239,7 +239,7 @@ public:
|
|||||||
* When #INVALID_DATE or a vehicle using this railtype gets introduced earlier,
|
* When #INVALID_DATE or a vehicle using this railtype gets introduced earlier,
|
||||||
* the vehicle's introduction date will be used instead for this railtype.
|
* the vehicle's introduction date will be used instead for this railtype.
|
||||||
* The introduction at this date is furthermore limited by the
|
* The introduction at this date is furthermore limited by the
|
||||||
* #introduction_required_types.
|
* #introduction_required_railtypes.
|
||||||
*/
|
*/
|
||||||
Date introduction_date;
|
Date introduction_date;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static inline bool IsValidRoadType(RoadType rt)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the given roadtype is valid.
|
* Whether the given roadtype is valid.
|
||||||
* @param rt the roadtype to check for validness
|
* @param r the roadtype to check for validness
|
||||||
* @return true if and only if valid
|
* @return true if and only if valid
|
||||||
*/
|
*/
|
||||||
static inline bool IsValidRoadBits(RoadBits r)
|
static inline bool IsValidRoadBits(RoadBits r)
|
||||||
|
@ -255,7 +255,7 @@ void RoadVehUpdateCache(RoadVehicle *v, bool same_length)
|
|||||||
* @param flags type of operation.
|
* @param flags type of operation.
|
||||||
* @param e the engine to build.
|
* @param e the engine to build.
|
||||||
* @param data unused.
|
* @param data unused.
|
||||||
* @param ret[out] the vehicle that has been built.
|
* @param[out] ret the vehicle that has been built.
|
||||||
* @return the cost of this operation or an error.
|
* @return the cost of this operation or an error.
|
||||||
*/
|
*/
|
||||||
CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
||||||
|
@ -132,7 +132,7 @@ static const SaveLoad _edge_desc[] = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Save/load a link graph.
|
* Save/load a link graph.
|
||||||
* @param comp Link graph to be saved or loaded.
|
* @param lg Link graph to be saved or loaded.
|
||||||
*/
|
*/
|
||||||
void SaveLoad_LinkGraph(LinkGraph &lg)
|
void SaveLoad_LinkGraph(LinkGraph &lg)
|
||||||
{
|
{
|
||||||
|
@ -2786,7 +2786,7 @@ SaveOrLoadResult LoadWithFilter(LoadFilter *reader)
|
|||||||
* Main Save or Load function where the high-level saveload functions are
|
* Main Save or Load function where the high-level saveload functions are
|
||||||
* handled. It opens the savegame, selects format and checks versions
|
* handled. It opens the savegame, selects format and checks versions
|
||||||
* @param filename The name of the savegame being created/loaded
|
* @param filename The name of the savegame being created/loaded
|
||||||
* @param mode Save or load mode. Load can also be a TTD(Patch) game. Use #SL_LOAD, #SL_OLD_LOAD, #SL_LOAD_CHECK, or #SL_SAVE.
|
* @param fop Save or load mode. Load can also be a TTD(Patch) game.
|
||||||
* @param sb The sub directory to save the savegame in
|
* @param sb The sub directory to save the savegame in
|
||||||
* @param threaded True when threaded saving is allowed
|
* @param threaded True when threaded saving is allowed
|
||||||
* @return Return the result of the action. #SL_OK, #SL_ERROR, or #SL_REINIT ("unload" the game)
|
* @return Return the result of the action. #SL_OK, #SL_ERROR, or #SL_REINIT ("unload" the game)
|
||||||
|
@ -488,7 +488,7 @@ static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_
|
|||||||
* Get the NumberType of a setting. This describes the integer type
|
* Get the NumberType of a setting. This describes the integer type
|
||||||
* as it is represented in memory
|
* as it is represented in memory
|
||||||
* @param type VarType holding information about the variable-type
|
* @param type VarType holding information about the variable-type
|
||||||
* @return return the SLE_VAR_* part of a variable-type description
|
* @return the SLE_VAR_* part of a variable-type description
|
||||||
*/
|
*/
|
||||||
static inline VarType GetVarMemType(VarType type)
|
static inline VarType GetVarMemType(VarType type)
|
||||||
{
|
{
|
||||||
@ -496,10 +496,10 @@ static inline VarType GetVarMemType(VarType type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the #FileType of a setting. This describes the integer type
|
* Get the FileType of a setting. This describes the integer type
|
||||||
* as it is represented in a savegame/file
|
* as it is represented in a savegame/file
|
||||||
* @param type VarType holding information about the file-type
|
* @param type VarType holding information about the file-type
|
||||||
* @param return the SLE_FILE_* part of a variable-type description
|
* @return the SLE_FILE_* part of a variable-type description
|
||||||
*/
|
*/
|
||||||
static inline VarType GetVarFileType(VarType type)
|
static inline VarType GetVarFileType(VarType type)
|
||||||
{
|
{
|
||||||
|
@ -708,7 +708,7 @@ static bool MakeSmallScreenshot(bool crashlog)
|
|||||||
/**
|
/**
|
||||||
* Configure a ViewPort for rendering (a part of) the map into a screenshot.
|
* Configure a ViewPort for rendering (a part of) the map into a screenshot.
|
||||||
* @param t Screenshot type
|
* @param t Screenshot type
|
||||||
* @param [out] vp Result viewport
|
* @param[out] vp Result viewport
|
||||||
*/
|
*/
|
||||||
void SetupScreenshotViewport(ScreenshotType t, ViewPort *vp)
|
void SetupScreenshotViewport(ScreenshotType t, ViewPort *vp)
|
||||||
{
|
{
|
||||||
@ -764,7 +764,7 @@ static bool MakeLargeWorldScreenshot(ScreenshotType t)
|
|||||||
/**
|
/**
|
||||||
* Callback for generating a heightmap. Supports 8bpp grayscale only.
|
* Callback for generating a heightmap. Supports 8bpp grayscale only.
|
||||||
* @param userdata Pointer to user data.
|
* @param userdata Pointer to user data.
|
||||||
* @param buf Destination buffer.
|
* @param buffer Destination buffer.
|
||||||
* @param y Line number of the first line to write.
|
* @param y Line number of the first line to write.
|
||||||
* @param pitch Number of pixels to write (1 byte for 8bpp, 4 bytes for 32bpp). @see Colour
|
* @param pitch Number of pixels to write (1 byte for 8bpp, 4 bytes for 32bpp). @see Colour
|
||||||
* @param n Number of lines to write.
|
* @param n Number of lines to write.
|
||||||
|
@ -1459,7 +1459,7 @@ static int DecodeHexNibble(char c)
|
|||||||
* Parse a sequence of characters (supposedly hex digits) into a sequence of bytes.
|
* Parse a sequence of characters (supposedly hex digits) into a sequence of bytes.
|
||||||
* After the hex number should be a \c '|' character.
|
* After the hex number should be a \c '|' character.
|
||||||
* @param pos First character to convert.
|
* @param pos First character to convert.
|
||||||
* @param dest [out] Output byte array to write the bytes.
|
* @param[out] dest Output byte array to write the bytes.
|
||||||
* @param dest_size Number of bytes in \a dest.
|
* @param dest_size Number of bytes in \a dest.
|
||||||
* @return Whether reading was successful.
|
* @return Whether reading was successful.
|
||||||
*/
|
*/
|
||||||
@ -1748,7 +1748,7 @@ void SaveToConfig()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of known NewGrf presets.
|
* Get the list of known NewGrf presets.
|
||||||
* @param list[inout] Pointer to list for storing the preset names.
|
* @param[in,out] list Pointer to list for storing the preset names.
|
||||||
*/
|
*/
|
||||||
void GetGRFPresetList(GRFPresetList *list)
|
void GetGRFPresetList(GRFPresetList *list)
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ struct GUISettings {
|
|||||||
bool smooth_scroll; ///< smooth scroll viewports
|
bool smooth_scroll; ///< smooth scroll viewports
|
||||||
bool measure_tooltip; ///< show a permanent tooltip when dragging tools
|
bool measure_tooltip; ///< show a permanent tooltip when dragging tools
|
||||||
byte liveries; ///< options for displaying company liveries, 0=none, 1=self, 2=all
|
byte liveries; ///< options for displaying company liveries, 0=none, 1=self, 2=all
|
||||||
bool prefer_teamchat; ///< choose the chat message target with <ENTER>, true=all clients, false=your team
|
bool prefer_teamchat; ///< choose the chat message target with \<ENTER\>, true=all clients, false=your team
|
||||||
uint8 advanced_vehicle_list; ///< use the "advanced" vehicle list
|
uint8 advanced_vehicle_list; ///< use the "advanced" vehicle list
|
||||||
uint8 loading_indicators; ///< show loading indicators
|
uint8 loading_indicators; ///< show loading indicators
|
||||||
uint8 default_rail_type; ///< the default rail type for the rail GUI
|
uint8 default_rail_type; ///< the default rail type for the rail GUI
|
||||||
|
@ -205,7 +205,6 @@ static const char *DEFAULTS_GROUP_NAME = "defaults"; ///< Name of the group c
|
|||||||
/**
|
/**
|
||||||
* Load the INI file.
|
* Load the INI file.
|
||||||
* @param filename Name of the file to load.
|
* @param filename Name of the file to load.
|
||||||
* @param subdir The subdirectory to load from.
|
|
||||||
* @return Loaded INI data.
|
* @return Loaded INI data.
|
||||||
*/
|
*/
|
||||||
static IniLoadFile *LoadIniFile(const char *filename)
|
static IniLoadFile *LoadIniFile(const char *filename)
|
||||||
@ -413,12 +412,12 @@ static const OptionData _opts[] = {
|
|||||||
* After loading, the [pre-amble] group is copied verbatim if it exists.
|
* After loading, the [pre-amble] group is copied verbatim if it exists.
|
||||||
*
|
*
|
||||||
* For every group with a name that matches a template name the template is written.
|
* For every group with a name that matches a template name the template is written.
|
||||||
* It starts with a optional '#if' line if an 'if' item exists in the group. The item
|
* It starts with a optional \c \#if line if an 'if' item exists in the group. The item
|
||||||
* value is used as condition. Similarly, '#ifdef' and '#ifndef' lines are also written.
|
* value is used as condition. Similarly, \c \#ifdef and \c \#ifndef lines are also written.
|
||||||
* Below the macro processor directives, the value of the template is written
|
* Below the macro processor directives, the value of the template is written
|
||||||
* at a line with its variables replaced by item values of the group being written.
|
* at a line with its variables replaced by item values of the group being written.
|
||||||
* If the group has no item for the variable, the [defaults] group is tried as fall back.
|
* If the group has no item for the variable, the [defaults] group is tried as fall back.
|
||||||
* Finally, '#endif' lines are written to match the macro processor lines.
|
* Finally, \c \#endif lines are written to match the macro processor lines.
|
||||||
*
|
*
|
||||||
* Last but not least, the [post-amble] group is copied verbatim.
|
* Last but not least, the [post-amble] group is copied verbatim.
|
||||||
*
|
*
|
||||||
|
@ -654,7 +654,7 @@ bool Ship::Tick()
|
|||||||
* @param flags type of operation.
|
* @param flags type of operation.
|
||||||
* @param e the engine to build.
|
* @param e the engine to build.
|
||||||
* @param data unused.
|
* @param data unused.
|
||||||
* @param ret[out] the vehicle that has been built.
|
* @param[out] ret the vehicle that has been built.
|
||||||
* @return the cost of this operation or an error.
|
* @return the cost of this operation or an error.
|
||||||
*/
|
*/
|
||||||
CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
||||||
|
@ -416,7 +416,7 @@ static const byte _tiletype_importance[] = {
|
|||||||
/**
|
/**
|
||||||
* Return the colour a tile would be displayed with in the small map in mode "Contour".
|
* Return the colour a tile would be displayed with in the small map in mode "Contour".
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "Contour"
|
* @return The colour of tile in the small map in mode "Contour"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t)
|
||||||
@ -429,7 +429,7 @@ static inline uint32 GetSmallMapContoursPixels(TileIndex tile, TileType t)
|
|||||||
* Return the colour a tile would be displayed with in the small map in mode "Vehicles".
|
* Return the colour a tile would be displayed with in the small map in mode "Vehicles".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "Vehicles"
|
* @return The colour of tile in the small map in mode "Vehicles"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t)
|
||||||
@ -442,7 +442,7 @@ static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile, TileType t)
|
|||||||
* Return the colour a tile would be displayed with in the small map in mode "Industries".
|
* Return the colour a tile would be displayed with in the small map in mode "Industries".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "Industries"
|
* @return The colour of tile in the small map in mode "Industries"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t)
|
||||||
@ -455,7 +455,7 @@ static inline uint32 GetSmallMapIndustriesPixels(TileIndex tile, TileType t)
|
|||||||
* Return the colour a tile would be displayed with in the small map in mode "Routes".
|
* Return the colour a tile would be displayed with in the small map in mode "Routes".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "Routes"
|
* @return The colour of tile in the small map in mode "Routes"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t)
|
||||||
@ -488,7 +488,7 @@ static inline uint32 GetSmallMapRoutesPixels(TileIndex tile, TileType t)
|
|||||||
* Return the colour a tile would be displayed with in the small map in mode "link stats".
|
* Return the colour a tile would be displayed with in the small map in mode "link stats".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "link stats"
|
* @return The colour of tile in the small map in mode "link stats"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapLinkStatsPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapLinkStatsPixels(TileIndex tile, TileType t)
|
||||||
@ -511,7 +511,7 @@ static const uint32 _vegetation_clear_bits[] = {
|
|||||||
* Return the colour a tile would be displayed with in the smallmap in mode "Vegetation".
|
* Return the colour a tile would be displayed with in the smallmap in mode "Vegetation".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the smallmap in mode "Vegetation"
|
* @return The colour of tile in the smallmap in mode "Vegetation"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t)
|
||||||
@ -538,7 +538,7 @@ static inline uint32 GetSmallMapVegetationPixels(TileIndex tile, TileType t)
|
|||||||
* Return the colour a tile would be displayed with in the small map in mode "Owner".
|
* Return the colour a tile would be displayed with in the small map in mode "Owner".
|
||||||
*
|
*
|
||||||
* @param tile The tile of which we would like to get the colour.
|
* @param tile The tile of which we would like to get the colour.
|
||||||
* @param t Effective tile type of the tile (see #GetTileColours).
|
* @param t Effective tile type of the tile (see #SmallMapWindow::GetTileColours).
|
||||||
* @return The colour of tile in the small map in mode "Owner"
|
* @return The colour of tile in the small map in mode "Owner"
|
||||||
*/
|
*/
|
||||||
static inline uint32 GetSmallMapOwnerPixels(TileIndex tile, TileType t)
|
static inline uint32 GetSmallMapOwnerPixels(TileIndex tile, TileType t)
|
||||||
@ -611,7 +611,7 @@ inline Point SmallMapWindow::RemapTile(int tile_x, int tile_y) const
|
|||||||
* that tile for a point in the smallmap.
|
* that tile for a point in the smallmap.
|
||||||
* @param px Horizontal coordinate of the pixel.
|
* @param px Horizontal coordinate of the pixel.
|
||||||
* @param py Vertical coordinate of the pixel.
|
* @param py Vertical coordinate of the pixel.
|
||||||
* @param sub[out] Pixel position at the tile (0..3).
|
* @param[out] sub Pixel position at the tile (0..3).
|
||||||
* @param add_sub Add current #subscroll to the position.
|
* @param add_sub Add current #subscroll to the position.
|
||||||
* @return Tile being displayed at the given position relative to #scroll_x and #scroll_y.
|
* @return Tile being displayed at the given position relative to #scroll_x and #scroll_y.
|
||||||
* @note The #subscroll offset is already accounted for.
|
* @note The #subscroll offset is already accounted for.
|
||||||
@ -641,11 +641,11 @@ inline Point SmallMapWindow::PixelToTile(int px, int py, int *sub, bool add_sub)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute base parameters of the smallmap such that tile (\a tx, \a ty) starts at pixel (\a x, \a y).
|
* Compute base parameters of the smallmap such that tile (\a tx, \a ty) starts at pixel (\a x, \a y).
|
||||||
* @param tx Tile x coordinate.
|
* @param tx Tile x coordinate.
|
||||||
* @param ty Tile y coordinate.
|
* @param ty Tile y coordinate.
|
||||||
* @param x Non-negative horizontal position in the display where the tile starts.
|
* @param x Non-negative horizontal position in the display where the tile starts.
|
||||||
* @param y Non-negative vertical position in the display where the tile starts.
|
* @param y Non-negative vertical position in the display where the tile starts.
|
||||||
* @param sub [out] Value of #subscroll needed.
|
* @param[out] sub Value of #subscroll needed.
|
||||||
* @return #scroll_x, #scroll_y values.
|
* @return #scroll_x, #scroll_y values.
|
||||||
*/
|
*/
|
||||||
Point SmallMapWindow::ComputeScroll(int tx, int ty, int x, int y, int *sub)
|
Point SmallMapWindow::ComputeScroll(int tx, int ty, int x, int y, int *sub)
|
||||||
|
@ -516,7 +516,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Construct the iterator.
|
* Construct the iterator.
|
||||||
* @param ta Area, i.e. begin point and width/height of to-be-iterated area.
|
* @param st Station the airport is part of.
|
||||||
*/
|
*/
|
||||||
AirportTileIterator(const Station *st) : OrthogonalTileIterator(st->airport), st(st)
|
AirportTileIterator(const Station *st) : OrthogonalTileIterator(st->airport), st(st)
|
||||||
{
|
{
|
||||||
|
@ -662,7 +662,7 @@ static void UpdateStationSignCoord(BaseStation *st)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Common part of building various station parts and possibly attaching them to an existing one.
|
* Common part of building various station parts and possibly attaching them to an existing one.
|
||||||
* @param [in,out] st Station to attach to
|
* @param[in,out] st Station to attach to
|
||||||
* @param flags Command flags
|
* @param flags Command flags
|
||||||
* @param reuse Whether to try to reuse a deleted station (gray sign) if possible
|
* @param reuse Whether to try to reuse a deleted station (gray sign) if possible
|
||||||
* @param area Area occupied by the new part
|
* @param area Area occupied by the new part
|
||||||
@ -2624,9 +2624,9 @@ const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx)
|
|||||||
* Check whether a sprite is a track sprite, which can be replaced by a non-track ground sprite and a rail overlay.
|
* Check whether a sprite is a track sprite, which can be replaced by a non-track ground sprite and a rail overlay.
|
||||||
* If the ground sprite is suitable, \a ground is replaced with the new non-track ground sprite, and \a overlay_offset
|
* If the ground sprite is suitable, \a ground is replaced with the new non-track ground sprite, and \a overlay_offset
|
||||||
* is set to the overlay to draw.
|
* is set to the overlay to draw.
|
||||||
* @param ti Positional info for the tile to decide snowyness etc. May be NULL.
|
* @param ti Positional info for the tile to decide snowyness etc. May be NULL.
|
||||||
* @param [in,out] ground Groundsprite to draw.
|
* @param[in,out] ground Groundsprite to draw.
|
||||||
* @param [out] overlay_offset Overlay to draw.
|
* @param[out] overlay_offset Overlay to draw.
|
||||||
* @return true if overlay can be drawn.
|
* @return true if overlay can be drawn.
|
||||||
*/
|
*/
|
||||||
bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset)
|
bool SplitGroundSpriteForOverlay(const TileInfo *ti, SpriteID *ground, RailTrackOffset *overlay_offset)
|
||||||
|
@ -802,7 +802,6 @@ static const NWidgetPart _nested_station_view_widgets[] = {
|
|||||||
* @param left left most coordinate to draw on
|
* @param left left most coordinate to draw on
|
||||||
* @param right right most coordinate to draw on
|
* @param right right most coordinate to draw on
|
||||||
* @param y y coordinate
|
* @param y y coordinate
|
||||||
* @param width the width of the view
|
|
||||||
*/
|
*/
|
||||||
static void DrawCargoIcons(CargoID i, uint waiting, int left, int right, int y)
|
static void DrawCargoIcons(CargoID i, uint waiting, int left, int right, int y)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ void LangString::FreeTranslation()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new string data container.
|
* Create a new string data container.
|
||||||
* @param max_strings The maximum number of strings.
|
* @param tabs The maximum number of strings.
|
||||||
*/
|
*/
|
||||||
StringData::StringData(size_t tabs) : tabs(tabs), max_strings(tabs * TAB_SIZE)
|
StringData::StringData(size_t tabs) : tabs(tabs), max_strings(tabs * TAB_SIZE)
|
||||||
{
|
{
|
||||||
|
@ -41,9 +41,9 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the current string cursor.
|
* Change the current string cursor.
|
||||||
* @param p New cursor position.
|
* @param pos New cursor position.
|
||||||
* @return Actual new cursor position at the next valid character boundary.
|
* @return Actual new cursor position at the next valid character boundary.
|
||||||
* @pre p has to be inside the current string.
|
* @pre pos has to be inside the current string.
|
||||||
*/
|
*/
|
||||||
virtual size_t SetCurPosition(size_t pos) = 0;
|
virtual size_t SetCurPosition(size_t pos) = 0;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ icu::Collator *_current_collator = NULL; ///< Collator for the language
|
|||||||
#endif /* WITH_ICU_SORT */
|
#endif /* WITH_ICU_SORT */
|
||||||
|
|
||||||
static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
||||||
static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters
|
static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_global_string_params
|
||||||
StringParameters _global_string_params(_global_string_params_data, 20, _global_string_params_type);
|
StringParameters _global_string_params(_global_string_params_data, 20, _global_string_params_type);
|
||||||
|
|
||||||
/** Reset the type array. */
|
/** Reset the type array. */
|
||||||
@ -760,11 +760,10 @@ uint ConvertDisplaySpeedToKmhishSpeed(uint speed)
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Parse most format codes within a string and write the result to a buffer.
|
* Parse most format codes within a string and write the result to a buffer.
|
||||||
* @param buff The buffer to write the final string to.
|
* @param buff The buffer to write the final string to.
|
||||||
* @param str The original string with format codes.
|
* @param str_arg The original string with format codes.
|
||||||
* @param args Pointer to extra arguments used by various string codes.
|
* @param args Pointer to extra arguments used by various string codes.
|
||||||
* @param case_index
|
* @param last Pointer to just past the end of the buff array.
|
||||||
* @param last Pointer to just past the end of the buff array.
|
|
||||||
* @param dry_run True when the argt array is not yet initialized.
|
* @param dry_run True when the argt array is not yet initialized.
|
||||||
*/
|
*/
|
||||||
static char *FormatString(char *buff, const char *str_arg, StringParameters *args, const char *last, uint case_index, bool game_script, bool dry_run)
|
static char *FormatString(char *buff, const char *str_arg, StringParameters *args, const char *last, uint case_index, bool game_script, bool dry_run)
|
||||||
@ -2003,7 +2002,7 @@ const char *GetCurrentLanguageIsoCode()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether there are glyphs missing in the current language.
|
* Check whether there are glyphs missing in the current language.
|
||||||
* @param Pointer to an address for storing the text pointer.
|
* @param[out] str Pointer to an address for storing the text pointer.
|
||||||
* @return If glyphs are missing, return \c true, else return \c false.
|
* @return If glyphs are missing, return \c true, else return \c false.
|
||||||
* @post If \c true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph.
|
* @post If \c true is returned and str is not NULL, *str points to a string that is found to contain at least one missing glyph.
|
||||||
*/
|
*/
|
||||||
|
@ -367,7 +367,6 @@ bool Textbuf::MovePos(uint16 keycode)
|
|||||||
/**
|
/**
|
||||||
* Initialize the textbuffer by supplying it the buffer to write into
|
* Initialize the textbuffer by supplying it the buffer to write into
|
||||||
* and the maximum length of this buffer
|
* and the maximum length of this buffer
|
||||||
* @param buf the buffer that will be holding the data for input
|
|
||||||
* @param max_bytes maximum size in bytes, including terminating '\0'
|
* @param max_bytes maximum size in bytes, including terminating '\0'
|
||||||
* @param max_chars maximum size in chars, including terminating '\0'
|
* @param max_chars maximum size in chars, including terminating '\0'
|
||||||
*/
|
*/
|
||||||
|
@ -70,11 +70,11 @@ uint TileHeightOutsideMap(int x, int y)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a tile's slope given the heigh of its four corners.
|
* Get a tile's slope given the heigh of its four corners.
|
||||||
* @param hnorth The height at the northern corner in the same unit as TileHeight.
|
* @param hnorth The height at the northern corner in the same unit as TileHeight.
|
||||||
* @param hwest The height at the western corner in the same unit as TileHeight.
|
* @param hwest The height at the western corner in the same unit as TileHeight.
|
||||||
* @param heast The height at the eastern corner in the same unit as TileHeight.
|
* @param heast The height at the eastern corner in the same unit as TileHeight.
|
||||||
* @param hsouth The height at the southern corner in the same unit as TileHeight.
|
* @param hsouth The height at the southern corner in the same unit as TileHeight.
|
||||||
* @param [out] h The lowest height of the four corners.
|
* @param[out] h The lowest height of the four corners.
|
||||||
* @return The slope.
|
* @return The slope.
|
||||||
*/
|
*/
|
||||||
static Slope GetTileSlopeGivenHeight(int hnorth, int hwest, int heast, int hsouth, int *h)
|
static Slope GetTileSlopeGivenHeight(int hnorth, int hwest, int heast, int hsouth, int *h)
|
||||||
@ -134,7 +134,8 @@ Slope GetTileSlope(TileIndex tile, int *h)
|
|||||||
/**
|
/**
|
||||||
* Return the slope of a given tile outside the map.
|
* Return the slope of a given tile outside the map.
|
||||||
*
|
*
|
||||||
* @param tile Tile outside the map to compute slope of.
|
* @param x X-coordinate of the tile outside to compute height of.
|
||||||
|
* @param y Y-coordinate of the tile outside to compute height of.
|
||||||
* @param h If not \c NULL, pointer to storage of z height.
|
* @param h If not \c NULL, pointer to storage of z height.
|
||||||
* @return Slope of the tile outside map, except for the HALFTILE part.
|
* @return Slope of the tile outside map, except for the HALFTILE part.
|
||||||
*/
|
*/
|
||||||
@ -194,7 +195,8 @@ int GetTileZ(TileIndex tile)
|
|||||||
/**
|
/**
|
||||||
* Get bottom height of the tile outside map.
|
* Get bottom height of the tile outside map.
|
||||||
*
|
*
|
||||||
* @param tile Tile outside the map to compute height of.
|
* @param x X-coordinate of the tile outside to compute height of.
|
||||||
|
* @param y Y-coordinate of the tile outside to compute height of.
|
||||||
* @return Minimum height of the tile outside the map.
|
* @return Minimum height of the tile outside the map.
|
||||||
*/
|
*/
|
||||||
int GetTilePixelZOutsideMap(int x, int y)
|
int GetTilePixelZOutsideMap(int x, int y)
|
||||||
@ -229,7 +231,8 @@ int GetTileMaxZ(TileIndex t)
|
|||||||
*
|
*
|
||||||
* @see Detailed description in header.
|
* @see Detailed description in header.
|
||||||
*
|
*
|
||||||
* @param tile Tile outside to compute height of.
|
* @param x X-coordinate of the tile outside to compute height of.
|
||||||
|
* @param y Y-coordinate of the tile outside to compute height of.
|
||||||
* @return Maximum height of the tile.
|
* @return Maximum height of the tile.
|
||||||
*/
|
*/
|
||||||
int GetTileMaxPixelZOutsideMap(int x, int y)
|
int GetTileMaxPixelZOutsideMap(int x, int y)
|
||||||
|
@ -293,7 +293,7 @@ int GetTilePixelZOutsideMap(int x, int y);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get top height of the tile
|
* Get top height of the tile
|
||||||
* @param t Tile to compute height of
|
* @param tile Tile to compute height of
|
||||||
* @return Maximum height of the tile
|
* @return Maximum height of the tile
|
||||||
*/
|
*/
|
||||||
static inline int GetTileMaxPixelZ(TileIndex tile)
|
static inline int GetTileMaxPixelZ(TileIndex tile)
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the area of the matrix square that contains a specific tile.
|
* Get the area of the matrix square that contains a specific tile.
|
||||||
* @param The tile to get the map area for.
|
* @param tile The tile to get the map area for.
|
||||||
* @param extend Extend the area by this many squares on all sides.
|
* @param extend Extend the area by this many squares on all sides.
|
||||||
* @return Tile area containing the tile.
|
* @return Tile area containing the tile.
|
||||||
*/
|
*/
|
||||||
|
@ -139,7 +139,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for when a time has been chosen to start the time table
|
* Callback for when a time has been chosen to start the time table
|
||||||
* @param window the window related to the setting of the date
|
* @param w the window related to the setting of the date
|
||||||
* @param date the actually chosen date
|
* @param date the actually chosen date
|
||||||
*/
|
*/
|
||||||
static void ChangeTimetableStartCallback(const Window *w, Date date)
|
static void ChangeTimetableStartCallback(const Window *w, Date date)
|
||||||
|
@ -3145,7 +3145,7 @@ static void UpdateTownRating(Town *t)
|
|||||||
/**
|
/**
|
||||||
* Updates town grow counter after growth rate change.
|
* Updates town grow counter after growth rate change.
|
||||||
* Preserves relative house builting progress whenever it can.
|
* Preserves relative house builting progress whenever it can.
|
||||||
* @param town The town to calculate grow counter for
|
* @param t The town to calculate grow counter for
|
||||||
* @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated)
|
* @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated)
|
||||||
*/
|
*/
|
||||||
static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate)
|
static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate)
|
||||||
@ -3160,7 +3160,7 @@ static void UpdateTownGrowCounter(Town *t, uint16 prev_growth_rate)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates amount of active stations in the range of town (HZB_TOWN_EDGE).
|
* Calculates amount of active stations in the range of town (HZB_TOWN_EDGE).
|
||||||
* @param town The town to calculate stations for
|
* @param t The town to calculate stations for
|
||||||
* @returns Amount of active stations
|
* @returns Amount of active stations
|
||||||
*/
|
*/
|
||||||
static int CountActiveStations(Town *t)
|
static int CountActiveStations(Town *t)
|
||||||
@ -3180,7 +3180,7 @@ static int CountActiveStations(Town *t)
|
|||||||
/**
|
/**
|
||||||
* Calculates town growth rate in normal conditions (custom growth rate not set).
|
* Calculates town growth rate in normal conditions (custom growth rate not set).
|
||||||
* If town growth speed is set to None(0) returns the same rate as if it was Normal(2).
|
* If town growth speed is set to None(0) returns the same rate as if it was Normal(2).
|
||||||
* @param town The town to calculate growth rate for
|
* @param t The town to calculate growth rate for
|
||||||
* @returns Calculated growth rate
|
* @returns Calculated growth rate
|
||||||
*/
|
*/
|
||||||
static uint GetNormalGrowthRate(Town *t)
|
static uint GetNormalGrowthRate(Town *t)
|
||||||
@ -3203,7 +3203,7 @@ static uint GetNormalGrowthRate(Town *t)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates town growth rate.
|
* Updates town growth rate.
|
||||||
* @param town The town to update growth rate for
|
* @param t The town to update growth rate for
|
||||||
*/
|
*/
|
||||||
static void UpdateTownGrowthRate(Town *t)
|
static void UpdateTownGrowthRate(Town *t)
|
||||||
{
|
{
|
||||||
@ -3216,7 +3216,7 @@ static void UpdateTownGrowthRate(Town *t)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates town growth state (whether it is growing or not).
|
* Updates town growth state (whether it is growing or not).
|
||||||
* @param town The town to update growth for
|
* @param t The town to update growth for
|
||||||
*/
|
*/
|
||||||
static void UpdateTownGrowth(Town *t)
|
static void UpdateTownGrowth(Town *t)
|
||||||
{
|
{
|
||||||
|
@ -581,7 +581,7 @@ void GetTrainSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs,
|
|||||||
* @param tile tile of the depot where rail-vehicle is built.
|
* @param tile tile of the depot where rail-vehicle is built.
|
||||||
* @param flags type of operation.
|
* @param flags type of operation.
|
||||||
* @param e the engine to build.
|
* @param e the engine to build.
|
||||||
* @param ret[out] the vehicle that has been built.
|
* @param[out] ret the vehicle that has been built.
|
||||||
* @return the cost of this operation or an error.
|
* @return the cost of this operation or an error.
|
||||||
*/
|
*/
|
||||||
static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const Engine *e, Vehicle **ret)
|
static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const Engine *e, Vehicle **ret)
|
||||||
@ -713,7 +713,7 @@ static void AddRearEngineToMultiheadedTrain(Train *v)
|
|||||||
* @param flags type of operation.
|
* @param flags type of operation.
|
||||||
* @param e the engine to build.
|
* @param e the engine to build.
|
||||||
* @param data bit 0 prevents any free cars from being added to the train.
|
* @param data bit 0 prevents any free cars from being added to the train.
|
||||||
* @param ret[out] the vehicle that has been built.
|
* @param[out] ret the vehicle that has been built.
|
||||||
* @return the cost of this operation or an error.
|
* @return the cost of this operation or an error.
|
||||||
*/
|
*/
|
||||||
CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, const Engine *e, uint16 data, Vehicle **ret)
|
||||||
@ -935,8 +935,8 @@ static void NormaliseSubtypes(Train *chain)
|
|||||||
* @note All vehicles are/were 'heads' of their chains.
|
* @note All vehicles are/were 'heads' of their chains.
|
||||||
* @param original_dst The original destination chain.
|
* @param original_dst The original destination chain.
|
||||||
* @param dst The destination chain after constructing the train.
|
* @param dst The destination chain after constructing the train.
|
||||||
* @param original_dst The original source chain.
|
* @param original_src The original source chain.
|
||||||
* @param dst The source chain after constructing the train.
|
* @param src The source chain after constructing the train.
|
||||||
* @return possible error of this command.
|
* @return possible error of this command.
|
||||||
*/
|
*/
|
||||||
static CommandCost CheckNewTrain(Train *original_dst, Train *dst, Train *original_src, Train *src)
|
static CommandCost CheckNewTrain(Train *original_dst, Train *dst, Train *original_src, Train *src)
|
||||||
@ -1054,8 +1054,8 @@ static CommandCost CheckTrainAttachment(Train *t)
|
|||||||
* @note All vehicles are/were 'heads' of their chains.
|
* @note All vehicles are/were 'heads' of their chains.
|
||||||
* @param original_dst The original destination chain.
|
* @param original_dst The original destination chain.
|
||||||
* @param dst The destination chain after constructing the train.
|
* @param dst The destination chain after constructing the train.
|
||||||
* @param original_dst The original source chain.
|
* @param original_src The original source chain.
|
||||||
* @param dst The source chain after constructing the train.
|
* @param src The source chain after constructing the train.
|
||||||
* @param check_limit Whether to check the vehicle limit.
|
* @param check_limit Whether to check the vehicle limit.
|
||||||
* @return possible error of this command.
|
* @return possible error of this command.
|
||||||
*/
|
*/
|
||||||
@ -1511,8 +1511,8 @@ static void MarkTrainAsStuck(Train *v)
|
|||||||
* Swap the two up/down flags in two ways:
|
* Swap the two up/down flags in two ways:
|
||||||
* - Swap values of \a swap_flag1 and \a swap_flag2, and
|
* - Swap values of \a swap_flag1 and \a swap_flag2, and
|
||||||
* - If going up previously (#GVF_GOINGUP_BIT set), the #GVF_GOINGDOWN_BIT is set, and vice versa.
|
* - If going up previously (#GVF_GOINGUP_BIT set), the #GVF_GOINGDOWN_BIT is set, and vice versa.
|
||||||
* @param swap_flag1 [inout] First train flag.
|
* @param[in,out] swap_flag1 First train flag.
|
||||||
* @param swap_flag2 [inout] Second train flag.
|
* @param[in,out] swap_flag2 Second train flag.
|
||||||
*/
|
*/
|
||||||
static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2)
|
static void SwapTrainFlags(uint16 *swap_flag1, uint16 *swap_flag2)
|
||||||
{
|
{
|
||||||
@ -2014,9 +2014,9 @@ static FindDepotData FindClosestTrainDepot(Train *v, int max_distance)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Locate the closest depot for this consist, and return the information to the caller.
|
* Locate the closest depot for this consist, and return the information to the caller.
|
||||||
* @param location [out] If not \c NULL and a depot is found, store its location in the given address.
|
* @param[out] location If not \c NULL and a depot is found, store its location in the given address.
|
||||||
* @param destination [out] If not \c NULL and a depot is found, store its index in the given address.
|
* @param[out] destination If not \c NULL and a depot is found, store its index in the given address.
|
||||||
* @param reverse [out] If not \c NULL and a depot is found, store reversal information in the given address.
|
* @param[out] reverse If not \c NULL and a depot is found, store reversal information in the given address.
|
||||||
* @return A depot has been found.
|
* @return A depot has been found.
|
||||||
*/
|
*/
|
||||||
bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
|
bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
|
||||||
@ -2307,9 +2307,9 @@ static const byte _initial_tile_subcoord[6][4][3] = {
|
|||||||
* @param tile The tile the train is about to enter
|
* @param tile The tile the train is about to enter
|
||||||
* @param enterdir Diagonal direction the train is coming from
|
* @param enterdir Diagonal direction the train is coming from
|
||||||
* @param tracks Usable tracks on the new tile
|
* @param tracks Usable tracks on the new tile
|
||||||
* @param path_found [out] Whether a path has been found or not.
|
* @param[out] path_found Whether a path has been found or not.
|
||||||
* @param do_track_reservation Path reservation is requested
|
* @param do_track_reservation Path reservation is requested
|
||||||
* @param dest [out] State and destination of the requested path
|
* @param[out] dest State and destination of the requested path
|
||||||
* @return The best track the train should follow
|
* @return The best track the train should follow
|
||||||
*/
|
*/
|
||||||
static Track DoTrainPathfind(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool do_track_reservation, PBSTileInfo *dest)
|
static Track DoTrainPathfind(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool do_track_reservation, PBSTileInfo *dest)
|
||||||
@ -2419,11 +2419,11 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, TrackBits *new_tracks,
|
|||||||
* @param override_railtype Whether all physically compatible railtypes should be followed.
|
* @param override_railtype Whether all physically compatible railtypes should be followed.
|
||||||
* @return True if a path to a safe stopping tile could be reserved.
|
* @return True if a path to a safe stopping tile could be reserved.
|
||||||
*/
|
*/
|
||||||
static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_tailtype)
|
static bool TryReserveSafeTrack(const Train *v, TileIndex tile, Trackdir td, bool override_railtype)
|
||||||
{
|
{
|
||||||
switch (_settings_game.pf.pathfinder_for_trains) {
|
switch (_settings_game.pf.pathfinder_for_trains) {
|
||||||
case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_tailtype);
|
case VPF_NPF: return NPFTrainFindNearestSafeTile(v, tile, td, override_railtype);
|
||||||
case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_tailtype);
|
case VPF_YAPF: return YapfTrainFindNearestSafeTile(v, tile, td, override_railtype);
|
||||||
|
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
@ -204,6 +204,7 @@ static CommandCost CheckBridgeSlopeSouth(Axis axis, Slope *tileh, int *z)
|
|||||||
* 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_type Wanted type of bridge.
|
||||||
* @param bridge_len Wanted length of the bridge.
|
* @param bridge_len Wanted length of the bridge.
|
||||||
|
* @param flags Type of operation.
|
||||||
* @return A succeeded (the requested bridge is available) or failed (it cannot be built) command.
|
* @return A succeeded (the requested bridge is available) or failed (it cannot be built) command.
|
||||||
*/
|
*/
|
||||||
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags)
|
CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoCommandFlag flags)
|
||||||
|
@ -95,7 +95,7 @@ INSTANTIATE_POOL_METHODS(Vehicle)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine shared bounds of all sprites.
|
* Determine shared bounds of all sprites.
|
||||||
* @param [out] bounds Shared bounds.
|
* @param[out] bounds Shared bounds.
|
||||||
*/
|
*/
|
||||||
void VehicleSpriteSeq::GetBounds(Rect *bounds) const
|
void VehicleSpriteSeq::GetBounds(Rect *bounds) const
|
||||||
{
|
{
|
||||||
@ -2859,7 +2859,7 @@ const uint16 &Vehicle::GetGroundVehicleFlags() const
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the set of vehicles that will be affected by a given selection.
|
* Calculates the set of vehicles that will be affected by a given selection.
|
||||||
* @param set [inout] Set of affected vehicles.
|
* @param[in,out] set Set of affected vehicles.
|
||||||
* @param v First vehicle of the selection.
|
* @param v First vehicle of the selection.
|
||||||
* @param num_vehicles Number of vehicles in the selection (not counting articulated parts).
|
* @param num_vehicles Number of vehicles in the selection (not counting articulated parts).
|
||||||
* @pre \a set must be empty.
|
* @pre \a set must be empty.
|
||||||
|
@ -324,7 +324,7 @@ public:
|
|||||||
|
|
||||||
uint16 load_unload_ticks; ///< Ticks to wait before starting next cycle.
|
uint16 load_unload_ticks; ///< Ticks to wait before starting next cycle.
|
||||||
GroupID group_id; ///< Index of group Pool array
|
GroupID group_id; ///< Index of group Pool array
|
||||||
byte subtype; ///< subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes)
|
byte subtype; ///< subtype (Filled with values from #AircraftSubType/#DisasterSubType/#EffectVehicleType/#GroundVehicleSubtypeFlags)
|
||||||
|
|
||||||
NewGRFCache grf_cache; ///< Cache of often used calculated NewGRF values
|
NewGRFCache grf_cache; ///< Cache of often used calculated NewGRF values
|
||||||
VehicleCache vcache; ///< Cache of often used vehicle values.
|
VehicleCache vcache; ///< Cache of often used vehicle values.
|
||||||
@ -437,7 +437,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Gets the sprite to show for the given direction
|
* Gets the sprite to show for the given direction
|
||||||
* @param direction the direction the vehicle is facing
|
* @param direction the direction the vehicle is facing
|
||||||
* @param [out] result Vehicle sprite sequence.
|
* @param[out] result Vehicle sprite sequence.
|
||||||
*/
|
*/
|
||||||
virtual void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const { result->Clear(); }
|
virtual void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const { result->Clear(); }
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ CommandCost CmdSellVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|||||||
* @param engine_type Which engine to refit
|
* @param engine_type Which engine to refit
|
||||||
* @param new_cid Cargo type we are refitting to.
|
* @param new_cid Cargo type we are refitting to.
|
||||||
* @param new_subtype New cargo subtype.
|
* @param new_subtype New cargo subtype.
|
||||||
* @param [out] auto_refit_allowed The refit is allowed as an auto-refit.
|
* @param[out] auto_refit_allowed The refit is allowed as an auto-refit.
|
||||||
* @return Price for refitting
|
* @return Price for refitting
|
||||||
*/
|
*/
|
||||||
static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed)
|
static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed)
|
||||||
@ -238,7 +238,7 @@ static int GetRefitCostFactor(const Vehicle *v, EngineID engine_type, CargoID ne
|
|||||||
* @param engine_type Which engine to refit
|
* @param engine_type Which engine to refit
|
||||||
* @param new_cid Cargo type we are refitting to.
|
* @param new_cid Cargo type we are refitting to.
|
||||||
* @param new_subtype New cargo subtype.
|
* @param new_subtype New cargo subtype.
|
||||||
* @param [out] auto_refit_allowed The refit is allowed as an auto-refit.
|
* @param[out] auto_refit_allowed The refit is allowed as an auto-refit.
|
||||||
* @return Price for refitting
|
* @return Price for refitting
|
||||||
*/
|
*/
|
||||||
static CommandCost GetRefitCost(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed)
|
static CommandCost GetRefitCost(const Vehicle *v, EngineID engine_type, CargoID new_cid, byte new_subtype, bool *auto_refit_allowed)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user