mirror of https://github.com/OpenTTD/OpenTTD
(svn r9552) -Documentation: Some more doxygen work, adding comments too
parent
56943ab584
commit
64f2e6ef07
|
@ -13,18 +13,34 @@
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this is a bridge, instead of a tunnel
|
||||||
|
* @param t The tile to analyze
|
||||||
|
* @pre IsTileType(t, MP_TUNNELBRIDGE)
|
||||||
|
* @return true if the structure is a bridge one
|
||||||
|
*/
|
||||||
static inline bool IsBridge(TileIndex t)
|
static inline bool IsBridge(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_TUNNELBRIDGE));
|
assert(IsTileType(t, MP_TUNNELBRIDGE));
|
||||||
return HASBIT(_m[t].m5, 7);
|
return HASBIT(_m[t].m5, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if there is a bridge on this tile
|
||||||
|
* @param t The tile to analyze
|
||||||
|
* @return true if a bridge is present
|
||||||
|
*/
|
||||||
static inline bool IsBridgeTile(TileIndex t)
|
static inline bool IsBridgeTile(TileIndex t)
|
||||||
{
|
{
|
||||||
return IsTileType(t, MP_TUNNELBRIDGE) && IsBridge(t);
|
return IsTileType(t, MP_TUNNELBRIDGE) && IsBridge(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks for the possibility that a bridge may be on this tile
|
||||||
|
* These are in fact all the tile types on which a bridge can be found
|
||||||
|
* @param t The tile to analyze
|
||||||
|
* @return true if a bridge migh be present
|
||||||
|
*/
|
||||||
static inline bool MayHaveBridgeAbove(TileIndex t)
|
static inline bool MayHaveBridgeAbove(TileIndex t)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
@ -36,7 +52,11 @@ static inline bool MayHaveBridgeAbove(TileIndex t)
|
||||||
IsTileType(t, MP_UNMOVABLE);
|
IsTileType(t, MP_UNMOVABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if a bridge is set above the ground of this tile
|
||||||
|
* @param t The tile to analyze
|
||||||
|
* @return true if a bridge is detected above
|
||||||
|
*/
|
||||||
static inline bool IsBridgeAbove(TileIndex t)
|
static inline bool IsBridgeAbove(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(MayHaveBridgeAbove(t));
|
assert(MayHaveBridgeAbove(t));
|
||||||
|
@ -46,7 +66,7 @@ static inline bool IsBridgeAbove(TileIndex t)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines the type of bridge on a tile
|
* Determines the type of bridge on a tile
|
||||||
* @param tile The tile to analyze
|
* @param t The tile to analyze
|
||||||
* @return The bridge type
|
* @return The bridge type
|
||||||
*/
|
*/
|
||||||
static inline uint GetBridgeType(TileIndex t)
|
static inline uint GetBridgeType(TileIndex t)
|
||||||
|
@ -58,7 +78,7 @@ static inline uint GetBridgeType(TileIndex t)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the direction pointing onto the bridge
|
* Get the direction pointing onto the bridge
|
||||||
* @param tile The tile to analyze
|
* @param t The tile to analyze
|
||||||
* @return the above mentionned direction
|
* @return the above mentionned direction
|
||||||
*/
|
*/
|
||||||
static inline DiagDirection GetBridgeRampDirection(TileIndex t)
|
static inline DiagDirection GetBridgeRampDirection(TileIndex t)
|
||||||
|
|
|
@ -428,7 +428,7 @@ void CDECL IConsolePrintF(uint16 color_code, const char *s, ...)
|
||||||
/**
|
/**
|
||||||
* It is possible to print debugging information to the console,
|
* It is possible to print debugging information to the console,
|
||||||
* which is achieved by using this function. Can only be used by
|
* which is achieved by using this function. Can only be used by
|
||||||
* @debug() in debug.c. You need at least a level 2 (developer) for debugging
|
* debug() in debug.cpp. You need at least a level 2 (developer) for debugging
|
||||||
* messages to show up
|
* messages to show up
|
||||||
* @param dbg debugging category
|
* @param dbg debugging category
|
||||||
* @param string debugging message
|
* @param string debugging message
|
||||||
|
@ -489,7 +489,7 @@ bool GetArgumentInteger(uint32 *value, const char *arg)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General internal hooking code that is the same for both commands and variables
|
* General internal hooking code that is the same for both commands and variables
|
||||||
* @param hooks @IConsoleHooks structure that will be set according to
|
* @param hooks IConsoleHooks structure that will be set according to
|
||||||
* @param type type access trigger
|
* @param type type access trigger
|
||||||
* @param proc function called when the hook criteria is met
|
* @param proc function called when the hook criteria is met
|
||||||
*/
|
*/
|
||||||
|
@ -514,7 +514,7 @@ static void IConsoleHookAdd(IConsoleHooks *hooks, IConsoleHookTypes type, IConso
|
||||||
/**
|
/**
|
||||||
* Handle any special hook triggers. If the hook type is met check if
|
* Handle any special hook triggers. If the hook type is met check if
|
||||||
* there is a function associated with that and if so, execute it
|
* there is a function associated with that and if so, execute it
|
||||||
* @param hooks @IConsoleHooks structure that will be checked
|
* @param hooks IConsoleHooks structure that will be checked
|
||||||
* @param type type of hook, trigger that needs to be activated
|
* @param type type of hook, trigger that needs to be activated
|
||||||
* @return true on a successfull execution of the hook command or if there
|
* @return true on a successfull execution of the hook command or if there
|
||||||
* is no hook/trigger present at all. False otherwise
|
* is no hook/trigger present at all. False otherwise
|
||||||
|
@ -767,8 +767,11 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char
|
||||||
/**
|
/**
|
||||||
* Special function for adding string-type variables. They in addition
|
* Special function for adding string-type variables. They in addition
|
||||||
* also need a 'size' value saying how long their string buffer is.
|
* also need a 'size' value saying how long their string buffer is.
|
||||||
|
* @param name name of the variable that will be used
|
||||||
|
* @param addr memory location the variable will point to
|
||||||
* @param size the length of the string buffer
|
* @param size the length of the string buffer
|
||||||
* For more information see @IConsoleVarRegister()
|
* @param help the help string shown for the variable
|
||||||
|
* For more information see IConsoleVarRegister()
|
||||||
*/
|
*/
|
||||||
void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help)
|
void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue