OpenTTD Source: src/table/animcursors.h Source File

OpenTTD Source 15.0-RC2

animcursors.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
20 static constexpr AnimCursor _demolish_animcursor[] = {
21 {SPR_CURSOR_DEMOLISH_FIRST, 8},
22 {SPR_CURSOR_DEMOLISH_1, 8},
23 {SPR_CURSOR_DEMOLISH_2, 8},
24 {SPR_CURSOR_DEMOLISH_LAST, 8},
25};
26
30 static constexpr AnimCursor _lower_land_animcursor[] = {
31 {SPR_CURSOR_LOWERLAND_FIRST, 10},
32 {SPR_CURSOR_LOWERLAND_1, 10},
33 {SPR_CURSOR_LOWERLAND_LAST, 29},
34};
35
39 static constexpr AnimCursor _raise_land_animcursor[] = {
40 {SPR_CURSOR_RAISELAND_FIRST, 10},
41 {SPR_CURSOR_RAISELAND_1, 10},
42 {SPR_CURSOR_RAISELAND_LAST, 29},
43};
44
48 static constexpr AnimCursor _order_goto_animcursor[] = {
49 {SPR_CURSOR_PICKSTATION_FIRST, 10},
50 {SPR_CURSOR_PICKSTATION_1, 10},
51 {SPR_CURSOR_PICKSTATION_LAST, 29},
52};
53
57 static constexpr AnimCursor _build_signals_animcursor[] = {
58 {SPR_CURSOR_BUILDSIGNALS_FIRST, 20},
59 {SPR_CURSOR_BUILDSIGNALS_LAST, 20},
60};
61
67 static constexpr std::span<const AnimCursor> _animcursors[] = {
68 _demolish_animcursor,
69 _lower_land_animcursor,
70 _raise_land_animcursor,
71 _order_goto_animcursor,
72 _build_signals_animcursor
73};
_build_signals_animcursor
static constexpr AnimCursor _build_signals_animcursor[]
Animated cursor elements for the build signal icon.
Definition animcursors.h:57
_order_goto_animcursor
static constexpr AnimCursor _order_goto_animcursor[]
Animated cursor elements for the goto icon.
Definition animcursors.h:48
_demolish_animcursor
static constexpr AnimCursor _demolish_animcursor[]
Animated cursor elements for demolition.
Definition animcursors.h:20
_raise_land_animcursor
static constexpr AnimCursor _raise_land_animcursor[]
Animated cursor elements for raise land.
Definition animcursors.h:39
_animcursors
static constexpr std::span< const AnimCursor > _animcursors[]
This is an array of pointers to all the animated cursor definitions we have above.
Definition animcursors.h:67
_lower_land_animcursor
static constexpr AnimCursor _lower_land_animcursor[]
Animated cursor elements for lower land.
Definition animcursors.h:30
SPR_CURSOR_DEMOLISH_FIRST
static const CursorID SPR_CURSOR_DEMOLISH_FIRST
Animation macro in table/animcursors.h (_animcursors[])
Definition sprites.h:1500
AnimCursor
A single sprite of a list of animated cursors.
Definition gfx_type.h:110