MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateYearly

Function updateYearly

src/OpenLoco/src/World/Company.cpp:476–487  ·  view source on GitHub ↗

0x004312D2

Source from the content-addressed store, hash-verified

474
475 // 0x004312D2
476 void updateYearly(Company& company)
477 {
478 for (auto type = 0U; type < ExpenditureType::Count; ++type)
479 {
480 currency32_t lastExpend = 0;
481 for (auto i = 0U; i < kExpenditureHistoryCapacity; ++i)
482 {
483 std::swap(lastExpend, company.expenditures[i][type]);
484 }
485 }
486 company.numExpenditureYears = std::min<uint8_t>(company.numExpenditureYears + 1, kExpenditureHistoryCapacity);
487 }
488
489 bool Company::isVehicleIndexUnlocked(const uint8_t vehicleIndex) const
490 {

Callers 1

dateTickFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected