author | KUDr |
Thu, 16 Nov 2006 13:59:26 +0000 | |
changeset 5097 | c9ebf6608b16 |
parent 4538 | 51435693dcd0 |
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 |
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 | 22 |
#define ANIM_CURSOR_END() 0xFFFF |
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 | 31 |
ANIM_CURSOR_END() |
32 |
}; |
|
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 | 40 |
ANIM_CURSOR_END() |
41 |
}; |
|
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 | 49 |
ANIM_CURSOR_END() |
50 |
}; |
|
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 | 58 |
ANIM_CURSOR_END() |
59 |
}; |
|
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 | 66 |
ANIM_CURSOR_END() |
67 |
}; |
|
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 | 74 |
_demolish_animcursor, |
75 |
_lower_land_animcursor, |
|
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 | 78 |
_build_signals_animcursor |
79 |
}; |