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
↓ 105 callers
Function
sq_throwerror
src/3rdparty/squirrel/squirrel/sqapi.cpp:933
↓ 104 callers
Function
GetRailType
* Gets the rail type of the given tile * @param t the tile to get the rail type from * @return the rail type of the tile */
src/rail_map.h:115
↓ 104 callers
Method
SetDisplayedPlane
* Select which plane to show (for #NWID_SELECTION only). * @param plane Plane number to display. * @return true iff the shown plane changed. */
src/widget.cpp:1450
↓ 102 callers
Function
DrawStringMultiLine
* Draw string, possibly over multiple lines. * * @param left The left most position to draw on. * @param right The right most position to draw o
src/gfx.cpp:785
↓ 102 callers
Function
GetTileType
* Get the tiletype of a given tile. * * @param tile The tile to get the TileType * @return The tiletype of the tile * @pre tile < Map::Size() */
src/tile_map.h:96
↓ 101 callers
Method
SetWidgetLoweredState
* Sets the lowered/raised status of a widget. * @param widget_index index of this widget in the window * @param lowered_stat status to use ie: low
src/window_gui.h:442
↓ 99 callers
Method
GetDestination
* Gets the destination of this order. * @pre IsType(OT_GOTO_WAYPOINT) || IsType(OT_GOTO_DEPOT) || IsType(OT_GOTO_STATION). * @return the destinati
src/order_base.h:99
↓ 99 callers
Method
GetNumOrders
* Get number of orders in the order list. * @return number of orders in the chain. */
src/order_base.h:372
↓ 99 callers
Function
MakeDropDownListStringItem
src/dropdown.cpp:35
↓ 97 callers
Function
BindGLProc
src/video/opengl.cpp:217
↓ 97 callers
Method
Succeeded
* Did this command succeed? * @return true if and only if it succeeded */
src/command_type.h:168
↓ 97 callers
Function
byteswap
src/core/bitmath_func.hpp:330
↓ 97 callers
Method
c_str
src/3rdparty/catch2/catch.hpp:13917
↓ 96 callers
Method
Indent
* Copy Rect and indent it from its position. * @param indent offset in pixels for new Rect. * @param end if set, set indent at end of Rect, i.e.
src/core/geometry_type.hpp:224
↓ 92 callers
Method
AddInstruction
src/3rdparty/squirrel/squirrel/sqfuncstate.cpp:405
↓ 91 callers
Method
GetWidget<NWidgetBase>
src/window_gui.h:969
↓ 91 callers
Function
TileOffsByDiagDir
* Convert a DiagDirection to a TileIndexDiff * * @param dir The DiagDirection * @return The resulting TileIndexDiff * @see TileIndexDiffCByDiagDir
src/map_func.h:583
↓ 90 callers
Method
First
* Get the first vehicle of this vehicle chain. * @return the first vehicle of the chain. */
src/vehicle_base.h:600
↓ 89 callers
Method
Index
* Get the RoadType for this RoadTypeInfo. * @return RoadType in static RoadTypeInfo definitions. */
src/road.cpp:30
↓ 89 callers
Method
WithWidth
* Copy Rect and set its width. * @param width width in pixels for new Rect. * @param end if set, set width at end of Rect, i.e. on right. * @r
src/core/geometry_type.hpp:211
↓ 89 callers
Function
print
src/3rdparty/fmt/os.h:400
↓ 88 callers
Method
empty
named queries
src/3rdparty/catch2/catch.hpp:648
↓ 87 callers
Function
GetRoadTypeInfo
* Returns a pointer to the Roadtype information for a given roadtype * @param roadtype the road type which the information is requested for * @retur
src/road.h:215
↓ 87 callers
Function
SetAspect
* Widget part function for setting the aspect ratio. * @param ratio Desired aspect ratio, or 0 for none. * @param flags Dimensions which should be r
src/widget_type.h:1413
↓ 86 callers
Function
to_unsigned
src/3rdparty/fmt/base.h:436
↓ 85 callers
Method
Push
src/3rdparty/squirrel/squirrel/sqvm.cpp:1543
↓ 84 callers
Function
TileDiffXY
* Calculates an offset for the given coordinate(-offset). * * This function calculate an offset value which can be added to a * #TileIndex. The coo
src/map_func.h:401
↓ 83 callers
Method
IsFrontEngine
* Check if the vehicle is a front engine. * @return Returns true if the vehicle is a front engine. */
src/vehicle_base.h:913
↓ 83 callers
Method
end
return iterator end (needed for range-based for)
src/3rdparty/nlohmann/json.hpp:5332
↓ 82 callers
Function
GetRailTypeInfo
* Returns a pointer to the Railtype information for a given railtype * @param railtype the rail type which the information is requested for * @retur
src/rail.h:300
↓ 81 callers
Method
ReadDWord
* Read a single DWord (32 bits). * @return Value read from buffer. */
src/newgrf/newgrf_bytereader.h:66
↓ 81 callers
Method
SendPacket
* Send a packet over UDP * @param p the packet to send * @param recv the receiver (target) of the packet * @param all send the packet using all
src/network/core/udp.cpp:74
↓ 80 callers
Function
TileHeight
* Returns the height of a tile * * This function returns the height of the northern corner of a tile. * This is saved in the global map-array. It d
src/tile_map.h:29
↓ 80 callers
Function
string
src/3rdparty/nlohmann/json.hpp:6854
↓ 79 callers
Function
SeedChance
* Generates a number from given seed. * @param shift_by number of bits seed is shifted to the right * @param max generated number is in interval 0..
src/townname.cpp:165
↓ 77 callers
Method
ForceRebuild
* Force that a rebuild is needed */
src/sortlist_type.h:395
↓ 77 callers
Method
GetScrollbar
* Return the Scrollbar to a widget index. * @param widnum Scrollbar widget index * @return Scrollbar to the widget */
src/window.cpp:315
↓ 77 callers
Method
pop_back
src/3rdparty/squirrel/squirrel/squtils.h:80
↓ 76 callers
Function
GetStationIndex
* Get StationID from a tile * @param t Tile to query station ID from * @pre IsTileType(t, MP_STATION) * @return Station ID of the station at \a t
src/station_map.h:28
↓ 74 callers
Method
SetCount
* Set the number of elements in this matrix. * @note Updates the number of elements/capacity of the real scrollbar. * @param count The number of ele
src/widget.cpp:1974
↓ 73 callers
Function
DrawSprite
* Draw a sprite, not in a viewport * @param img Image number to draw * @param pal Palette to use. * @param x Left coordinate of image in pixel
src/gfx.cpp:1034
↓ 73 callers
Function
SlErrorCorrupt
* Error handler for corrupt savegames. Sets everything up to show the * error message and to clean up the mess of a partial savegame load. * @param
src/saveload/saveload.cpp:369
↓ 72 callers
Function
ClrBit
src/core/bitmath_func.hpp:139
↓ 72 callers
Method
GetDecodedString
* Decode the encoded string. * @returns Decoded raw string. */
src/strings.cpp:207
↓ 72 callers
Function
format_to
src/3rdparty/fmt/base.h:2827
↓ 70 callers
Function
MarkWholeScreenDirty
* This function mark the whole screen as dirty. This results in repainting * the whole screen. Use this with care as this function will break the *
src/gfx.cpp:1549
↓ 70 callers
Function
UnScaleByZoom
* Scale by zoom level, usually shift right (when zoom > ZoomLevel::Min) * When shifting right, value is rounded up * @param value value to shift *
src/zoom_func.h:34
↓ 69 callers
Method
Send_uint8
* Package a 8 bits integer in the packet. * @param data The data to send. */
src/network/core/packet.cpp:120
↓ 69 callers
Function
SetScrollbar
* Attach a scrollbar to a widget. * The scrollbar is controlled when using the mousewheel on the widget. * Multiple widgets can refer to the same sc
src/widget_type.h:1402
↓ 69 callers
Method
out
Returns an iterator to the beginning of the output range.
src/3rdparty/fmt/base.h:2663
↓ 68 callers
Function
SlIterateArray
* Iterate through the elements of an array and read the whole thing * @return The index of the object, or -1 if we have reached the end of current bl
src/saveload/saveload.cpp:677
↓ 68 callers
Function
StrEqualsIgnoreCase
* Compares two string( view)s for equality, while ignoring the case of the characters. * @param str1 The first string. * @param str2 The second stri
src/string.cpp:323
↓ 68 callers
Method
end
src/3rdparty/catch2/catch.hpp:8637
↓ 68 callers
Function
swap
@brief exchanges the values @sa https://json.nlohmann.me/api/basic_json/swap/
src/3rdparty/nlohmann/json.hpp:22764
↓ 67 callers
Method
type
src/3rdparty/fmt/base.h:754
↓ 66 callers
Method
IsWidgetLowered
* Gets the lowered state of a widget. * @param widget_index index of this widget in the window * @return status of the widget ie: lowered = true,
src/window_gui.h:492
↓ 66 callers
Function
StrMakeValid
src/string.cpp:119
↓ 65 callers
Function
FindWindowById
* Find a window by its class and window number * @param cls Window class * @param number Number of the window within the window class * @return Poi
src/window.cpp:1153
↓ 65 callers
Method
FinishInitNested
* Perform the second part of the initialization of a nested widget tree. * @param window_number Number of the new window. */
src/window.cpp:1809
↓ 65 callers
Function
GetHistory
src/tests/history_func.cpp:34
↓ 65 callers
Function
ScaleByZoom
* Scale by zoom level, usually shift left (when zoom > ZoomLevel::Min) * When shifting right, value is rounded up * @param value value to shift * @
src/zoom_func.h:22
↓ 65 callers
Method
SetToolTip
* Set the tool tip of the nested widget. * @param tool_tip Tool tip string to use. */
src/widget.cpp:1252
↓ 64 callers
Method
CreateNestedTree
* Perform the first part of the initialization of a nested widget tree. * Construct a nested widget tree in #nested_root, and optionally fill the #wi
src/window.cpp:1799
↓ 64 callers
Function
GetTileSlope
* Return the slope of a given tile inside the map. * @param tile Tile to compute slope of * @return Slope of the tile, except for the HALFTILE part
src/tile_map.h:279
↓ 64 callers
Function
ResetObjectToPlace
Reset the cursor and mouse mode handling back to default (normal cursor, only clicking in windows). */
src/viewport.cpp:3573
↓ 64 callers
Method
reset
src/3rdparty/icu/scriptrun.h:135
↓ 63 callers
Function
GetScaledSpriteSize
* Scale sprite size for GUI. * Offset is ignored. */
src/widget.cpp:68
↓ 62 callers
Function
GetTunnelBridgeDirection
* Get the direction pointing to the other end. * * Tunnel: Get the direction facing into the tunnel * Bridge: Get the direction pointing onto the b
src/tunnelbridge_map.h:26
↓ 62 callers
Function
SetMinimalTextLines
* Widget part function for setting the minimal text lines. * @param lines Number of text lines. * @param spacing Extra spacing required. * @param
src/widget_type.h:1190
↓ 62 callers
Method
begin
return iterator begin (needed for range-based for)
src/3rdparty/nlohmann/json.hpp:5326
↓ 62 callers
Function
fe_mul
Precondition ------------- |f0|, |f2|, |f4|, |f6|, |f8| < 1.65 * 2^26 |f1|, |f3|, |f5|, |f7|, |f9| < 1.65 * 2^25 |g0|, |g2|, |g4|, |g6|, |g8| <
src/3rdparty/monocypher/monocypher.cpp:1225
↓ 61 callers
Function
CheckOwnership
* Check whether the current owner owns something. * If that isn't the case an appropriate error will be given. * @param owner the owner of the thing
src/company_cmd.cpp:381
↓ 61 callers
Method
GetCurrentRect
src/widget_type.h:217
↓ 61 callers
Method
GetSpec
src/newgrf_class_func.h:114
↓ 61 callers
Function
SetTextStyle
* Widget part function for setting the text style. * @param colour Colour to draw string within widget. * @param size Font size to draw string withi
src/widget_type.h:1201
↓ 61 callers
Function
TileVirtXY
* Get a tile from the virtual XY-coordinate. * @param x The virtual x coordinate of the tile. * @param y The virtual y coordinate of the tile. * @r
src/map_func.h:416
↓ 60 callers
Method
at
src/core/convertible_through_base.hpp:40
↓ 59 callers
Method
AnyBytesLeft
* Check whether any bytes left to read. */
src/core/string_consumer.hpp:70
↓ 59 callers
Method
GetName
* Get the font name of a given font size. * @param fs The font size to look up. * @return The font name. */
src/fontcache.cpp:71
↓ 59 callers
Method
LowerWidget
* Marks a widget as lowered. * @param widget_index index of this widget in the window */
src/window_gui.h:461
↓ 58 callers
Function
AddSortableSpriteToDraw
* Draw a (transparent) sprite at given coordinates with a given bounding box. * The bounding box extends from (x + bb_offset_x, y + bb_offset_y, z +
src/viewport.cpp:663
↓ 58 callers
Function
CentreBounds
* Determine where to position a centred object. * @param min The top or left coordinate. * @param max The bottom or right coordinate. * @param size
src/core/geometry_type.hpp:26
↓ 58 callers
Function
GetColourGradient
* Get colour gradient palette index. * @param colour Colour. * @param shade Shade level from 1 to 7. * @returns palette index of colour. */
src/palette.cpp:388
↓ 58 callers
Method
GetPosition
* Gets the position of the first visible element in the list * @return the position of the element */
src/widget_type.h:755
↓ 58 callers
Function
GetSpriteSize
* Get the size of a sprite. * @param sprid Sprite to examine. * @param[out] offset Optionally returns the sprite position offset. * @param zoom The
src/gfx.cpp:968
↓ 58 callers
Function
sq_pop
src/3rdparty/squirrel/squirrel/sqapi.cpp:693
↓ 57 callers
Function
IsInsideBS
src/core/math_func.hpp:252
↓ 57 callers
Method
begin
src/3rdparty/catch2/catch.hpp:8636
↓ 56 callers
Function
DistanceManhattan
* Gets the Manhattan distance between the two given tiles. * The Manhattan distance is the sum of the delta of both the * X and Y component. * Also
src/map.cpp:169
↓ 55 callers
Function
GetRoadOwner
* Get the owner of a specific road type. * @param t The tile to query. * @param rtt RoadTramType. * @return Owner of the given road type. */
src/road_map.h:218
↓ 55 callers
Function
GetStringWithArgs
* Get a parsed string with most special stringcodes replaced by the string parameters. * @param builder The builder of the string. * @param stri
src/strings.cpp:336
↓ 55 callers
Function
TileAddXY
* Adds a given offset to a tile. * * @param tile The tile to add an offset to. * @param x The x offset to add to the tile. * @param y The y offset
src/map_func.h:483
↓ 55 callers
Method
count
src/3rdparty/fmt/base.h:1827
↓ 54 callers
Function
CloseWindowByClass
* Close all windows of a given class * @param cls Window class of windows to delete */
src/window.cpp:1207
↓ 54 callers
Function
MakeParameters
src/strings_func.h:107
↓ 54 callers
Method
PopTarget
src/3rdparty/squirrel/squirrel/sqfuncstate.cpp:286
↓ 54 callers
Method
Recv_uint8
* Read a 8 bits integer from the packet. * @return The read data. */
src/network/core/packet.cpp:318
↓ 54 callers
Method
size
* Count all items in this MultiMap. This involves iterating over the map. * @return Number of items in the MultiMap. */
src/core/multimap.hpp:278
↓ 54 callers
Function
sq_pushstring
src/3rdparty/squirrel/squirrel/sqapi.cpp:213
↓ 53 callers
Function
SlTableHeader
* Save or Load a table header. * @note a table-header can never contain more than 65535 fields. * @param slt The SaveLoad table with objects to save
src/saveload/saveload.cpp:1899
← previous
next →
101–200 of 16,191, ranked by callers