summaryrefslogtreecommitdiff
path: root/rail.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-10-19 08:34:37 +0000
committercelestar <celestar@openttd.org>2005-10-19 08:34:37 +0000
commit5f604ec63a2a603d8c008210ac69760a5f552826 (patch)
tree50fb0bab688d59ca14bf9929118d8dce34567527 /rail.h
parent758ae7e8f63edbcc193443963e7a8cbe7dcac675 (diff)
downloadopenttd-5f604ec63a2a603d8c008210ac69760a5f552826.tar.xz
(svn r3065) -Codechange/Add: Modified the bridge drawing code so that the basic offset is read from the RailTypeInfo struct. This is (hopefully) the last DrawTile change on the way to electrified railways. While being at it, de-mystified the function a bit and added some asserts.
Diffstat (limited to 'rail.h')
-rw-r--r--rail.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/rail.h b/rail.h
index 8632fe368..96203e5ab 100644
--- a/rail.h
+++ b/rail.h
@@ -201,6 +201,11 @@ typedef struct RailtypeInfo {
* @note: Something more flexible might be desirable in the future.
*/
SpriteID total_offset;
+
+ /**
+ * Bridge offset
+ */
+ SpriteID bridge_offset;
} RailtypeInfo;
extern const RailtypeInfo _railtypes[RAILTYPE_END];
@@ -592,5 +597,5 @@ static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
void DrawTrackBits(TileInfo *ti, TrackBits track, bool earth, bool snow, bool flat);
void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
-
#endif /* RAIL_H */
+