Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenTTD/OpenTTD
/ functions
Functions
16,191 in github.com/OpenTTD/OpenTTD
⨍
Functions
16,191
◇
Types & classes
3,771
↓ 2,955 callers
Function
NWidget
* Widget part function for starting a new 'real' widget. * @param tp Type of the new nested widget. * @param col Colour of the new widget. * @para
src/widget_type.h:1427
↓ 1,627 callers
Method
Test
* Test if the value-th bit is set. * @param value Bit to check. * @returns true iff the requested bit is set. */
src/core/base_bitset_type.hpp:141
↓ 1,152 callers
Function
EndContainer
* Widget part function for denoting the end of a container * (horizontal, vertical, WWT_FRAME, WWT_INSET, or WWT_PANEL). * @ingroup NestedWidgetPart
src/widget_type.h:1232
↓ 966 callers
Method
size
src/3rdparty/fmt/os.cc:243
↓ 964 callers
Function
SetFill
* Widget part function for setting filling. * @param fill_x Horizontal filling step from minimal size. * @param fill_y Vertical filling step from mi
src/widget_type.h:1222
↓ 948 callers
Function
GetString
* Resolve the given StringID into a std::string with formatting but no parameters. * @param string The unique identifier of the translatable string.
src/strings.cpp:424
↓ 761 callers
Function
GB
src/core/bitmath_func.hpp:32
↓ 697 callers
Function
Invalid
src/core/pool_type.hpp:60
↓ 695 callers
Method
push_back
src/3rdparty/fmt/base.h:1789
↓ 622 callers
Function
SetStringTip
* Widget part function for setting the string and tooltip. * @param string String of the widget. * @param tip Tooltip of the widget. * @ingroup Ne
src/widget_type.h:1243
↓ 576 callers
Method
empty
src/strings_type.h:108
↓ 494 callers
Function
IsTileType
* Checks if a tile is a given tiletype. * * This function checks if a tile has the given tiletype. * * @param tile The tile to check * @param typ
src/tile_map.h:150
↓ 460 callers
Function
SetResize
* Widget part function for setting the resize step. * @param dx Horizontal resize step. 0 means no horizontal resizing. * @param dy Vertical resize
src/widget_type.h:1148
↓ 459 callers
Function
IConsolePrint
* Handle the printing of text entered into the console or redirected there * by any other means. Text can be redirected to other clients in a network
src/console.cpp:90
↓ 458 callers
Function
NOT_REACHED
src/error.cpp:14
↓ 443 callers
Method
clear
Clears this buffer.
src/3rdparty/fmt/base.h:1772
↓ 441 callers
Function
HasBit
src/core/bitmath_func.hpp:103
↓ 424 callers
Method
ReadByte
* Read a single byte (8 bits). * @return Value read from buffer. */
src/newgrf/newgrf_bytereader.h:34
↓ 390 callers
Method
Set
* Set the title of the file. * @param title Title of the file. */
src/saveload/saveload.cpp:3437
↓ 382 callers
Function
GetCharacterHeight
* Get height of a character for a given font size. * @param size Font size to get height of * @return Height of characters in the given font (pi
src/fontcache.cpp:87
↓ 347 callers
Function
DrawString
* Draw string, possibly truncated to make it fit in its allocated space * * @param left The left most position to draw on. * @param right The ri
src/gfx.cpp:668
↓ 339 callers
Function
end
src/3rdparty/fmt/base.h:566
↓ 333 callers
Function
GetEncodedString
* Encode a string with no parameters into an encoded string. * @param str The StringID to format. * @returns The encoded string. */
src/strings.cpp:90
↓ 327 callers
Function
SetMinimalSize
* Widget part function for setting the minimal size. * @param x Horizontal minimal size. * @param y Vertical minimal size. * @ingroup NestedWidgetP
src/widget_type.h:1159
↓ 326 callers
Function
size
Returns the number of elements in the store.
src/3rdparty/fmt/args.h:215
↓ 325 callers
Function
IsSavegameVersionBefore
* Checks whether the savegame is below \a major.\a minor. * @param major Major number of the version to check against. * @param minor Minor number o
src/saveload/saveload.h:1278
↓ 307 callers
Function
TileX
* Get the X component of a tile * @param tile the tile to get the X component of * @return the X component */
src/map_func.h:428
↓ 302 callers
Method
base
src/order_type.h:32
↓ 297 callers
Function
TileY
* Get the Y component of a tile * @param tile the tile to get the Y component of * @return the Y component */
src/map_func.h:438
↓ 290 callers
Method
empty
src/core/flatset_type.hpp:69
↓ 290 callers
Method
get
src/3rdparty/fmt/format-inl.h:101
↓ 282 callers
Method
Failed
* Did this command fail? * @return true if and only if it failed */
src/command_type.h:177
↓ 278 callers
Method
data
src/3rdparty/catch2/catch.hpp:13921
↓ 274 callers
Function
to_underlying
src/core/enum_type.hpp:17
↓ 269 callers
Method
Add
* Append widget \a wid to container. * @param wid Widget to append. */
src/widget.cpp:1320
↓ 269 callers
Function
format
src/3rdparty/fmt/std.h:146
↓ 261 callers
Function
GetStringBoundingBox
* Return the string dimension in pixels. The height and width are returned * in a single Dimension value. TINYFONT, BIGFONT modifiers are only * sup
src/gfx.cpp:897
↓ 258 callers
Method
SetDirty
* Mark entire window as dirty (in need of re-paint) * @ingroup dirty */
src/window.cpp:968
↓ 249 callers
Method
substr
src/3rdparty/catch2/catch.hpp:13925
↓ 242 callers
Function
begin
src/3rdparty/fmt/base.h:565
↓ 234 callers
Method
IsType
* Check whether this order is of the given type. * @param type the type to check against. * @return true if the order matches. */
src/order_base.h:66
↓ 233 callers
Method
base
* Retrieve the raw value behind this bit set. * @returns the raw value. */
src/core/base_bitset_type.hpp:219
↓ 233 callers
Method
end
* Returns an iterator to the end of the tile area. * @return The OrthogonalTileIterator. */
src/tilearea.cpp:162
↓ 227 callers
Function
IsValidTile
* Checks if a tile is valid * * @param tile The tile to check * @return True if the tile is on the map and not one of MP_VOID. */
src/tile_map.h:161
↓ 227 callers
Function
SetSpriteTip
* Widget part function for setting the sprite and tooltip. * @param sprite Sprite of the widget. * @param tip Tooltip of the widget. * @ingroup Ne
src/widget_type.h:1254
↓ 226 callers
Function
SetPIP
* Widget part function for setting a pre/inter/post spaces. * @param pre The amount of space before the first widget. * @param inter The amount of s
src/widget_type.h:1378
↓ 226 callers
Function
SlObject
* Main SaveLoad function. * @param object The object that is being saved or loaded. * @param slt The SaveLoad table with objects to save/load. */
src/saveload/saveload.cpp:1846
↓ 221 callers
Method
find
src/3rdparty/catch2/catch.hpp:13977
↓ 208 callers
Method
end
src/core/utf8.hpp:119
↓ 207 callers
Function
SB
src/core/bitmath_func.hpp:58
↓ 206 callers
Method
Next
Skip to next track */
src/music_gui.cpp:267
↓ 201 callers
Method
Shrink
* Copy and shrink Rect by s pixels. * @param s number of pixels to remove from each side of Rect. * @return the new smaller Rect. */
src/core/geometry_type.hpp:124
↓ 191 callers
Method
SetWidgetDisabledState
* Sets the enabled/disabled status of a widget. * By default, widgets are enabled. * On certain conditions, they have to be disabled. * @param w
src/window_gui.h:382
↓ 186 callers
Method
Any
* Test if any of the given values are set. * @param other BitSet of values to test. * @returns true iff any of the given values are set. */
src/core/base_bitset_type.hpp:170
↓ 186 callers
Function
InvalidateWindowData
* Mark window data of the window of a given class and specific window number as invalid (in need of re-computing) * * Note that by default the inval
src/window.cpp:3297
↓ 182 callers
Function
Clamp
src/core/math_func.hpp:79
↓ 182 callers
Method
Reset
* Resets and frees all memory allocated - used before loading or starting a new game */
src/gamelog.cpp:94
↓ 182 callers
Function
create
src/3rdparty/nlohmann/json.hpp:19675
↓ 178 callers
Function
SetToolTip
* Widget part function for setting tooltip and clearing the widget data. * @param tip Tooltip of the widget. * @ingroup NestedWidgetParts */
src/widget_type.h:1321
↓ 175 callers
Function
IsValidCargoType
Test whether cargo type is not INVALID_CARGO */
src/cargo_type.h:104
↓ 172 callers
Method
AddCost
* Adds the cost of the given command return value to this cost. * Also takes a possible error message when it is set. * @param ret The command to ad
src/command.cpp:401
↓ 171 callers
Function
maxdim
* Compute bounding box of both dimensions. * @param d1 First dimension. * @param d2 Second dimension. * @return The bounding box of both dimensions
src/core/geometry_func.cpp:22
↓ 161 callers
Method
resize
src/3rdparty/squirrel/squirrel/squtils.h:53
↓ 160 callers
Function
GfxFillRect
* Applies a certain FillRectMode-operation to a rectangle [left, right] x [top, bottom] on the screen. * * @pre dpi->zoom == ZoomLevel::Min, right >
src/gfx.cpp:115
↓ 160 callers
Method
Vertical
* Get total vertical padding of RectPadding. * @return total vertical padding. */
src/core/geometry_type.hpp:95
↓ 159 callers
Method
ReadWord
* Read a single Word (16 bits). * @return Value read from buffer. */
src/newgrf/newgrf_bytereader.h:45
↓ 152 callers
Function
ScaleGUITrad
* Scale a RectPadding to GUI zoom level. * @param r RectPadding at ZOOM_BASE (traditional "normal" interface size). * @return RectPadding at current
src/widget.cpp:49
↓ 149 callers
Function
SetBit
src/core/bitmath_func.hpp:121
↓ 146 callers
Function
SetWindowDirty
* Mark window as dirty (in need of repainting) * @param cls Window class * @param number Window number in that class */
src/window.cpp:3179
↓ 145 callers
Method
begin
* Returns an iterator to the beginning of the tile area. * @return The OrthogonalTileIterator. */
src/tilearea.cpp:153
↓ 145 callers
Method
erase
* Erase the value pointed to by an iterator. The iterator may be invalid afterwards. * @param it Iterator pointing at some value. * @return Iterat
src/core/multimap.hpp:243
↓ 144 callers
Function
MarkTileDirtyByTile
* Mark a tile given by its index dirty for repaint. * @param tile The tile to mark dirty. * @param bridge_level_offset Height of bridge on tile to a
src/viewport.cpp:2128
↓ 142 callers
Method
begin
src/core/utf8.hpp:114
↓ 141 callers
Function
Random
src/core/random_func.hpp:75
↓ 140 callers
Function
concat
src/3rdparty/nlohmann/json.hpp:4349
↓ 138 callers
Method
SetWidgetDirty
* Invalidate a widget, i.e. mark it as being changed and in need of redraw. * @param widget_index the widget to redraw. */
src/window.cpp:558
↓ 137 callers
Method
GetCost
* Return how much a new engine costs. * @return Cost of the engine. */
src/engine.cpp:317
↓ 134 callers
Function
SetPadding
* Widget part function for setting additional space around a widget. * Parameters start above the widget, and are specified in clock-wise direction.
src/widget_type.h:1335
↓ 133 callers
Function
CloseWindowById
* Close a window by its class and window number (if it is open). * @param cls Window class * @param number Number of the window within the window cl
src/window.cpp:1195
↓ 133 callers
Method
size
src/3rdparty/catch2/catch.hpp:651
↓ 131 callers
Function
SetToolbarMinimalSize
* Widget part function to setting the minimal size for a toolbar button. * @param width Width of button, measured in multiples of the standard toolba
src/widget_type.h:1178
↓ 131 callers
Method
write_character
src/3rdparty/nlohmann/json.hpp:14970
↓ 130 callers
Function
IsInsideMM
* Checks if a value is in an interval. * * Returns true if a value is in the interval of [min, max). * * @param x The value to check * @param min
src/core/math_func.hpp:267
↓ 126 callers
Function
GetTileOwner
* Returns the owner of a tile * * This function returns the owner of a tile. This cannot used * for tiles which type is one of MP_HOUSE, MP_VOID an
src/tile_map.h:178
↓ 126 callers
Method
reserve
src/3rdparty/squirrel/squirrel/squtils.h:52
↓ 125 callers
Function
ShowErrorMessage
* Display an error message in a window. * Note: CommandCost errors are always severity level WL_INFO. * @param summary_msg General error message sh
src/error_gui.cpp:296
↓ 121 callers
Function
find
src/3rdparty/fmt/printf.h:60
↓ 119 callers
Method
size
src/3rdparty/nlohmann/json.hpp:3125
↓ 117 callers
Method
PutUtf8
* Append UTF.8 char. */
src/core/string_builder.cpp:113
↓ 115 callers
Function
TileXY
* Returns the TileIndex of a coordinate. * * @param x The x coordinate of the tile * @param y The y coordinate of the tile * @return The TileIndex
src/map_func.h:385
↓ 113 callers
Method
Horizontal
* Get total horizontal padding of RectPadding. * @return total horizontal padding. */
src/core/geometry_type.hpp:89
↓ 113 callers
Function
ReverseDiagDir
* Returns the reverse direction of the given DiagDirection * * @param d The DiagDirection to get the reverse from * @return The reverse direction
src/direction_func.h:118
↓ 113 callers
Function
ScaleSpriteTrad
* Scale traditional pixel dimensions to GUI zoom level, for drawing sprites. * @param value Pixel amount at #ZOOM_BASE (traditional "normal" interfac
src/zoom_func.h:107
↓ 109 callers
Function
DrawGroundSprite
* Draws a ground sprite for the current tile. * If the current tile is drawn on top of a foundation the sprite is added as child sprite to the "found
src/viewport.cpp:579
↓ 109 callers
Function
GetIndustrySpec
* Accessor for array _industry_specs. * This will ensure at once : proper access and * not allowing modifications of it. * @param thistype of indus
src/industry_cmd.cpp:126
↓ 108 callers
Method
InvalidateData
* Mark this window's data as invalid (in need of re-computing) * @param data The data to invalidate with * @param gui_scope Whether the function is
src/window.cpp:3237
↓ 108 callers
Method
size
src/3rdparty/squirrel/squirrel/squtils.h:72
↓ 107 callers
Method
insert
* Insert a key into the set, if it does not already exist. * @param key Key to insert. * @return A pair consisting of an iterator to the inserted
src/core/flatset_type.hpp:31
↓ 105 callers
Function
InvalidateWindowClassesData
* Mark window data of all windows of a given class as invalid (in need of re-computing) * Note that by default the invalidation is not considered to
src/window.cpp:3314
↓ 105 callers
Function
abs
src/core/math_func.hpp:23
next →
1–100 of 16,191, ranked by callers