From 2d636266f59e8f5e88c3460b9adb8889442108d8 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 30 Oct 2015 17:24:30 +0000 Subject: (svn r27427) -Fix: Use the NewGRF railtype sorting order in the infrastructure window. --- src/rail.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rail.h') diff --git a/src/rail.h b/src/rail.h index 539a162b8..320d24a9a 100644 --- a/src/rail.h +++ b/src/rail.h @@ -431,4 +431,13 @@ void ResetRailTypes(); void InitRailTypes(); RailType AllocateRailType(RailTypeLabel label); +extern RailType _sorted_railtypes[RAILTYPE_END]; +extern uint8 _sorted_railtypes_size; + +/** + * Loop header for iterating over railtypes, sorted by sortorder. + * @param var Railtype. + */ +#define FOR_ALL_SORTED_RAILTYPES(var) for (uint8 index = 0; index < _sorted_railtypes_size && (var = _sorted_railtypes[index], true) ; index++) + #endif /* RAIL_H */ -- cgit v1.2.3-54-g00ecf