#include "MP1OriginalIDs.hpp" #include "CToken.hpp" namespace urde { MP1OriginalIDs::MP1OriginalIDs(CInputStream& in) { u32 count = in.readUint32Big(); m_origToNew.reserve(count); for (u32 i=0 ; isecond; } CAssetId MP1OriginalIDs::TranslateNewToOriginal(CAssetId id) const { auto search = rstl::binary_find(m_newToOrig.cbegin(), m_newToOrig.cend(), id, [](const auto& id) { return id.first; }); if (search == m_newToOrig.cend()) return {}; return search->second; } CFactoryFnReturn FMP1OriginalIDsFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& param, CObjectReference* selfRef) { return TToken::GetIObjObjectFor(std::make_unique(in)); } }