OpenTTD Source 20250909-master-g033114da8c
animcursors.h File Reference

This file defines all the the animated cursors. More...

Go to the source code of this file.

Variables

static constexpr AnimCursor _demolish_animcursor []
 Animated cursor elements for demolition.
 
static constexpr AnimCursor _lower_land_animcursor []
 Animated cursor elements for lower land.
 
static constexpr AnimCursor _raise_land_animcursor []
 Animated cursor elements for raise land.
 
static constexpr AnimCursor _order_goto_animcursor []
 Animated cursor elements for the goto icon.
 
static constexpr AnimCursor _build_signals_animcursor []
 Animated cursor elements for the build signal icon.
 
static constexpr std::span< const AnimCursor_animcursors []
 This is an array of pointers to all the animated cursor definitions we have above.
 

Detailed Description

This file defines all the the animated cursors.

Animated cursors consist of the number of sprites that are displayed in a round-robin manner. Each sprite also has a time associated that indicates how many ticks the corresponding sprite is to be displayed.

Definition in file animcursors.h.

Variable Documentation

◆ _animcursors

constexpr std::span<const AnimCursor> _animcursors[]
staticconstexpr
Initial value:
= {
}
static constexpr AnimCursor _build_signals_animcursor[]
Animated cursor elements for the build signal icon.
Definition animcursors.h:57
static constexpr AnimCursor _order_goto_animcursor[]
Animated cursor elements for the goto icon.
Definition animcursors.h:48
static constexpr AnimCursor _demolish_animcursor[]
Animated cursor elements for demolition.
Definition animcursors.h:20
static constexpr AnimCursor _raise_land_animcursor[]
Animated cursor elements for raise land.
Definition animcursors.h:39
static constexpr AnimCursor _lower_land_animcursor[]
Animated cursor elements for lower land.
Definition animcursors.h:30

This is an array of pointers to all the animated cursor definitions we have above.

This is the only thing that is accessed directly from other files

Definition at line 67 of file animcursors.h.

Referenced by SetObjectToPlace().

◆ _build_signals_animcursor

constexpr AnimCursor _build_signals_animcursor[]
staticconstexpr
Initial value:
= {
{SPR_CURSOR_BUILDSIGNALS_FIRST, 20},
{SPR_CURSOR_BUILDSIGNALS_LAST, 20},
}

Animated cursor elements for the build signal icon.

Definition at line 57 of file animcursors.h.

◆ _demolish_animcursor

constexpr AnimCursor _demolish_animcursor[]
staticconstexpr
Initial value:
= {
{SPR_CURSOR_DEMOLISH_1, 8},
{SPR_CURSOR_DEMOLISH_2, 8},
{SPR_CURSOR_DEMOLISH_LAST, 8},
}
static const CursorID SPR_CURSOR_DEMOLISH_FIRST
Animation macro in table/animcursors.h (_animcursors[])
Definition sprites.h:1492

Animated cursor elements for demolition.

Definition at line 20 of file animcursors.h.

◆ _lower_land_animcursor

constexpr AnimCursor _lower_land_animcursor[]
staticconstexpr
Initial value:
= {
{SPR_CURSOR_LOWERLAND_FIRST, 10},
{SPR_CURSOR_LOWERLAND_1, 10},
{SPR_CURSOR_LOWERLAND_LAST, 29},
}

Animated cursor elements for lower land.

Definition at line 30 of file animcursors.h.

◆ _order_goto_animcursor

constexpr AnimCursor _order_goto_animcursor[]
staticconstexpr
Initial value:
= {
{SPR_CURSOR_PICKSTATION_FIRST, 10},
{SPR_CURSOR_PICKSTATION_1, 10},
{SPR_CURSOR_PICKSTATION_LAST, 29},
}

Animated cursor elements for the goto icon.

Definition at line 48 of file animcursors.h.

◆ _raise_land_animcursor

constexpr AnimCursor _raise_land_animcursor[]
staticconstexpr
Initial value:
= {
{SPR_CURSOR_RAISELAND_FIRST, 10},
{SPR_CURSOR_RAISELAND_1, 10},
{SPR_CURSOR_RAISELAND_LAST, 29},
}

Animated cursor elements for raise land.

Definition at line 39 of file animcursors.h.