author | truelight |
Sun, 19 Aug 2007 13:16:06 +0000 | |
branch | noai |
changeset 9696 | 4384ed3de1f0 |
parent 6464 | 1c3515433409 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
3 |
/** @file animcursors.h |
2a51f8925eeb
(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. |
2a51f8925eeb
(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 |
2a51f8925eeb
(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 |
2a51f8925eeb
(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 |
6461
20d2c1168b9e
(svn r8877) -Cleanup: remove already implemented @todo
rubidium
parents:
5726
diff
changeset
|
8 |
* is to be displayed. |
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
9 |
*/ |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
10 |
|
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
11 |
/** Creates two array entries that define one |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
12 |
* status of the cursor. |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
13 |
* @param Sprite The Sprite to be displayed |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
14 |
* @param display_time The Number of ticks to display the sprite |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
15 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
16 |
#define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time }, |
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
17 |
|
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
18 |
/** This indicates the termination of the cursor list |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
19 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
20 |
#define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0) |
0 | 21 |
|
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
22 |
/** Animated cursor elements for demolishion |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
23 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
24 |
static const AnimCursor _demolish_animcursor[] = { |
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
25 |
ANIM_CURSOR_LINE(0x2C0, 8) |
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
26 |
ANIM_CURSOR_LINE(0x2C1, 8) |
03b675e3ac05
(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(0x2C2, 8) |
03b675e3ac05
(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(0x2C3, 8) |
0 | 29 |
ANIM_CURSOR_END() |
30 |
}; |
|
31 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
32 |
/** Animated cursor elements for lower land |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
33 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
34 |
static const AnimCursor _lower_land_animcursor[] = { |
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
35 |
ANIM_CURSOR_LINE(0x2BB, 10) |
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
36 |
ANIM_CURSOR_LINE(0x2BC, 10) |
03b675e3ac05
(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(0x2BD, 29) |
0 | 38 |
ANIM_CURSOR_END() |
39 |
}; |
|
40 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
41 |
/** Animated cursor elements for raise land |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
42 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
43 |
static const AnimCursor _raise_land_animcursor[] = { |
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
44 |
ANIM_CURSOR_LINE(0x2B8, 10) |
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
45 |
ANIM_CURSOR_LINE(0x2B9, 10) |
03b675e3ac05
(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(0x2BA, 29) |
0 | 47 |
ANIM_CURSOR_END() |
48 |
}; |
|
49 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
50 |
/** Animated cursor elements for the goto icon |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
51 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
52 |
static const AnimCursor _order_goto_animcursor[] = { |
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
53 |
ANIM_CURSOR_LINE(0x2CC, 10) |
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
54 |
ANIM_CURSOR_LINE(0x2CD, 10) |
03b675e3ac05
(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(0x2CE, 29) |
0 | 56 |
ANIM_CURSOR_END() |
57 |
}; |
|
58 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
59 |
/** Animated cursor elements for the build signal icon |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
60 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
61 |
static const AnimCursor _build_signals_animcursor[] = { |
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
62 |
ANIM_CURSOR_LINE(0x50C, 20) |
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
63 |
ANIM_CURSOR_LINE(0x50D, 20) |
0 | 64 |
ANIM_CURSOR_END() |
65 |
}; |
|
66 |
||
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
67 |
/** This is an array of pointers to all the animated cursor |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
68 |
* definitions we have above. This is the only thing that is |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
69 |
* accessed directly from other files |
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
70 |
*/ |
6464
1c3515433409
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6461
diff
changeset
|
71 |
static const AnimCursor * const _animcursors[] = { |
0 | 72 |
_demolish_animcursor, |
73 |
_lower_land_animcursor, |
|
74 |
_raise_land_animcursor, |
|
4538
03b675e3ac05
(svn r6367) -Codechange: Speed up the animated cursors a bit so they move once in a while
Darkvater
parents:
2187
diff
changeset
|
75 |
_order_goto_animcursor, |
0 | 76 |
_build_signals_animcursor |
77 |
}; |