author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 6138 | f1196498ef66 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
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 |
6135
e0e47875f0b7
(svn r8877) -Cleanup: remove already implemented @todo
rubidium
parents:
5475
diff
changeset
|
8 |
* is to be displayed. |
2187
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
9 |
*/ |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
10 |
|
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
12 |
* status of the cursor. |
a0e206ce9fbf
(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 |
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
15 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
16 |
#define ANIM_CURSOR_LINE(Sprite, display_time) { Sprite, display_time }, |
2187
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 |
/** 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
|
19 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
20 |
#define ANIM_CURSOR_END() ANIM_CURSOR_LINE(AnimCursor::LAST, 0) |
0 | 21 |
|
2187
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
22 |
/** Animated cursor elements for demolishion |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
23 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
24 |
static const AnimCursor _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
|
25 |
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
|
26 |
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
|
27 |
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
|
28 |
ANIM_CURSOR_LINE(0x2C3, 8) |
0 | 29 |
ANIM_CURSOR_END() |
30 |
}; |
|
31 |
||
2187
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
33 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
34 |
static const AnimCursor _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
|
35 |
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
|
36 |
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
|
37 |
ANIM_CURSOR_LINE(0x2BD, 29) |
0 | 38 |
ANIM_CURSOR_END() |
39 |
}; |
|
40 |
||
2187
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
42 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
43 |
static const AnimCursor _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
|
44 |
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
|
45 |
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
|
46 |
ANIM_CURSOR_LINE(0x2BA, 29) |
0 | 47 |
ANIM_CURSOR_END() |
48 |
}; |
|
49 |
||
2187
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
51 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
52 |
static const AnimCursor _order_goto_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
|
53 |
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
|
54 |
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
|
55 |
ANIM_CURSOR_LINE(0x2CE, 29) |
0 | 56 |
ANIM_CURSOR_END() |
57 |
}; |
|
58 |
||
2187
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
60 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
61 |
static const AnimCursor _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
|
62 |
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
|
63 |
ANIM_CURSOR_LINE(0x50D, 20) |
0 | 64 |
ANIM_CURSOR_END() |
65 |
}; |
|
66 |
||
2187
a0e206ce9fbf
(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 |
a0e206ce9fbf
(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 |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
69 |
* accessed directly from other files |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
70 |
*/ |
6138
f1196498ef66
(svn r8880) -Codechange: make anim cursors an array of structs.
rubidium
parents:
6135
diff
changeset
|
71 |
static const AnimCursor * const _animcursors[] = { |
0 | 72 |
_demolish_animcursor, |
73 |
_lower_land_animcursor, |
|
74 |
_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
|
75 |
_order_goto_animcursor, |
0 | 76 |
_build_signals_animcursor |
77 |
}; |