diff options
author | planetmaker <planetmaker@openttd.org> | 2011-08-20 05:35:03 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2011-08-20 05:35:03 +0000 |
commit | b102b58bde877c389e1f2ca775809fcf1a9fb0fb (patch) | |
tree | 1e48c44234a46b8b5d10322fb9e83d6fa03e63de | |
parent | 27aff44e77493ca87d6b75fa99c972a5035a42dc (diff) | |
download | openttd-b102b58bde877c389e1f2ca775809fcf1a9fb0fb.tar.xz |
(svn r22765) -Cleanup: Remove unused constants and name a magic constant
-rw-r--r-- | src/road_cmd.cpp | 2 | ||||
-rw-r--r-- | src/table/sprites.h | 17 |
2 files changed, 4 insertions, 15 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 75df89882..64e59640c 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1138,7 +1138,7 @@ static void DrawRoadBits(TileInfo *ti) /* DrawFoundation() modifies ti. * Default sloped sprites.. */ - if (ti->tileh != SLOPE_FLAT) image = _road_sloped_sprites[ti->tileh - 1] + 0x53F; + if (ti->tileh != SLOPE_FLAT) image = _road_sloped_sprites[ti->tileh - 1] + SPR_ROAD_SLOPE_START; } if (image == 0) image = _road_tile_sprites_1[road != ROAD_NONE ? road : tram]; diff --git a/src/table/sprites.h b/src/table/sprites.h index d4c96cddb..65988b568 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -388,20 +388,7 @@ static const SpriteID SPR_WAYPOINT_X_1 = SPR_OPENTTD_BASE + 78; static const SpriteID SPR_WAYPOINT_X_2 = SPR_OPENTTD_BASE + 79; static const SpriteID SPR_WAYPOINT_Y_1 = SPR_OPENTTD_BASE + 80; static const SpriteID SPR_WAYPOINT_Y_2 = SPR_OPENTTD_BASE + 81; - -static const uint16 OFFSET_TILEH_IMPOSSIBLE = 0; -static const uint16 OFFSET_TILEH_1 = 14; -static const uint16 OFFSET_TILEH_2 = 15; -static const uint16 OFFSET_TILEH_3 = 22; -static const uint16 OFFSET_TILEH_4 = 13; -static const uint16 OFFSET_TILEH_6 = 21; -static const uint16 OFFSET_TILEH_7 = 17; -static const uint16 OFFSET_TILEH_8 = 12; -static const uint16 OFFSET_TILEH_9 = 23; -static const uint16 OFFSET_TILEH_11 = 18; -static const uint16 OFFSET_TILEH_12 = 20; -static const uint16 OFFSET_TILEH_13 = 19; -static const uint16 OFFSET_TILEH_14 = 16; +/* see _track_sloped_sprites in rail_cmd.cpp for slope offsets */ /* Track fences */ static const SpriteID SPR_TRACK_FENCE_FLAT_X = 1301; @@ -537,8 +524,10 @@ static const SpriteID SPR_BUOY = 4076; // XXX this sucks, /* Sprites for road */ static const SpriteID SPR_ROAD_Y = 1332; static const SpriteID SPR_ROAD_X = 1333; +static const SpriteID SPR_ROAD_SLOPE_START = 1343; static const SpriteID SPR_ROAD_Y_SNOW = 1351; static const SpriteID SPR_ROAD_X_SNOW = 1352; +/* see _road_sloped_sprites_offset in road_cmd.cpp for offsets for sloped road tiles */ static const SpriteID SPR_EXCAVATION_X = 1414; static const SpriteID SPR_EXCAVATION_Y = 1415; |