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

OpenTTD Source 14.0-RC3

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 <http://www.gnu.org/licenses/>.
6 */
7
23 #define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time },
24
28 #define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0)
29
33 static const AnimCursor _demolish_animcursor[] = {
34 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_FIRST, 8)
35 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_1, 8)
36 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_2, 8)
37 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_LAST, 8)
38 ANIM_CURSOR_END()
39 };
40
44 static const AnimCursor _lower_land_animcursor[] = {
45 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_FIRST, 10)
46 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_1, 10)
47 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_LAST, 29)
48 ANIM_CURSOR_END()
49 };
50
54 static const AnimCursor _raise_land_animcursor[] = {
55 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_FIRST, 10)
56 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_1, 10)
57 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_LAST, 29)
58 ANIM_CURSOR_END()
59 };
60
64 static const AnimCursor _order_goto_animcursor[] = {
65 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_FIRST, 10)
66 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_1, 10)
67 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_LAST, 29)
68 ANIM_CURSOR_END()
69 };
70
74 static const AnimCursor _build_signals_animcursor[] = {
75 ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_FIRST, 20)
76 ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_LAST, 20)
77 ANIM_CURSOR_END()
78 };
79
85 static const AnimCursor * const _animcursors[] = {
86 _demolish_animcursor,
87 _lower_land_animcursor,
88 _raise_land_animcursor,
89 _order_goto_animcursor,
90 _build_signals_animcursor
91 };
_lower_land_animcursor
static const AnimCursor _lower_land_animcursor[]
Animated cursor elements for lower land.
Definition: animcursors.h:44
_build_signals_animcursor
static const AnimCursor _build_signals_animcursor[]
Animated cursor elements for the build signal icon.
Definition: animcursors.h:74
_animcursors
static const AnimCursor *const _animcursors[]
This is an array of pointers to all the animated cursor definitions we have above.
Definition: animcursors.h:85
_raise_land_animcursor
static const AnimCursor _raise_land_animcursor[]
Animated cursor elements for raise land.
Definition: animcursors.h:54
SPR_CURSOR_DEMOLISH_FIRST
static const CursorID SPR_CURSOR_DEMOLISH_FIRST
Animation macro in table/animcursors.h (_animcursors[])
Definition: sprites.h:1478
ANIM_CURSOR_LINE
#define ANIM_CURSOR_LINE(Sprite, display_time)
Creates two array entries that define one status of the cursor.
Definition: animcursors.h:23
AnimCursor
A single sprite of a list of animated cursors.
Definition: gfx_type.h:108
ANIM_CURSOR_END
#define ANIM_CURSOR_END()
This indicates the termination of the cursor list.
Definition: animcursors.h:28
_demolish_animcursor
static const AnimCursor _demolish_animcursor[]
Animated cursor elements for demolition.
Definition: animcursors.h:33
_order_goto_animcursor
static const AnimCursor _order_goto_animcursor[]
Animated cursor elements for the goto icon.
Definition: animcursors.h:64