Fix #8316: Make sort industries by production and transported with a cargo filter...
[openttd-github.git] / src / table / animcursors.h
blobed25691a5ea72c65e51a12ada091a50b29981d7f
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 */
8 /**
9 * @file animcursors.h
10 * This file defines all the the animated cursors.
11 * Animated cursors consist of the number of sprites that are
12 * displayed in a round-robin manner. Each sprite also has a time
13 * associated that indicates how many ticks the corresponding sprite
14 * is to be displayed.
17 /**
18 * Creates two array entries that define one
19 * status of the cursor.
20 * @param Sprite The Sprite to be displayed
21 * @param display_time The Number of ticks to display the sprite
23 #define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time },
25 /**
26 * This indicates the termination of the cursor list
28 #define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0)
30 /**
31 * Animated cursor elements for demolition
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()
41 /**
42 * Animated cursor elements for lower land
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()
51 /**
52 * Animated cursor elements for raise land
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()
61 /**
62 * Animated cursor elements for the goto icon
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()
71 /**
72 * Animated cursor elements for the build signal icon
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()
80 /**
81 * This is an array of pointers to all the animated cursor
82 * definitions we have above. This is the only thing that is
83 * accessed directly from other files
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