diff options
author | michi_cc <michi_cc@openttd.org> | 2012-01-05 19:40:34 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2012-01-05 19:40:34 +0000 |
commit | ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d (patch) | |
tree | 6801ecd572e6dd07d0b4b045cdcbd1bafea78617 /src/rail.h | |
parent | 69e197c87fc23e5492f4b59f8e1ba8757d65c41e (diff) | |
download | openttd-ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d.tar.xz |
(svn r23758) -Feature: [NewGRF] Alternate rail type label list.
Diffstat (limited to 'src/rail.h')
-rw-r--r-- | src/rail.h | 10 |
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(); |