(svn r27427) -Fix: Use the NewGRF railtype sorting order in the infrastructure window.

This commit is contained in:
frosch
2015-10-30 17:24:30 +00:00
parent 0f8f738942
commit ade25fff71
4 changed files with 36 additions and 17 deletions

View File

@@ -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 */