#include "IndustryManager.h" #include "CompanyManager.h" #include "Interop/Interop.hpp" #include "OpenLoco.h" using namespace openloco::interop; namespace openloco::industrymgr { static loco_global _industries; std::array& industries() { auto arr = (std::array*)_industries.get(); return *arr; } industry* get(industry_id_t id) { if (id >= _industries.size()) { return nullptr; } return &_industries[id]; } // 0x00453234 void update() { if ((addr<0x00525E28, uint32_t>() & 1) && !isEditorMode()) { companymgr::updatingCompanyId(company_id::neutral); for (auto& industry : industries()) { if (!industry.empty()) { industry.update(); } } } } // 0x0045383B void updateMonthly() { call(0x0045383B); } }