table/animcursors.h
author bjarni
Tue, 05 Dec 2006 22:40:42 +0000
changeset 5255 b693a9941b8c
parent 4538 51435693dcd0
permissions -rw-r--r--
(svn r7385) -Fix: FS#418 Deleting Train in depot with autoreplace failes
This turned out to be due to continue to drag the old vehicle, that autoreplace sold
This could also be triggered if more than one player used the same company
Now deleting a vehicle will remove all depot highlights of that vehicle
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1914
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1914
diff changeset
     2
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     3
/** @file animcursors.h
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     4
 * This file defines all the the animated cursors.
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     5
 * Animated cursors consist of the number of sprites that are
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     6
 * displayed in a round-robin manner. Each sprite also has a time
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     7
 * associated that indicates how many ticks the corresponding sprite
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     8
 * is to be displayed. Currently all this information is recorded in a single
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
     9
 * array. @todo This should be converted into an array of structs on the long run
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    10
 * All these arrays end up in an array of pointers called _animcursors.
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    11
 */
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    12
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    13
/** Creates two array entries that define one
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    14
 *  status of the cursor.
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    15
 *  @param Sprite The Sprite to be displayed
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    16
 *  @param display_time The Number of ticks to display the sprite
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    17
 */
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    18
#define ANIM_CURSOR_LINE(Sprite, display_time) Sprite, display_time,
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    19
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    20
/** This indicates the termination of the cursor list
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    21
 */
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    22
#define ANIM_CURSOR_END() 0xFFFF
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    23
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    24
/** Animated cursor elements for demolishion
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    25
 */
1914
2b4b3c3a95b4 (svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents: 0
diff changeset
    26
static const CursorID _demolish_animcursor[] = {
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    27
	ANIM_CURSOR_LINE(0x2C0, 8)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    28
	ANIM_CURSOR_LINE(0x2C1, 8)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    29
	ANIM_CURSOR_LINE(0x2C2, 8)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    30
	ANIM_CURSOR_LINE(0x2C3, 8)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    31
	ANIM_CURSOR_END()
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    32
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    34
/** Animated cursor elements for lower land
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    35
 */
1914
2b4b3c3a95b4 (svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents: 0
diff changeset
    36
static const CursorID _lower_land_animcursor[] = {
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    37
	ANIM_CURSOR_LINE(0x2BB, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    38
	ANIM_CURSOR_LINE(0x2BC, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    39
	ANIM_CURSOR_LINE(0x2BD, 29)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    40
	ANIM_CURSOR_END()
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    42
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    43
/** Animated cursor elements for raise land
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    44
 */
1914
2b4b3c3a95b4 (svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents: 0
diff changeset
    45
static const CursorID _raise_land_animcursor[] = {
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    46
	ANIM_CURSOR_LINE(0x2B8, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    47
	ANIM_CURSOR_LINE(0x2B9, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    48
	ANIM_CURSOR_LINE(0x2BA, 29)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    49
	ANIM_CURSOR_END()
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    50
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    51
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    52
/** Animated cursor elements for the goto icon
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    53
 */
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    54
static const CursorID _order_goto_animcursor[] = {
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    55
	ANIM_CURSOR_LINE(0x2CC, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    56
	ANIM_CURSOR_LINE(0x2CD, 10)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    57
	ANIM_CURSOR_LINE(0x2CE, 29)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    58
	ANIM_CURSOR_END()
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    59
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    60
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    61
/** Animated cursor elements for the build signal icon
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    62
 */
1914
2b4b3c3a95b4 (svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents: 0
diff changeset
    63
static const CursorID _build_signals_animcursor[] = {
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    64
	ANIM_CURSOR_LINE(0x50C, 20)
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    65
	ANIM_CURSOR_LINE(0x50D, 20)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    66
	ANIM_CURSOR_END()
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    67
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    68
2187
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    69
/** This is an array of pointers to all the animated cursor
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    70
 *  definitions we have above. This is the only thing that is
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    71
 *  accessed directly from other files
a0e206ce9fbf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents: 2186
diff changeset
    72
 */
1914
2b4b3c3a95b4 (svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents: 0
diff changeset
    73
static const CursorID * const _animcursors[] = {
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    74
	_demolish_animcursor,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
	_lower_land_animcursor,
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    76
	_raise_land_animcursor,
4538
51435693dcd0 (svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents: 2187
diff changeset
    77
	_order_goto_animcursor,
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
	_build_signals_animcursor
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
};