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

Function GetSpriteType

src/spritecache.cpp:141–145  ·  view source on GitHub ↗

* Get the sprite type of a given sprite. * @param sprite The sprite to look at. * @return the type of sprite. */

Source from the content-addressed store, hash-verified

139 * @return the type of sprite.
140 */
141SpriteType GetSpriteType(SpriteID sprite)
142{
143 if (!SpriteExists(sprite)) return SpriteType::Invalid;
144 return GetSpriteCache(sprite)->type;
145}
146
147/**
148 * Get the SpriteFile of a given sprite.

Callers 3

SpriteAlignerWindowMethod · 0.85
OnClickMethod · 0.85
OnQueryTextFinishedMethod · 0.85

Calls 2

SpriteExistsFunction · 0.85
GetSpriteCacheFunction · 0.85

Tested by

no test coverage detected