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

Function SetAnimatedMouseCursor

src/gfx.cpp:1719–1726  ·  view source on GitHub ↗

* Assign an animation to the cursor. * @param table Array of animation states. * @see SetMouseCursor */

Source from the content-addressed store, hash-verified

1717 * @see SetMouseCursor
1718 */
1719void SetAnimatedMouseCursor(std::span<const AnimCursor> table)
1720{
1721 assert(!_cursor.sprites.empty());
1722 _cursor.animate_list = table;
1723 _cursor.animate_cur = std::end(table);
1724 _cursor.sprites[0].image.pal = PAL_NONE;
1725 SwitchAnimatedCursor();
1726}
1727
1728/**
1729 * Update cursor position based on a relative change.

Callers 1

SetObjectToPlaceFunction · 0.85

Calls 3

SwitchAnimatedCursorFunction · 0.85
endFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected