summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-09-07 13:38:57 +0000
committeryexo <yexo@openttd.org>2009-09-07 13:38:57 +0000
commitec63a0fc142b7013f249e762696e9cb662c1d3f2 (patch)
tree68760360e01c871eb36453197654f0c36dc52170 /src/table
parent6e3591700fd1543a91c067624b15ee927cca996e (diff)
downloadopenttd-ec63a0fc142b7013f249e762696e9cb662c1d3f2.tar.xz
(svn r17455) -Codechange: use sprite names instead of magic numbers in table/clear_land.h and change some names
Diffstat (limited to 'src/table')
-rw-r--r--src/table/clear_land.h73
-rw-r--r--src/table/sprites.h32
-rw-r--r--src/table/tree_land.h7
3 files changed, 49 insertions, 63 deletions
diff --git a/src/table/clear_land.h b/src/table/clear_land.h
index 927a3abb7..86c0bb582 100644
--- a/src/table/clear_land.h
+++ b/src/table/clear_land.h
@@ -9,25 +9,25 @@
/** @file clear_land.h Tables with sprites for clear land and fences. */
-static const SpriteID _landscape_clear_sprites[8] = {
- 0xFA0,
- 0xFB3,
- 0xFB4,
- 0xFB5,
- 0xFB6,
- 0xFA0,
- 0xFB3,
- 0xFB4,
+static const SpriteID _landscape_clear_sprites_rough[8] = {
+ SPR_FLAT_ROUGH_LAND,
+ SPR_FLAT_ROUGH_LAND_1,
+ SPR_FLAT_ROUGH_LAND_2,
+ SPR_FLAT_ROUGH_LAND_3,
+ SPR_FLAT_ROUGH_LAND_4,
+ SPR_FLAT_ROUGH_LAND,
+ SPR_FLAT_ROUGH_LAND_1,
+ SPR_FLAT_ROUGH_LAND_2,
};
-static const byte _fence_mod_by_tileh[32] = {
+static const byte _fence_mod_by_tileh_sw[32] = {
0, 2, 4, 0, 0, 2, 4, 0,
0, 2, 4, 0, 0, 2, 4, 0,
0, 2, 4, 0, 0, 2, 4, 4,
0, 2, 4, 2, 0, 2, 4, 0,
};
-static const byte _fence_mod_by_tileh_2[32] = {
+static const byte _fence_mod_by_tileh_se[32] = {
1, 1, 5, 5, 3, 3, 1, 1,
1, 1, 5, 5, 3, 3, 1, 1,
1, 1, 5, 5, 3, 3, 1, 5,
@@ -35,37 +35,30 @@ static const byte _fence_mod_by_tileh_2[32] = {
};
-static const SpriteID _clear_land_fence_sprites_1[7] = {
- 0xFFA,
- 0x1000,
- 0x1006,
- 0x100C,
- 0x1012,
- 0x1018,
+static const SpriteID _clear_land_fence_sprites[7] = {
+ SPR_HEDGE_BUSHES,
+ SPR_HEDGE_BUSHES_WITH_GATE,
+ SPR_HEDGE_FENCE,
+ SPR_HEDGE_BLOOMBUSH_YELLOW,
+ SPR_HEDGE_BLOOMBUSH_RED,
+ SPR_HEDGE_STONE,
};
-static const SpriteID _clear_land_sprites_1[16] = {
- 0x101E,
- 0x1031,
- 0x1044,
- 0x1057,
- 0x106A,
- 0x107D,
- 0x1090,
- 0x10A3,
- 0x10B6,
+static const SpriteID _clear_land_sprites_farmland[16] = {
+ SPR_FARMLAND_BARE,
+ SPR_FARMLAND_STATE_1,
+ SPR_FARMLAND_STATE_2,
+ SPR_FARMLAND_STATE_3,
+ SPR_FARMLAND_STATE_4,
+ SPR_FARMLAND_STATE_5,
+ SPR_FARMLAND_STATE_6,
+ SPR_FARMLAND_STATE_7,
+ SPR_FARMLAND_HAYPACKS,
};
-static const SpriteID _clear_land_sprites_2[8] = {
- 0x118D,
- 0x11A0,
- 0x11B3,
- 0x11C6,
-};
-
-static const SpriteID _clear_land_sprites_3[8] = {
- 0x118D,
- 0x11A0,
- 0x11B3,
- 0x11C6,
+static const SpriteID _clear_land_sprites_snow_desert[8] = {
+ SPR_FLAT_1_QUART_SNOW_DESERT_TILE,
+ SPR_FLAT_2_QUART_SNOW_DESERT_TILE,
+ SPR_FLAT_3_QUART_SNOW_DESERT_TILE,
+ SPR_FLAT_SNOW_DESERT_TILE,
};
diff --git a/src/table/sprites.h b/src/table/sprites.h
index 44d74e53a..4a1a67876 100644
--- a/src/table/sprites.h
+++ b/src/table/sprites.h
@@ -518,22 +518,22 @@ enum Sprites {
SPR_EXCAVATION_Y = 1415,
/* Landscape sprites */
- SPR_FLAT_BARE_LAND = 3924,
- SPR_FLAT_1_THIRD_GRASS_TILE = 3943,
- SPR_FLAT_2_THIRD_GRASS_TILE = 3962,
- SPR_FLAT_GRASS_TILE = 3981,
- SPR_FLAT_ROUGH_LAND = 4000,
- SPR_FLAT_ROUGH_LAND_1 = 4019,
- SPR_FLAT_ROUGH_LAND_2 = 4020,
- SPR_FLAT_ROUGH_LAND_3 = 4021,
- SPR_FLAT_ROUGH_LAND_4 = 4022,
- SPR_FLAT_ROCKY_LAND_1 = 4023,
- SPR_FLAT_ROCKY_LAND_2 = 4042,
- SPR_FLAT_WATER_TILE = 4061,
- SPR_FLAT_1_QUART_SNOWY_TILE = 4493,
- SPR_FLAT_2_QUART_SNOWY_TILE = 4512,
- SPR_FLAT_3_QUART_SNOWY_TILE = 4531,
- SPR_FLAT_SNOWY_TILE = 4550,
+ SPR_FLAT_BARE_LAND = 3924,
+ SPR_FLAT_1_THIRD_GRASS_TILE = 3943,
+ SPR_FLAT_2_THIRD_GRASS_TILE = 3962,
+ SPR_FLAT_GRASS_TILE = 3981,
+ SPR_FLAT_ROUGH_LAND = 4000,
+ SPR_FLAT_ROUGH_LAND_1 = 4019,
+ SPR_FLAT_ROUGH_LAND_2 = 4020,
+ SPR_FLAT_ROUGH_LAND_3 = 4021,
+ SPR_FLAT_ROUGH_LAND_4 = 4022,
+ SPR_FLAT_ROCKY_LAND_1 = 4023,
+ SPR_FLAT_ROCKY_LAND_2 = 4042,
+ SPR_FLAT_WATER_TILE = 4061,
+ SPR_FLAT_1_QUART_SNOW_DESERT_TILE = 4493,
+ SPR_FLAT_2_QUART_SNOW_DESERT_TILE = 4512,
+ SPR_FLAT_3_QUART_SNOW_DESERT_TILE = 4531,
+ SPR_FLAT_SNOW_DESERT_TILE = 4550,
/* Hedge, Farmland-fence sprites */
SPR_HEDGE_BUSHES = 4090,
diff --git a/src/table/tree_land.h b/src/table/tree_land.h
index d65282c90..64757267e 100644
--- a/src/table/tree_land.h
+++ b/src/table/tree_land.h
@@ -12,13 +12,6 @@
#ifndef TREE_LAND_H
#define TREE_LAND_H
-static const SpriteID _tree_sprites_1[] = {
- SPR_FLAT_1_QUART_SNOWY_TILE,
- SPR_FLAT_2_QUART_SNOWY_TILE,
- SPR_FLAT_3_QUART_SNOWY_TILE,
- SPR_FLAT_SNOWY_TILE
-};
-
static const byte _tree_base_by_landscape[4] = {0, 12, 20, 32};
static const byte _tree_count_by_landscape[4] = {12, 8, 12, 9};