summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-07 20:40:50 +0000
committerrubidium <rubidium@openttd.org>2010-12-07 20:40:50 +0000
commit249d21d3de87f77c5cbd859b5367b98db31917a5 (patch)
treec1e0bd9b69b19c2d77f6af463fa80d1b067cd15f
parent933a4d482561bec328d7a7415944896bc4f1c285 (diff)
downloadopenttd-249d21d3de87f77c5cbd859b5367b98db31917a5.tar.xz
(svn r21423) -Codechange: replace some magic numbers by slightly less magic numbers
-rw-r--r--src/table/animcursors.h30
-rw-r--r--src/table/sprites.h20
2 files changed, 35 insertions, 15 deletions
diff --git a/src/table/animcursors.h b/src/table/animcursors.h
index 4757c5c53..14d22b7ef 100644
--- a/src/table/animcursors.h
+++ b/src/table/animcursors.h
@@ -33,10 +33,10 @@
* Animated cursor elements for demolishion
*/
static const AnimCursor _demolish_animcursor[] = {
- ANIM_CURSOR_LINE(0x2C0, 8)
- ANIM_CURSOR_LINE(0x2C1, 8)
- ANIM_CURSOR_LINE(0x2C2, 8)
- ANIM_CURSOR_LINE(0x2C3, 8)
+ ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_FIRST, 8)
+ ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_1, 8)
+ ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_2, 8)
+ ANIM_CURSOR_LINE(SPR_CURSOR_DEMOLISH_LAST, 8)
ANIM_CURSOR_END()
};
@@ -44,9 +44,9 @@ static const AnimCursor _demolish_animcursor[] = {
* Animated cursor elements for lower land
*/
static const AnimCursor _lower_land_animcursor[] = {
- ANIM_CURSOR_LINE(0x2BB, 10)
- ANIM_CURSOR_LINE(0x2BC, 10)
- ANIM_CURSOR_LINE(0x2BD, 29)
+ ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_FIRST, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_1, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_LOWERLAND_LAST, 29)
ANIM_CURSOR_END()
};
@@ -54,9 +54,9 @@ static const AnimCursor _lower_land_animcursor[] = {
* Animated cursor elements for raise land
*/
static const AnimCursor _raise_land_animcursor[] = {
- ANIM_CURSOR_LINE(0x2B8, 10)
- ANIM_CURSOR_LINE(0x2B9, 10)
- ANIM_CURSOR_LINE(0x2BA, 29)
+ ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_FIRST, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_1, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_RAISELAND_LAST, 29)
ANIM_CURSOR_END()
};
@@ -64,9 +64,9 @@ static const AnimCursor _raise_land_animcursor[] = {
* Animated cursor elements for the goto icon
*/
static const AnimCursor _order_goto_animcursor[] = {
- ANIM_CURSOR_LINE(0x2CC, 10)
- ANIM_CURSOR_LINE(0x2CD, 10)
- ANIM_CURSOR_LINE(0x2CE, 29)
+ ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_FIRST, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_1, 10)
+ ANIM_CURSOR_LINE(SPR_CURSOR_PICKSTATION_LAST, 29)
ANIM_CURSOR_END()
};
@@ -74,8 +74,8 @@ static const AnimCursor _order_goto_animcursor[] = {
* Animated cursor elements for the build signal icon
*/
static const AnimCursor _build_signals_animcursor[] = {
- ANIM_CURSOR_LINE(0x50C, 20)
- ANIM_CURSOR_LINE(0x50D, 20)
+ ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_FIRST, 20)
+ ANIM_CURSOR_LINE(SPR_CURSOR_BUILDSIGNALS_LAST, 20)
ANIM_CURSOR_END()
};
diff --git a/src/table/sprites.h b/src/table/sprites.h
index bb4a0774f..d31b693bc 100644
--- a/src/table/sprites.h
+++ b/src/table/sprites.h
@@ -1426,6 +1426,26 @@ static const CursorID SPR_CURSOR_CLONE_AIRPLANE = SPR_OPENTTD_BASE + 113;
/** Animation macro in table/animcursors.h (_animcursors[]) */
+static const CursorID SPR_CURSOR_DEMOLISH_FIRST = 704;
+static const CursorID SPR_CURSOR_DEMOLISH_1 = 705;
+static const CursorID SPR_CURSOR_DEMOLISH_2 = 706;
+static const CursorID SPR_CURSOR_DEMOLISH_LAST = 707;
+
+static const CursorID SPR_CURSOR_LOWERLAND_FIRST = 699;
+static const CursorID SPR_CURSOR_LOWERLAND_1 = 700;
+static const CursorID SPR_CURSOR_LOWERLAND_LAST = 701;
+
+static const CursorID SPR_CURSOR_RAISELAND_FIRST = 696;
+static const CursorID SPR_CURSOR_RAISELAND_1 = 697;
+static const CursorID SPR_CURSOR_RAISELAND_LAST = 698;
+
+static const CursorID SPR_CURSOR_PICKSTATION_FIRST = 716;
+static const CursorID SPR_CURSOR_PICKSTATION_1 = 717;
+static const CursorID SPR_CURSOR_PICKSTATION_LAST = 718;
+
+static const CursorID SPR_CURSOR_BUILDSIGNALS_FIRST = 1292;
+static const CursorID SPR_CURSOR_BUILDSIGNALS_LAST = 1293;
+
/** Flag for saying a cursor sprite is an animated cursor. */
static const CursorID ANIMCURSOR_FLAG = 1U << 31;
static const CursorID ANIMCURSOR_DEMOLISH = ANIMCURSOR_FLAG | 0; ///< 704 - 707 - demolish dynamite