* Resolve sprites of custom rail types */
| 128 | * Resolve sprites of custom rail types |
| 129 | */ |
| 130 | void InitRailTypes() |
| 131 | { |
| 132 | _sorted_railtypes.clear(); |
| 133 | for (RailTypeInfo &rti : _railtypes) { |
| 134 | RailType rt = rti.Index(); |
| 135 | |
| 136 | ResolveRailTypeGUISprites(&rti); |
| 137 | _railtypes_hidden_mask.Set(rt, rti.flags.Test(RailTypeFlag::Hidden)); |
| 138 | |
| 139 | if (rti.label == 0) continue; |
| 140 | _sorted_railtypes.push_back(rt); |
| 141 | } |
| 142 | std::sort(_sorted_railtypes.begin(), _sorted_railtypes.end(), CompareRailTypes); |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Allocate a new rail type label |
no test coverage detected