| 5 | namespace OpenLoco::S5 |
| 6 | { |
| 7 | S5::Town exportTown(const OpenLoco::Town& src) |
| 8 | { |
| 9 | S5::Town dst{}; |
| 10 | dst.name = src.name; |
| 11 | dst.x = src.x; |
| 12 | dst.y = src.y; |
| 13 | dst.flags = enumValue(src.flags); |
| 14 | dst.labelFrame = exportLabelFrame(src.labelFrame); |
| 15 | dst.prng0 = src.prng.srand_0(); |
| 16 | dst.prng1 = src.prng.srand_1(); |
| 17 | dst.population = src.population; |
| 18 | dst.populationCapacity = src.populationCapacity; |
| 19 | dst.numBuildings = src.numBuildings; |
| 20 | std::ranges::copy(src.companyRatings, dst.companyRatings); |
| 21 | dst.companiesWithRating = src.companiesWithRating; |
| 22 | dst.size = enumValue(src.size); |
| 23 | dst.historySize = src.historySize; |
| 24 | std::ranges::copy(src.history, dst.history); |
| 25 | dst.historyMinPopulation = src.historyMinPopulation; |
| 26 | std::ranges::copy(src.amenityCounts, dst.amenityCounts); |
| 27 | std::ranges::copy(src.monthlyCargoDelivered, dst.monthlyCargoDelivered); |
| 28 | dst.cargoInfluenceFlags = src.cargoInfluenceFlags; |
| 29 | std::memcpy(dst.var_19C, src.var_19C, sizeof(dst.var_19C)); |
| 30 | dst.buildSpeed = src.buildSpeed; |
| 31 | dst.numberOfAirports = src.numberOfAirports; |
| 32 | dst.numStations = src.numStations; |
| 33 | dst.var_1A8 = src.var_1A8; |
| 34 | return dst; |
| 35 | } |
| 36 | |
| 37 | OpenLoco::Town importTown(const S5::Town& src) |
| 38 | { |
no test coverage detected