| 167 | } |
| 168 | |
| 169 | S5::Company importCompanyType2(const S5::CompanyType2& src) |
| 170 | { |
| 171 | S5::Company dst{}; |
| 172 | dst.name = src.name; |
| 173 | dst.ownerName = src.ownerName; |
| 174 | dst.challengeFlags = src.challengeFlags; |
| 175 | dst.cash = src.cash; |
| 176 | dst.currentLoan = src.currentLoan; |
| 177 | dst.updateCounter = src.updateCounter; |
| 178 | dst.performanceIndex = src.performanceIndex; |
| 179 | dst.competitorId = src.competitorId; |
| 180 | dst.ownerEmotion = src.ownerEmotion; |
| 181 | dst.mainColours[0] = src.mainColours[0]; |
| 182 | dst.mainColours[1] = src.mainColours[1]; |
| 183 | for (auto i = 0U; i < std::size(src.vehicleColours); ++i) |
| 184 | { |
| 185 | dst.vehicleColours[i][0] = src.vehicleColours[i][0]; |
| 186 | dst.vehicleColours[i][1] = src.vehicleColours[i][1]; |
| 187 | } |
| 188 | dst.customVehicleColoursSet = src.customVehicleColoursSet; |
| 189 | std::ranges::copy(src.unlockedVehicles, dst.unlockedVehicles); |
| 190 | dst.availableVehicles = src.availableVehicles; |
| 191 | dst.aiPlaystyleFlags = src.aiPlaystyleFlags; |
| 192 | dst.aiPlaystyleTownId = src.aiPlaystyleTownId; |
| 193 | dst.numExpenditureYears = src.numExpenditureYears; |
| 194 | std::memcpy(dst.expenditures, src.expenditures, kExpenditureHistoryCapacity * ExpenditureType::Count * sizeof(currency32_t)); |
| 195 | dst.startedDate = src.startedDate; |
| 196 | dst.var_49C = src.var_49C; |
| 197 | dst.var_4A0 = src.var_4A0; |
| 198 | dst.var_4A4 = src.var_4A4; |
| 199 | dst.var_4A5 = src.var_4A5; |
| 200 | dst.var_4A6 = src.var_4A6; |
| 201 | dst.var_4A7 = src.var_4A7; |
| 202 | |
| 203 | std::ranges::copy(src.aiThoughts, dst.aiThoughts); |
| 204 | |
| 205 | dst.activeThoughtId = src.activeThoughtId; |
| 206 | dst.headquartersZ = src.headquartersZ; |
| 207 | dst.headquartersX = src.headquartersX; |
| 208 | dst.headquartersY = src.headquartersY; |
| 209 | dst.activeThoughtRevenueEstimate = src.activeThoughtRevenueEstimate; |
| 210 | dst.var_2582 = src.var_2582; |
| 211 | dst.var_2596 = src.var_2596; |
| 212 | dst.var_259A = src.var_259A; |
| 213 | dst.var_259B = src.var_259B; |
| 214 | dst.var_259C = src.var_259C; |
| 215 | dst.aiPlaceVehicleIndex = src.aiPlaceVehicleIndex; |
| 216 | dst.var_25BE = src.var_25BE; |
| 217 | dst.currentRating = src.currentRating; |
| 218 | |
| 219 | // Copy hash table |
| 220 | for (auto i = 0U; i < std::size(src.var_25C0); ++i) |
| 221 | { |
| 222 | dst.var_25C0[i].var_00 = src.var_25C0[i].var_00; |
| 223 | dst.var_25C0[i].var_02 = src.var_25C0[i].var_02; |
| 224 | dst.var_25C0[i].var_04 = src.var_25C0[i].var_04; |
| 225 | dst.var_25C0[i].var_05 = src.var_25C0[i].var_05; |
| 226 | } |
no outgoing calls
no test coverage detected