author | tron |
Mon, 05 Jun 2006 16:08:06 +0000 | |
changeset 3968 | 3dbc765cc171 |
parent 2187 | a0e206ce9fbf |
child 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[] = { |
0 | 27 |
ANIM_CURSOR_LINE(0x2C0, 29) |
28 |
ANIM_CURSOR_LINE(0x2C1, 29) |
|
29 |
ANIM_CURSOR_LINE(0x2C2, 29) |
|
30 |
ANIM_CURSOR_LINE(0x2C3, 29) |
|
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[] = { |
0 | 37 |
ANIM_CURSOR_LINE(0x2BB, 29) |
38 |
ANIM_CURSOR_LINE(0x2BC, 29) |
|
39 |
ANIM_CURSOR_LINE(0x2BD, 98) |
|
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[] = { |
0 | 46 |
ANIM_CURSOR_LINE(0x2B8, 29) |
47 |
ANIM_CURSOR_LINE(0x2B9, 29) |
|
48 |
ANIM_CURSOR_LINE(0x2BA, 98) |
|
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 |
*/ |
1914
2b4b3c3a95b4
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents:
0
diff
changeset
|
54 |
static const CursorID _pick_station_animcursor[] = { |
0 | 55 |
ANIM_CURSOR_LINE(0x2CC, 29) |
56 |
ANIM_CURSOR_LINE(0x2CD, 29) |
|
57 |
ANIM_CURSOR_LINE(0x2CE, 98) |
|
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[] = { |
2187
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
64 |
ANIM_CURSOR_LINE(0x50C, 29) |
a0e206ce9fbf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
65 |
ANIM_CURSOR_LINE(0x50D, 29) |
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, |
|
77 |
_pick_station_animcursor, |
|
78 |
_build_signals_animcursor |
|
79 |
}; |