MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetMaxSpriteID

Function GetMaxSpriteID

src/spritecache.cpp:202–205  ·  view source on GitHub ↗

* Get a reasonable (upper bound) estimate of the maximum * SpriteID used in OpenTTD; there will be no sprites with * a higher SpriteID, although there might be up to roughly * a thousand unused SpriteIDs below this number. * @note It's actually the number of spritecache items. * @return maximum SpriteID */

Source from the content-addressed store, hash-verified

200 * @return maximum SpriteID
201 */
202SpriteID GetMaxSpriteID()
203{
204 return static_cast<SpriteID>(_spritecache.size());
205}
206
207static bool ResizeSpriteIn(SpriteLoader::SpriteCollection &sprite, ZoomLevel src, ZoomLevel tgt)
208{

Callers 3

UpdateCursorSizeFunction · 0.85
OnClickMethod · 0.85
OnQueryTextFinishedMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected