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

Function GfxClearSpriteCache

src/spritecache.cpp:911–919  ·  view source on GitHub ↗

* Remove all encoded sprites from the sprite cache without * discarding sprite location information. */

Source from the content-addressed store, hash-verified

909 * discarding sprite location information.
910 */
911void GfxClearSpriteCache()
912{
913 /* Clear sprite ptr for all cached items */
914 for (SpriteCache &sc : _spritecache) {
915 if (sc.ptr != nullptr) sc.ClearSpriteData();
916 }
917
918 VideoDriver::GetInstance()->ClearSystemSprites();
919}
920
921/**
922 * Remove all encoded font sprites from the sprite cache without

Callers 4

RealChangeBlitterFunction · 0.85
CheckBlitterFunction · 0.85
ZoomMinMaxChangedFunction · 0.85
SpriteZoomMinChangedFunction · 0.85

Calls 2

ClearSpriteDataMethod · 0.80
ClearSystemSpritesMethod · 0.45

Tested by

no test coverage detected