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

Function GfxLoadSprites

src/gfxinit.cpp:335–347  ·  view source on GitHub ↗

Initialise and load all the sprites. */

Source from the content-addressed store, hash-verified

333
334/** Initialise and load all the sprites. */
335void GfxLoadSprites()
336{
337 Debug(sprite, 2, "Loading sprite set {}", _settings_game.game_creation.landscape);
338
339 SwitchNewGRFBlitter();
340 VideoDriver::GetInstance()->ClearSystemSprites();
341 FontCache::ClearFontCaches(FONTSIZES_ALL);
342 GfxInitSpriteMem();
343 LoadSpriteTables();
344 GfxInitPalettes();
345
346 UpdateCursorSize();
347}
348
349/* instantiate here, because unique_ptr needs a complete type */
350GraphicsSet::GraphicsSet() = default;

Callers 3

GenerateWorldFunction · 0.85
AfterLoadGameFunction · 0.85
ReloadNewGRFDataFunction · 0.85

Calls 6

SwitchNewGRFBlitterFunction · 0.85
GfxInitSpriteMemFunction · 0.85
LoadSpriteTablesFunction · 0.85
GfxInitPalettesFunction · 0.85
UpdateCursorSizeFunction · 0.85
ClearSystemSpritesMethod · 0.45

Tested by

no test coverage detected