| 35 | } |
| 36 | |
| 37 | OpenLoco::Town importTown(const S5::Town& src) |
| 38 | { |
| 39 | OpenLoco::Town dst{}; |
| 40 | dst.name = src.name; |
| 41 | dst.x = src.x; |
| 42 | dst.y = src.y; |
| 43 | dst.flags = static_cast<TownFlags>(src.flags); |
| 44 | dst.labelFrame = importLabelFrame(src.labelFrame); |
| 45 | dst.prng = Core::Prng{ src.prng0, src.prng1 }; |
| 46 | dst.population = src.population; |
| 47 | dst.populationCapacity = src.populationCapacity; |
| 48 | dst.numBuildings = src.numBuildings; |
| 49 | std::ranges::copy(src.companyRatings, dst.companyRatings); |
| 50 | dst.companiesWithRating = src.companiesWithRating; |
| 51 | dst.size = static_cast<TownSize>(src.size); |
| 52 | dst.historySize = src.historySize; |
| 53 | std::ranges::copy(src.history, dst.history); |
| 54 | dst.historyMinPopulation = src.historyMinPopulation; |
| 55 | std::ranges::copy(src.amenityCounts, dst.amenityCounts); |
| 56 | std::ranges::copy(src.monthlyCargoDelivered, dst.monthlyCargoDelivered); |
| 57 | dst.cargoInfluenceFlags = src.cargoInfluenceFlags; |
| 58 | std::memcpy(dst.var_19C, src.var_19C, sizeof(dst.var_19C)); |
| 59 | dst.buildSpeed = src.buildSpeed; |
| 60 | dst.numberOfAirports = src.numberOfAirports; |
| 61 | dst.numStations = src.numStations; |
| 62 | dst.var_1A8 = src.var_1A8; |
| 63 | return dst; |
| 64 | } |
| 65 | } |
no test coverage detected