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
↓ 27 callers
Function
GetEngineProperty
src/newgrf_engine.cpp:1230
↓ 27 callers
Method
GetScreenDepth
src/blitter/null.hpp:18
↓ 27 callers
Function
GetStationGfx
* Get the station graphics of this tile * @param t the tile to query * @pre IsTileType(t, MP_STATION) * @return the station graphics */
src/station_map.h:68
↓ 27 callers
Method
GetUnloadType
How must the consist be unloaded? */
src/order_base.h:144
↓ 27 callers
Function
GetVehicleProperty
Callback 36 handlers */
src/newgrf_engine.cpp:1224
↓ 27 callers
Method
GetVersion
src/script/script_config.cpp:137
↓ 27 callers
Method
HandleButtonClick
* Do all things to make a button look clicked and mark it to be * unclicked in a few ticks. * @param widget the widget to "click" */
src/window.cpp:597
↓ 27 callers
Method
HasData
src/newgrf/newgrf_bytereader.h:102
↓ 27 callers
Method
InvalidateNewGRFCache
* Invalidates cached NewGRF variables * @see InvalidateNewGRFCacheOfChain */
src/vehicle_base.h:450
↓ 27 callers
Method
NeedRebuild
* Check if a rebuild is needed * @return true if a rebuild is needed */
src/sortlist_type.h:387
↓ 27 callers
Method
Previous
* Get the previous vehicle of this vehicle. * @note articulated parts are also counted as vehicles. * @return the previous vehicle or nullptr when
src/vehicle_base.h:594
↓ 27 callers
Method
Read
* Read the integer from the the actual setting. * @param object The object the setting is to be saved in. * @return The value of the saved integer.
src/settings.cpp:567
↓ 27 callers
Function
TestScriptEventAdminPort
* Validate ScriptEventAdminPort can convert JSON to Squirrel. * * This function is not actually part of ScriptAdmin, but we will use MakeJSON, * an
src/tests/test_script_admin.cpp:102
↓ 27 callers
Function
sq_pushroottable
src/3rdparty/squirrel/squirrel/sqapi.cpp:452
↓ 26 callers
Function
CheckPartialPixelZ
* Check whether the partial pixel Z values are the expected values. The arrays * are as if the map is rotated 45 degrees counterclockwise. * @param
src/tests/landscape_partial_pixel_z.cpp:90
↓ 26 callers
Function
DirToDiagDir
* Convert a Direction to a DiagDirection. * * This function can be used to convert the 8-way Direction to * the 4-way DiagDirection. If the directi
src/direction_func.h:166
↓ 26 callers
Function
DrawSpriteIgnorePadding
src/widget.cpp:342
↓ 26 callers
Function
DupSprite
src/spritecache.cpp:684
↓ 26 callers
Function
GetIndustryTileSpec
* Accessor for array _industry_tile_specs. * This will ensure at once : proper access and * not allowing modifications of it. * @param gfx of indus
src/industry_cmd.cpp:140
↓ 26 callers
Function
GetRailDepotDirection
* Returns the direction the depot is facing to * @param t the tile to get the depot facing from * @pre IsRailDepotTile(t) * @return the direction t
src/rail_map.h:171
↓ 26 callers
Function
GetRailStationAxis
* Get the rail direction of a rail station. * @param t Tile to query * @pre HasStationRail(t) * @return The direction of the rails on tile \a t. *
src/station_map.h:503
↓ 26 callers
Method
GetRegister
* Gets the value of a so-called newgrf "register". * @param i index of the register * @return the value of the register * @pre i < 0x110 */
src/newgrf_spritegroup.h:324
↓ 26 callers
Method
HasData
* Test if this goods entry has optional cargo packet/flow data. * @returns true iff optional data is present. */
src/station_base.h:305
↓ 26 callers
Method
HasGrfFile
* Test if this entity was introduced by NewGRF. * @returns true iff the grfid property is set. */
src/newgrf_commons.h:326
↓ 26 callers
Function
IncreaseGeneratingWorldProgress
* Increases the current stage of the world generation with one. * @param cls the current class we are in. * * Warning: this function isn't clever.
src/genworld_gui.cpp:1539
↓ 26 callers
Function
IsBridgeTile
* checks if there is a bridge on this tile * @param t The tile to analyze * @return true if a bridge is present */
src/bridge_map.h:35
↓ 26 callers
Function
KillFirstBit
src/core/bitmath_func.hpp:226
↓ 26 callers
Function
LoadChunk
* * Loads a chunk from the old savegame * */
src/saveload/oldloader.cpp:120
↓ 26 callers
Function
ParseInteger
src/core/string_consumer.hpp:917
↓ 26 callers
Function
SetRoadOwner
* Set the owner of a specific road type. * @param t The tile to change. * @param rtt RoadTramType. * @param o New owner of the given road type.
src/road_map.h:235
↓ 26 callers
Function
SetTileType
* Set the type of a tile * * This functions sets the type of a tile. If the type * MP_VOID is selected the tile must be at the south-west or * sou
src/tile_map.h:131
↓ 26 callers
Method
StoredCount
* Returns sum of cargo on board the vehicle (ie not only * reserved). * @return Cargo on board the vehicle. */
src/cargopacket.h:425
↓ 26 callers
Method
ToWindowNumber
* Pack a VehicleListIdentifier in 32 bits so it can be used as unique WindowNumber. * @return The window number. */
src/vehiclelist.cpp:23
↓ 26 callers
Function
YapfNotifyTrackLayoutChange
src/pathfinder/yapf/yapf_rail.cpp:665
↓ 26 callers
Method
contains
* Test if a key exists in the set. * @param key Key to test. * @return true iff the key exists in the set. */
src/core/flatset_type.hpp:57
↓ 26 callers
Method
count
src/3rdparty/catch2/catch.hpp:8911
↓ 26 callers
Function
is_constant_evaluated
src/3rdparty/fmt/base.h:364
↓ 26 callers
Method
scopedElement
src/3rdparty/catch2/catch.hpp:15668
↓ 26 callers
Function
sq_gettype
src/3rdparty/squirrel/squirrel/sqapi.cpp:504
↓ 25 callers
Function
FindFirstBit
src/core/bitmath_func.hpp:189
↓ 25 callers
Function
GetCustomRailSprite
* Get the sprite to draw for the given tile. * @param rti The rail type data (spec). * @param tile The tile to get the sprite for. * @param rtsg Th
src/newgrf_railtype.cpp:106
↓ 25 callers
Method
GetDefaultCargoType
* Determines the default cargo type of an engine. * * Usually a valid cargo is returned, even though the vehicle has zero capacity, and can theref
src/engine_base.h:95
↓ 25 callers
Method
GetDisplayMaxSpeed
* Returns max speed of the engine for display purposes * @return max speed in km-ish/h */
src/engine.cpp:357
↓ 25 callers
Method
GetString
* Get the string that has been set for this nested widget. * @return The string. */
src/widget.cpp:1279
↓ 25 callers
Function
GetTreeGround
* Returns the groundtype for tree tiles. * * This function returns the groundtype of a tile with trees. * * @param t The tile to get the groundtyp
src/tree_map.h:102
↓ 25 callers
Function
IsLocalCompany
* Is the current company the local company? * @return \c true of the current company is the local company, \c false otherwise. */
src/company_func.h:47
↓ 25 callers
Function
IsPbsSignal
src/rail_map.h:287
↓ 25 callers
Function
IsPlainRailTile
* Checks whether the tile is a rail tile or rail tile with signals. * @param t the tile to get the information from * @return true if and only if th
src/rail_map.h:60
↓ 25 callers
Function
IsValidDiagDirection
* Checks if an integer value is a valid DiagDirection * * @param d The value to check * @return True if the value belongs to a DiagDirection, else
src/direction_func.h:21
↓ 25 callers
Method
SetFill
* Set the filling of the widget from initial size. * @param fill_x Horizontal fill step size, \c 0 means no filling is allowed. * @param fill_y Vert
src/widget.cpp:1090
↓ 25 callers
Function
SlError
* Error handler. Sets everything up to show an error message and to clean * up the mess of a partial savegame load. * @param string The translatable
src/saveload/saveload.cpp:339
↓ 25 callers
Method
SortType
* Get the sorttype of the list * * @return The current sorttype */
src/sortlist_type.h:110
↓ 25 callers
Function
ToggleBit
src/core/bitmath_func.hpp:157
↓ 25 callers
Method
UpdateViewport
* Update the vehicle on the viewport, updating the right hash and setting the new coordinates. * @param dirty Mark the (new and old) coordinates of t
src/vehicle.cpp:1716
↓ 25 callers
Function
fill
src/3rdparty/fmt/format.h:1616
↓ 25 callers
Method
insert
src/3rdparty/squirrel/squirrel/squtils.h:84
↓ 24 callers
Method
AsString
* Get the string representation of the error message. * @return The string representation that will get overwritten by next calls. */
src/network/core/os_abstraction.cpp:81
↓ 24 callers
Method
GetDisplayProfitLastYear
* Gets the profit vehicle had last year. It can be sent into string parameters for string processing. * @return the vehicle's profit last year */
src/vehicle_base.h:578
↓ 24 callers
Method
GetLoadType
How must the consist be loaded? */
src/order_base.h:142
↓ 24 callers
Method
IsEngine
* Check if a vehicle is an engine (can be first in a consist). * @return Returns true if vehicle is an engine. */
src/ground_vehicle.hpp:318
↓ 24 callers
Function
IsOpenGLVersionAtLeast
* Check if the current OpenGL version is equal or higher than a given one. * @param major Minimal major version. * @param minor Minimal minor versio
src/video/opengl.cpp:204
↓ 24 callers
Function
IsSlopeWithOneCornerRaised
* Tests if a specific slope has exactly one corner raised. * * @param s The #Slope * @return true iff exactly one corner is raised */
src/slope_func.h:88
↓ 24 callers
Method
LookupColourInPalette
* Look up the colour in the current palette. */
src/blitter/32bpp_base.hpp:36
↓ 24 callers
Function
NetworkTextMessage
This puts a text-message to the console, or in the future, the chat-box, * (to keep it all a bit more general) * If 'self_send' is true, this is th
src/network/network.cpp:234
↓ 24 callers
Function
SafeRead
src/3rdparty/squirrel/squirrel/sqobject.cpp:245
↓ 24 callers
Function
SafeWrite
src/3rdparty/squirrel/squirrel/sqobject.cpp:236
↓ 24 callers
Function
SetArrowWidgetTypeTip
* Widget part function for setting the arrow widget type and tooltip. * @param widget_type Type of the widget to draw. * @param tip Tooltip of the
src/widget_type.h:1277
↓ 24 callers
Method
SetNext
* Set the next vehicle of this vehicle. * @param next the next vehicle. nullptr removes the next vehicle. */
src/vehicle.cpp:2927
↓ 24 callers
Function
SetWaterClass
* Set the water class at a tile. * @param t Water tile to change. * @param wc New water class. * @pre IsTileType(t, MP_WATER) || IsTileType(t, MP_
src/water_map.h:126
↓ 24 callers
Function
UpdateCompanyRoadInfrastructure
* Update road infrastructure counts for a company. * @param rt Road type to update count of. * @param o Owner of road piece. * @param count Number
src/road_cmd.cpp:180
↓ 24 callers
Function
copy
src/3rdparty/fmt/base.h:2014
↓ 24 callers
Function
end
@brief returns an iterator to one past the last element @sa https://json.nlohmann.me/api/basic_json/end/
src/3rdparty/nlohmann/json.hpp:22095
↓ 23 callers
Method
Clear
* Reset read data. */
src/fios_gui.cpp:49
↓ 23 callers
Function
DistanceSquare
* Gets the 'Square' distance between the two given tiles. * The 'Square' distance is the square of the shortest (straight line) * distance between t
src/map.cpp:186
↓ 23 callers
Function
FillDrawPixelInfo
* Set up a clipping area for only drawing into a certain area. To do this, * Fill a DrawPixelInfo object with the supplied relative rectangle, backup
src/gfx.cpp:1568
↓ 23 callers
Method
GetCapacity
* Gets the number of visible elements of the scrollbar * @return the number of visible elements */
src/widget_type.h:746
↓ 23 callers
Function
GetIndustryGfx
* Get the industry graphics ID for the given industry tile * @param t the tile to get the gfx for * @pre IsTileType(t, MP_INDUSTRY) * @return the g
src/industry_map.h:137
↓ 23 callers
Method
GetScrolledRowFromWidget
* Compute the row of a scrolled widget that a user clicked in. * @param clickpos Vertical position of the mouse click (without taking scrolling in
src/widget.cpp:2453
↓ 23 callers
Method
HasScript
src/script/script_config.cpp:127
↓ 23 callers
Function
IsClearGround
* Set the type of clear tile. * @param t the tile to set the clear ground type of * @param ct the ground type * @pre IsTileType(t, MP_CLEAR) */
src/clear_map.h:59
↓ 23 callers
Function
IsPlainRail
* Returns whether this is plain rails, with or without signals. Iow, if this * tiles RailTileType is RailTileType::Normal or RailTileType::Signals.
src/rail_map.h:49
↓ 23 callers
Method
IsWidgetDisabled
* Gets the enabled/disabled status of a widget. * @param widget_index index of this widget in the window * @return status of the widget ie: disabl
src/window_gui.h:411
↓ 23 callers
Method
ReadUint8
* Read binary uint8, and advance reader. * @param def Default value to return, if not enough data. * @return Read integer, 'def' if not enough dat
src/core/string_consumer.hpp:122
↓ 23 callers
Method
SeekTo
* Seek in the current file. * @param pos New position. * @param mode Type of seek (\c SEEK_CUR means \a pos is relative to current position, \c SEEK
src/random_access_file.cpp:90
↓ 23 callers
Method
Set
src/pathfinder/yapf/yapf_node.hpp:72
↓ 23 callers
Function
fe_add
src/3rdparty/monocypher/monocypher.cpp:974
↓ 23 callers
Function
input_adapter
src/3rdparty/nlohmann/json.hpp:6521
↓ 22 callers
Function
AdjustBrightness
src/palette_func.h:35
↓ 22 callers
Method
Change
* Allocates a new LoggedAction if needed, and add the change when action is active. * @param change The actual change. */
src/gamelog.cpp:335
↓ 22 callers
Method
Filter
* Test if any of the given badges matches the filtered badge list. * @param badges List of badges. * @returns true iff at least one badge in badges
src/newgrf_badge.cpp:340
↓ 22 callers
Function
GetAnyRoadBits
* Returns the RoadBits on an arbitrary tile * Special behaviour: * - road depots: entrance is treated as road piece * - road tunnels: entrance is t
src/road_map.cpp:54
↓ 22 callers
Function
GetBridgeSpec
* Get the specification of a bridge type. * @param i The type of bridge to get the specification for. * @return The specification. */
src/bridge.h:60
↓ 22 callers
Method
GetInfo
* Gets the client info of this socket handler. * @return The client info. */
src/network/core/tcp_game.h:514
↓ 22 callers
Method
GetName
static */
src/script/api/script_road.cpp:29
↓ 22 callers
Method
GetStackSize
src/3rdparty/squirrel/squirrel/sqfuncstate.cpp:297
↓ 22 callers
Function
GetTileSlopeZ
* 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.cpp:55
↓ 22 callers
Function
GetVarMemType
* Get the NumberType of a setting. This describes the integer type * as it is represented in memory * @param type VarType holding information about
src/saveload/saveload.h:766
↓ 22 callers
Function
HalftileSlope
* Adds a halftile slope to a slope. * * @param s #Slope without a halftile slope. * @param corner The #Corner of the halftile. * @return The #Slop
src/slope_func.h:274
↓ 22 callers
Method
Packets
* Returns a pointer to the cargo packet list (so you can iterate over it etc). * @return Pointer to the packet list. */
src/cargopacket.h:320
↓ 22 callers
Method
PutUint8
* Append binary uint8. */
src/core/string_builder.cpp:18
← previous
next →
401–500 of 16,191, ranked by callers