summaryrefslogtreecommitdiff
path: root/src/rail.h
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-01-05 19:40:34 +0000
committermichi_cc <michi_cc@openttd.org>2012-01-05 19:40:34 +0000
commitee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d (patch)
tree6801ecd572e6dd07d0b4b045cdcbd1bafea78617 /src/rail.h
parent69e197c87fc23e5492f4b59f8e1ba8757d65c41e (diff)
downloadopenttd-ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d.tar.xz
(svn r23758) -Feature: [NewGRF] Alternate rail type label list.
Diffstat (limited to 'src/rail.h')
-rw-r--r--src/rail.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rail.h b/src/rail.h
index be7a030c5..b8ef0cb12 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -96,6 +96,9 @@ enum RailFenceOffset {
RFO_SLOPE_NW,
};
+/** List of rail type labels. */
+typedef SmallVector<RailTypeLabel, 4> RailTypeLabelList;
+
/**
* This struct contains all the info that is needed to draw and construct tracks.
*/
@@ -209,6 +212,11 @@ struct RailtypeInfo {
RailTypeLabel label;
/**
+ * Rail type labels this type provides in addition to the main label.
+ */
+ RailTypeLabelList alternate_labels;
+
+ /**
* Colour on mini-map
*/
byte map_colour;
@@ -404,7 +412,7 @@ RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date);
RailType GetBestRailtype(const CompanyID company);
RailTypes GetCompanyRailtypes(const CompanyID c);
-RailType GetRailTypeByLabel(RailTypeLabel label);
+RailType GetRailTypeByLabel(RailTypeLabel label, bool allow_alternate_labels = true);
void ResetRailTypes();
void InitRailTypes();