summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-08-01 16:31:19 +0000
committerludde <ludde@openttd.org>2005-08-01 16:31:19 +0000
commit29564f9fcfc6e2dffb7afa196dbcabb04c99bee7 (patch)
treedc182cc3e9eea6a1776b7fdc84014ec094051275 /rail_cmd.c
parent91353c841f3adde7f601ab4185e3486a034dbd04 (diff)
downloadopenttd-29564f9fcfc6e2dffb7afa196dbcabb04c99bee7.tar.xz
(svn r2781) Fix some of the issues with variables in .h files.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 8de198392..d8ce3e001 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -26,6 +26,13 @@
extern uint16 _custom_sprites_base;
+const byte _track_sloped_sprites[14] = {
+ 14, 15, 22, 13,
+ 0, 21, 17, 12,
+ 23, 0, 18, 20,
+ 19, 16
+};
+
void ShowTrainDepotWindow(TileIndex tile);
/* Format of rail map5 byte.
@@ -1587,6 +1594,24 @@ void DrawTrainDepotSprite(int x, int y, int image, int railtype)
}
}
+void DrawDefaultWaypointSprite(int x, int y, int railtype)
+{
+ const DrawTrackSeqStruct *dtss = _track_depot_layout_table[4];
+ const RailtypeInfo *rti = GetRailTypeInfo(railtype);
+ uint32 img;
+
+ img = dtss++->image;
+ if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK) + rti->total_offset;
+ DrawSprite(img, x, y);
+
+ for (; dtss->image != 0; dtss++) {
+ Point pt = RemapCoords(dtss->subcoord_x, dtss->subcoord_y, 0);
+ img = dtss->image;
+ if (img & PALETTE_MODIFIER_COLOR) img |= PLAYER_SPRITE_COLOR(_local_player);
+ DrawSprite(img, x + pt.x, y + pt.y);
+ }
+}
+
typedef struct SetSignalsData {
int cur;
int cur_stack;