| 131 | ENGSChunkHandler() : ChunkHandler('ENGS', CH_READONLY) {} |
| 132 | |
| 133 | void Load() const override |
| 134 | { |
| 135 | /* Load old separate String ID list into a temporary array. This |
| 136 | * was always 256 entries. */ |
| 137 | TypedIndexContainer<std::array<StringID, 256>, EngineID> names{}; |
| 138 | |
| 139 | SlCopy(names.data(), std::size(names), SLE_STRINGID); |
| 140 | |
| 141 | /* Copy each string into the temporary engine array. */ |
| 142 | for (EngineID engine = EngineID::Begin(); engine < std::size(names); ++engine) { |
| 143 | Engine *e = GetTempDataEngine(engine); |
| 144 | e->name = CopyFromOldName(names[engine]); |
| 145 | } |
| 146 | } |
| 147 | }; |
| 148 | |
| 149 | /** Save and load the mapping between the engine id in the pool, and the grf file it came from. */ |
nothing calls this directly
no test coverage detected