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

Function SwitchAnimatedCursor

src/gfx.cpp:1666–1677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1664}
1665
1666static void SwitchAnimatedCursor()
1667{
1668 if (_cursor.animate_cur == std::end(_cursor.animate_list)) {
1669 _cursor.animate_cur = std::begin(_cursor.animate_list);
1670 }
1671
1672 assert(!_cursor.sprites.empty());
1673 SetCursorSprite(_cursor.animate_cur->sprite, _cursor.sprites[0].image.pal);
1674
1675 _cursor.animate_timeout = _cursor.animate_cur->display_time;
1676 ++_cursor.animate_cur;
1677}
1678
1679void CursorTick()
1680{

Callers 2

CursorTickFunction · 0.85
SetAnimatedMouseCursorFunction · 0.85

Calls 4

SetCursorSpriteFunction · 0.85
endFunction · 0.50
beginFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected