summaryrefslogtreecommitdiff
path: root/road_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-08-03 06:44:54 +0000
committertron <tron@openttd.org>2006-08-03 06:44:54 +0000
commited26c5e14c6d530b52ef199267648612c456a4d6 (patch)
treec97ab5288c58e7857825a1db757a20ad123891de /road_cmd.c
parent5f18b6792a67e8e06f3949da63cf11c37cb59d99 (diff)
downloadopenttd-ed26c5e14c6d530b52ef199267648612c456a4d6.tar.xz
(svn r5723) - Move the declaration of DrawRoadDepotSprite() out of functions.h (but I'm not too happy with the new header)
- Use DiagDirection instead of plain int for the orientation of the depot graphics - Rename the associated data tables with sprites to something more meaningful
Diffstat (limited to 'road_cmd.c')
-rw-r--r--road_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/road_cmd.c b/road_cmd.c
index b2b72837d..6dd97dbea 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -793,7 +793,7 @@ static void DrawTile_Road(TileInfo *ti)
player = GetTileOwner(ti->tile);
if (player < MAX_PLAYERS) ormod = PLAYER_SPRITE_COLOR(player);
- drss = _road_display_datas[GetRoadDepotDirection(ti->tile)];
+ drss = _road_depot[GetRoadDepotDirection(ti->tile)];
DrawGroundSprite(drss++->image);
@@ -813,9 +813,9 @@ static void DrawTile_Road(TileInfo *ti)
}
}
-void DrawRoadDepotSprite(int x, int y, int image)
+void DrawRoadDepotSprite(int x, int y, DiagDirection dir)
{
- const DrawRoadSeqStruct* dtss = _road_display_datas[image];
+ const DrawRoadSeqStruct* dtss = _road_depot[dir];
uint32 ormod = PLAYER_SPRITE_COLOR(_local_player);
x += 33;
@@ -825,8 +825,8 @@ void DrawRoadDepotSprite(int x, int y, int image)
for (; dtss->image != 0; dtss++) {
Point pt = RemapCoords(dtss->subcoord_x, dtss->subcoord_y, 0);
+ uint32 image = dtss->image;
- image = dtss->image;
if (image & PALETTE_MODIFIER_COLOR) image |= ormod;
DrawSprite(image, x + pt.x, y + pt.y);