Remove costly recalculation of a date format we already have.
[openttd-joker.git] / src / table / animcursors.h
blobcae690dabc1971718c950c72a72ad7effaa07fe9
1 /* $Id: animcursors.h 24900 2013-01-08 22:46:42Z planetmaker $ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /**
11 * @file animcursors.h
12 * This file defines all the the animated cursors.
13 * Animated cursors consist of the number of sprites that are
14 * displayed in a round-robin manner. Each sprite also has a time
15 * associated that indicates how many ticks the corresponding sprite
16 * is to be displayed.
19 /**
20 * Creates two array entries that define one
21 * status of the cursor.
22 * @param Sprite The Sprite to be displayed
23 * @param display_time The Number of ticks to display the sprite
25 #define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time },
27 /**
28 * This indicates the termination of the cursor list
30 #define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0)
32 /**
33 * Animated cursor elements for demolition
35 static const AnimCursor _demolish_animcursor[] = {
36 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_FIRST, 8)
37 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_1, 8)
38 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_2, 8)
39 ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_LAST, 8)
40 ANIM_CURSOR_END()
43 /**
44 * Animated cursor elements for lower land
46 static const AnimCursor _lower_land_animcursor[] = {
47 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_FIRST, 10)
48 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_1, 10)
49 ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_LAST, 29)
50 ANIM_CURSOR_END()
53 /**
54 * Animated cursor elements for raise land
56 static const AnimCursor _raise_land_animcursor[] = {
57 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_FIRST, 10)
58 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_1, 10)
59 ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_LAST, 29)
60 ANIM_CURSOR_END()
63 /**
64 * Animated cursor elements for the goto icon
66 static const AnimCursor _order_goto_animcursor[] = {
67 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_FIRST, 10)
68 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_1, 10)
69 ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_LAST, 29)
70 ANIM_CURSOR_END()
73 /**
74 * Animated cursor elements for the build signal icon
76 static const AnimCursor _build_signals_animcursor[] = {
77 ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_FIRST, 20)
78 ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_LAST, 20)
79 ANIM_CURSOR_END()
82 /**
83 * This is an array of pointers to all the animated cursor
84 * definitions we have above. This is the only thing that is
85 * accessed directly from other files
87 static const AnimCursor * const _animcursors[] = {
88 _demolish_animcursor,
89 _lower_land_animcursor,
90 _raise_land_animcursor,
91 _order_goto_animcursor,
92 _build_signals_animcursor