mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r19414) -Doc: Several doxygen additions and corrections.
This commit is contained in:
parent
b8d6e893cb
commit
777123c228
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
|
|
||||||
StringID _error_message;
|
StringID _error_message; ///< Global error message. @see CommandCost::SetGlobalErrorMessage()
|
||||||
|
|
||||||
CommandProc CmdBuildRailroadTrack;
|
CommandProc CmdBuildRailroadTrack;
|
||||||
CommandProc CmdRemoveRailroadTrack;
|
CommandProc CmdRemoveRailroadTrack;
|
||||||
|
@ -192,7 +192,7 @@ CommandProc CmdSetTimetableStart;
|
||||||
* The master command table
|
* The master command table
|
||||||
*
|
*
|
||||||
* This table contains all possible CommandProc functions with
|
* This table contains all possible CommandProc functions with
|
||||||
* the flags which belongs to it. The indizes are the same
|
* the flags which belongs to it. The indices are the same
|
||||||
* as the value from the CMD_* enums.
|
* as the value from the CMD_* enums.
|
||||||
*/
|
*/
|
||||||
static const Command _command_proc_table[] = {
|
static const Command _command_proc_table[] = {
|
||||||
|
@ -472,8 +472,8 @@ bool DoCommandP(const CommandContainer *container, bool my_cmd)
|
||||||
/*!
|
/*!
|
||||||
* Toplevel network safe docommand function for the current company. Must not be called recursively.
|
* Toplevel network safe docommand function for the current company. Must not be called recursively.
|
||||||
* The callback is called when the command succeeded or failed. The parameters
|
* The callback is called when the command succeeded or failed. The parameters
|
||||||
* tile, p1 and p2 are from the #CommandProc function. The paramater cmd is the command to execute.
|
* \a tile, \a p1, and \a p2 are from the #CommandProc function. The parameter \a cmd is the command to execute.
|
||||||
* The parameter my_cmd is used to indicate if the command is from a company or the server.
|
* The parameter \a my_cmd is used to indicate if the command is from a company or the server.
|
||||||
*
|
*
|
||||||
* @param tile The tile to perform a command on (see #CommandProc)
|
* @param tile The tile to perform a command on (see #CommandProc)
|
||||||
* @param p1 Additional data for the command (see #CommandProc)
|
* @param p1 Additional data for the command (see #CommandProc)
|
||||||
|
@ -482,7 +482,7 @@ bool DoCommandP(const CommandContainer *container, bool my_cmd)
|
||||||
* @param callback A callback function to call after the command is finished
|
* @param callback A callback function to call after the command is finished
|
||||||
* @param text The text to pass
|
* @param text The text to pass
|
||||||
* @param my_cmd indicator if the command is from a company or server (to display error messages for a user)
|
* @param my_cmd indicator if the command is from a company or server (to display error messages for a user)
|
||||||
* @return true if the command succeeded, else false
|
* @return \c true if the command succeeded, else \c false.
|
||||||
*/
|
*/
|
||||||
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd)
|
bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, bool my_cmd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,6 +91,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the global error message *if* this class has one.
|
* Sets the global error message *if* this class has one.
|
||||||
|
* @see _error_message
|
||||||
*/
|
*/
|
||||||
FORCEINLINE void SetGlobalErrorMessage() const
|
FORCEINLINE void SetGlobalErrorMessage() const
|
||||||
{
|
{
|
||||||
|
@ -99,8 +100,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes this CommandCost behave like an error command.
|
* Makes this #CommandCost behave like an error command.
|
||||||
* @param mesasge the error message.
|
* @param message The error message.
|
||||||
*/
|
*/
|
||||||
void MakeError(StringID message)
|
void MakeError(StringID message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,6 +159,11 @@ void InvalidateCompanyWindows(const Company *company)
|
||||||
SetWindowDirty(WC_FINANCES, cid);
|
SetWindowDirty(WC_FINANCES, cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* @return Function returns \c true if the company has enough money, else it returns \c false.
|
||||||
|
*/
|
||||||
bool CheckCompanyHasMoney(CommandCost &cost)
|
bool CheckCompanyHasMoney(CommandCost &cost)
|
||||||
{
|
{
|
||||||
if (cost.GetCost() > 0) {
|
if (cost.GetCost() > 0) {
|
||||||
|
|
|
@ -31,6 +31,7 @@ DECLARE_ENUM_AS_BIT_SET(RailTypeFlags);
|
||||||
|
|
||||||
struct SpriteGroup;
|
struct SpriteGroup;
|
||||||
|
|
||||||
|
/** Sprite groups for a railtype. */
|
||||||
enum RailTypeSpriteGroup {
|
enum RailTypeSpriteGroup {
|
||||||
RTSG_CURSORS, ///< Cursor and toolbar icon images
|
RTSG_CURSORS, ///< Cursor and toolbar icon images
|
||||||
RTSG_OVERLAY, ///< Images for overlaying track
|
RTSG_OVERLAY, ///< Images for overlaying track
|
||||||
|
|
|
@ -727,7 +727,7 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Build a stretch of railroad tracks.
|
/** Build or remove a stretch of railroad tracks.
|
||||||
* @param tile start tile of drag
|
* @param tile start tile of drag
|
||||||
* @param flags operation to perform
|
* @param flags operation to perform
|
||||||
* @param p1 end tile of drag
|
* @param p1 end tile of drag
|
||||||
|
|
|
@ -60,7 +60,7 @@ enum TreeGround {
|
||||||
TREE_GROUND_ROUGH = 1, ///< some rough tile
|
TREE_GROUND_ROUGH = 1, ///< some rough tile
|
||||||
TREE_GROUND_SNOW_DESERT = 2, ///< a desert or snow tile, depend on landscape
|
TREE_GROUND_SNOW_DESERT = 2, ///< a desert or snow tile, depend on landscape
|
||||||
TREE_GROUND_SHORE = 3, ///< shore
|
TREE_GROUND_SHORE = 3, ///< shore
|
||||||
TREE_GROUND_ROUGH_SNOW = 4, ///< a snow tile that is rough underneed
|
TREE_GROUND_ROUGH_SNOW = 4, ///< A snow tile that is rough underneath.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue