From ed4d7445c737538e1efad12680b180c6e5b2ade5 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 7 Apr 2018 10:55:57 -1000 Subject: [PATCH] More fixes for GameCube cooking --- DataSpec/DNACommon/CMDL.cpp | 6 +-- DataSpec/DNACommon/PAK.cpp | 10 +++++ DataSpec/DNACommon/PAK.hpp | 2 + DataSpec/DNACommon/TXTR.cpp | 10 +++-- DataSpec/DNAMP1/AFSM.hpp | 10 +++++ DataSpec/DNAMP1/CMDLMaterials.cpp | 1 - DataSpec/DNAMP1/CMDLMaterials.hpp | 1 - DataSpec/DNAMP1/MLVL.cpp | 61 ++++++++------------------- DataSpec/DNAMP1/MREA.cpp | 16 ++++++-- DataSpec/DNAMP1/MREA.hpp | 1 + DataSpec/DNAMP1/PAK.cpp | 22 +++++++++- DataSpec/DNAMP1/PAK.hpp | 4 ++ DataSpec/DNAMP3/PAK.cpp | 22 +++++++++- DataSpec/DNAMP3/PAK.hpp | 4 ++ DataSpec/SpecBase.hpp | 3 +- DataSpec/SpecMP1.cpp | 68 +++++++++++++++++++++++++++++-- Editor/ViewManager.cpp | 2 +- NESEmulator/CNESEmulator.hpp | 7 ++++ Runtime/CResFactory.cpp | 14 +++++-- Runtime/CResFactory.hpp | 4 +- hecl | 2 +- hecl-gui | 2 +- 22 files changed, 198 insertions(+), 74 deletions(-) diff --git a/DataSpec/DNACommon/CMDL.cpp b/DataSpec/DNACommon/CMDL.cpp index f85135d54..e07fe00b7 100644 --- a/DataSpec/DNACommon/CMDL.cpp +++ b/DataSpec/DNACommon/CMDL.cpp @@ -1259,8 +1259,7 @@ bool WriteCMDL(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPath matGX.reset(matIR, FE.getDiagnostics()); targetMSet.materials.emplace_back(matGX, mat.iprops, mat.texs, texPaths, - mesh.colorLayerCount, mesh.uvLayerCount, - false, false); + mesh.colorLayerCount, false, false); targetMSet.materials.back().binarySize(endOff); targetMSet.head.addMaterialEndOff(endOff); @@ -1742,8 +1741,7 @@ bool WriteMREASecs(std::vector>& secsOut, const hecl::Proje bool lm = lightmapped != mat.iprops.cend() && lightmapped->second != 0; matSet.materials.emplace_back(matGX, mat.iprops, mat.texs, texPaths, - mesh.colorLayerCount, mesh.uvLayerCount, - lm, false); + mesh.colorLayerCount, lm, false); matSet.materials.back().binarySize(endOff); matSet.head.addMaterialEndOff(endOff); diff --git a/DataSpec/DNACommon/PAK.cpp b/DataSpec/DNACommon/PAK.cpp index ad79e9e75..790dcac1a 100644 --- a/DataSpec/DNACommon/PAK.cpp +++ b/DataSpec/DNACommon/PAK.cpp @@ -775,6 +775,16 @@ void PAKRouter::enumerateResources(const std::function +bool PAKRouter::mreaHasDupeResources(const IDType& id) const +{ + const PAKType* pak = m_pak.get(); + if (!pak) + LogDNACommon.report(logvisor::Fatal, + "PAKRouter::enterPAKBridge() must be called before PAKRouter::mreaHasDupeResources()"); + return pak->mreaHasDupeResources(id); +} + template class PAKRouter; template class PAKRouter; template class PAKRouter; diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index 5247913db..686706dbe 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -232,6 +232,8 @@ public: hecl::ProjectPath getAreaLayerCooked(const IDType& areaId, int layerIdx, bool& activeOut) const; void enumerateResources(const std::function& func); + + bool mreaHasDupeResources(const IDType& id) const; }; } diff --git a/DataSpec/DNACommon/TXTR.cpp b/DataSpec/DNACommon/TXTR.cpp index 74c8ed0b0..a0f54eb0f 100644 --- a/DataSpec/DNACommon/TXTR.cpp +++ b/DataSpec/DNACommon/TXTR.cpp @@ -20,7 +20,7 @@ static int CountBits(uint32_t n) /* Box filter algorithm (for mipmapping) */ static void BoxFilter(const uint8_t* input, unsigned chanCount, - unsigned inWidth, unsigned inHeight, uint8_t* output) + unsigned inWidth, unsigned inHeight, uint8_t* output, bool dxt1) { unsigned mipWidth = 1; unsigned mipHeight = 1; @@ -45,7 +45,9 @@ static void BoxFilter(const uint8_t* input, unsigned chanCount, tmp += input[(in1LineBase+(x*2+1))*chanCount+c]; tmp += input[(in2LineBase+(x*2))*chanCount+c]; tmp += input[(in2LineBase+(x*2+1))*chanCount+c]; - out[c] = tmp / 4; + out[c] = uint8_t(tmp / 4); + if (c == 3 && dxt1) + out[c] = uint8_t(out[c] ? 0xff : 0x0); } } } @@ -1513,7 +1515,7 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat unsigned filterHeight = height; for (size_t i=1 ; i& texPathsIn, std::vector& texPathsOut, int colorCount, - int uvCount, bool lightmapUVs, bool matrixSkinning) { diff --git a/DataSpec/DNAMP1/CMDLMaterials.hpp b/DataSpec/DNAMP1/CMDLMaterials.hpp index e9d2c817e..022126b45 100644 --- a/DataSpec/DNAMP1/CMDLMaterials.hpp +++ b/DataSpec/DNAMP1/CMDLMaterials.hpp @@ -291,7 +291,6 @@ struct MaterialSet : BigDNA const std::vector& texPathsIn, std::vector& texPathsOut, int colorCount, - int uvCount, bool lightmapUVs, bool matrixSkinning); }; diff --git a/DataSpec/DNAMP1/MLVL.cpp b/DataSpec/DNAMP1/MLVL.cpp index 8cacdfed7..0bac66d6a 100644 --- a/DataSpec/DNAMP1/MLVL.cpp +++ b/DataSpec/DNAMP1/MLVL.cpp @@ -51,6 +51,8 @@ bool MLVL::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl: w.enumerate("memrelays", relayIds); w.finish(&fw); } + if (pakRouter.mreaHasDupeResources(area.areaMREAId)) + athena::io::FileWriter(hecl::ProjectPath(areaDir, _S("!duperes")).getAbsolutePath()); areaIdx++; } @@ -60,32 +62,16 @@ bool MLVL::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl: return DNAMLVL::ReadMLVLToBlender(conn, mlvl, outPath, pakRouter, entry, force, fileChanged); } -struct BulkResources -{ - std::unordered_map addedBulkPaths; - bool addBulkPath(const hecl::ProjectPath& path, size_t areaIdx) - { - auto search = addedBulkPaths.find(path.hash()); - if (search == addedBulkPaths.cend()) - { - addedBulkPaths.insert(std::make_pair(path.hash(), areaIdx)); - return true; - } - return false; - } -}; - struct LayerResources { - BulkResources& bulkResources; - std::unordered_map> addedPaths; + std::unordered_set addedPaths; std::vector>> layerPaths; std::unordered_set addedSharedPaths; std::vector> sharedPaths; - LayerResources(BulkResources& bulkResources) : bulkResources(bulkResources) {} void beginLayer() { layerPaths.resize(layerPaths.size() + 1); + addedPaths.clear(); } void addSharedPath(const hecl::ProjectPath& path, bool lazy) { @@ -99,29 +85,12 @@ struct LayerResources void addPath(const hecl::ProjectPath& path, bool lazy) { auto search = addedPaths.find(path.hash()); - if (search != addedPaths.cend()) - { - if (search->second.first == layerPaths.size() - 1) - return; - else - { - auto& toMove = layerPaths[search->second.first][search->second.second]; - addSharedPath(toMove.first, toMove.second); - toMove.first.clear(); - } - } - else + if (search == addedPaths.cend()) { layerPaths.back().emplace_back(path, lazy); - addedPaths.insert(std::make_pair(path.hash(), - std::make_pair(layerPaths.size() - 1, layerPaths.back().size() - 1))); + addedPaths.insert(path.hash()); } } - void addBulkPath(const hecl::ProjectPath& path, size_t areaIdx, bool lazy) - { - if (bulkResources.addBulkPath(path, areaIdx)) - addPath(path, lazy); - } }; bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPath, const World& wld, @@ -144,19 +113,18 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat size_t areaIdx = 0; size_t nameOffset = 0; - BulkResources bulkResources; for (const World::Area& area : wld.areas) { if (area.path.getPathType() != hecl::ProjectPath::Type::Directory) continue; - hecl::ProjectPath areaPath(area.path, _S("/!area.blend")); + hecl::ProjectPath areaPath(area.path, _S("!area.blend")); if (!areaPath.isFile()) continue; Log.report(logvisor::Info, _S("Visiting %s"), area.path.getRelativePath().data()); - hecl::ProjectPath memRelayPath(area.path, _S("/!memoryrelays.yaml")); + hecl::ProjectPath memRelayPath(area.path, _S("!memoryrelays.yaml")); std::vector memRelays; @@ -175,7 +143,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat bool areaInit = false; size_t layerIdx = 0; - LayerResources layerResources(bulkResources); + LayerResources layerResources; for (const hecl::DirectoryEnumerator::Entry& e : dEnum) { hecl::SystemString layerName; @@ -220,7 +188,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat mlvl.areas.emplace_back(); MLVL::Area& areaOut = mlvl.areas.back(); - hecl::ProjectPath namePath(area.path, _S("/!name.yaml")); + hecl::ProjectPath namePath(area.path, _S("!name.yaml")); if (namePath.isFile()) areaOut.areaNameId = namePath; @@ -232,7 +200,7 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat areaOut.areaMREAId = areaPath; areaOut.areaId = 0xffffffff; - hecl::ProjectPath memIdPath(area.path, _S("/!memoryid.yaml")); + hecl::ProjectPath memIdPath(area.path, _S("!memoryid.yaml")); if (memIdPath.isFile()) { athena::io::FileReader fr(memIdPath.getAbsolutePath()); @@ -330,9 +298,9 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat /* Cull duplicate paths and add typed hash to list */ for (const hecl::ProjectPath& path : depPaths) - layerResources.addBulkPath(path, areaIdx, false); + layerResources.addPath(path, false); for (const hecl::ProjectPath& path : lazyPaths) - layerResources.addBulkPath(path, areaIdx, true); + layerResources.addPath(path, true); } hecl::SystemUTF8Conv layerU8(layerName); @@ -347,6 +315,9 @@ bool MLVL::Cook(const hecl::ProjectPath& outPath, const hecl::ProjectPath& inPat ++layerIdx; } + if (!areaInit) + Log.report(logvisor::Info, _S("No layer directories for area %s"), area.path.getRelativePath().data()); + /* Build deplist */ MLVL::Area& areaOut = mlvl.areas.back(); for (const std::vector>& layer : layerResources.layerPaths) diff --git a/DataSpec/DNAMP1/MREA.cpp b/DataSpec/DNAMP1/MREA.cpp index 3579e7834..917585120 100644 --- a/DataSpec/DNAMP1/MREA.cpp +++ b/DataSpec/DNAMP1/MREA.cpp @@ -423,6 +423,7 @@ bool MREA::Cook(const hecl::ProjectPath& outPath, const ColMesh& cMesh, const std::vector& lights, hecl::blender::Token& btok, + const hecl::blender::Matrix4f* xf, bool pc) { /* Discover area layers */ @@ -450,9 +451,18 @@ bool MREA::Cook(const hecl::ProjectPath& outPath, Header head = {}; head.magic = 0xDEADBEEF; head.version = pc ? 0x1000F : 0xF; - head.localToWorldMtx[0].vec[0] = 1.f; - head.localToWorldMtx[1].vec[1] = 1.f; - head.localToWorldMtx[2].vec[2] = 1.f; + if (xf) + { + head.localToWorldMtx[0] = xf->val[0]; + head.localToWorldMtx[1] = xf->val[1]; + head.localToWorldMtx[2] = xf->val[2]; + } + else + { + head.localToWorldMtx[0].vec[0] = 1.f; + head.localToWorldMtx[1].vec[1] = 1.f; + head.localToWorldMtx[2].vec[2] = 1.f; + } head.meshCount = meshes.size(); head.geomSecIdx = 0; head.arotSecIdx = secCount++; diff --git a/DataSpec/DNAMP1/MREA.hpp b/DataSpec/DNAMP1/MREA.hpp index 6b5e5b630..6e875b5ac 100644 --- a/DataSpec/DNAMP1/MREA.hpp +++ b/DataSpec/DNAMP1/MREA.hpp @@ -131,6 +131,7 @@ struct MREA const ColMesh& cMesh, const std::vector& lights, hecl::blender::Token& btok, + const hecl::blender::Matrix4f* xf, bool pc); }; diff --git a/DataSpec/DNAMP1/PAK.cpp b/DataSpec/DNAMP1/PAK.cpp index 731e49273..f1a165a2d 100644 --- a/DataSpec/DNAMP1/PAK.cpp +++ b/DataSpec/DNAMP1/PAK.cpp @@ -28,10 +28,16 @@ void PAK::Enumerate(typename Read::StreamT& reader) m_entries.reserve(count); m_firstEntries.clear(); m_firstEntries.reserve(count); + std::vector entries; + entries.reserve(count); for (atUint32 e=0 ; e(typename Read::StreamT& reader) m_firstEntries.push_back(entry.id); m_entries[entry.id] = std::move(entry); } + else + { + /* Find next MREA to record which area has dupes */ + for (atUint32 e2=e+1 ; e2 m_entries; std::vector m_firstEntries; std::unordered_map m_nameMap; + std::unordered_set m_dupeMREAs; const Entry* lookupEntry(const UniqueID32& id) const; const Entry* lookupEntry(std::string_view name) const; std::string bestEntryName(const Entry& entry, bool& named) const; + bool mreaHasDupeResources(const UniqueID32& id) const + { return m_dupeMREAs.find(id) != m_dupeMREAs.cend(); } + using IDType = UniqueID32; }; diff --git a/DataSpec/DNAMP3/PAK.cpp b/DataSpec/DNAMP3/PAK.cpp index b5e1caba0..41402a91a 100644 --- a/DataSpec/DNAMP3/PAK.cpp +++ b/DataSpec/DNAMP3/PAK.cpp @@ -36,10 +36,16 @@ void PAK::Enumerate(athena::io::IStreamReader& reader) m_entries.reserve(count); m_firstEntries.clear(); m_firstEntries.reserve(count); + std::vector entries; + entries.reserve(count); for (atUint32 e=0 ; e(athena::io::IStreamReader& reader) m_firstEntries.push_back(entry.id); m_entries[entry.id] = std::move(entry); } + else + { + /* Find next MREA to record which area has dupes */ + for (atUint32 e2=e+1 ; e2 m_entries; std::vector m_firstEntries; std::unordered_map m_nameMap; + std::unordered_set m_dupeMREAs; AT_DECL_EXPLICIT_DNA @@ -65,6 +66,9 @@ struct PAK : BigDNA const Entry* lookupEntry(std::string_view name) const; std::string bestEntryName(const Entry& entry, bool& named) const; + bool mreaHasDupeResources(const UniqueID64& id) const + { return m_dupeMREAs.find(id) != m_dupeMREAs.cend(); } + typedef UniqueID64 IDType; }; diff --git a/DataSpec/SpecBase.hpp b/DataSpec/SpecBase.hpp index c783a3e91..b0e304b0b 100644 --- a/DataSpec/SpecBase.hpp +++ b/DataSpec/SpecBase.hpp @@ -201,7 +201,7 @@ protected: std::unordered_map m_catalogNameToTag; std::unordered_map> m_catalogTagToNames; void clearTagCache(); - + hecl::blender::Token m_backgroundBlender; std::thread m_backgroundIndexTh; std::mutex m_backgroundIndexMutex; @@ -231,7 +231,6 @@ protected: athena::io::FileWriter& pakOut, const std::unordered_map>& mlvlData); -protected: std::unique_ptr m_disc; bool m_isWii; bool m_standalone; diff --git a/DataSpec/SpecMP1.cpp b/DataSpec/SpecMP1.cpp index 0a04e7a1b..3832f5394 100644 --- a/DataSpec/SpecMP1.cpp +++ b/DataSpec/SpecMP1.cpp @@ -18,6 +18,7 @@ #include "DNAMP1/MAPA.hpp" #include "DNAMP1/PATH.hpp" #include "DNAMP1/FRME.hpp" +#include "DNAMP1/AFSM.hpp" #include "DNACommon/ATBL.hpp" #include "DNACommon/FONT.hpp" #include "DNACommon/PART.hpp" @@ -179,6 +180,8 @@ struct SpecMP1 : SpecBase IDRestorer m_idRestorer; + std::unordered_map m_mreaPathToXF; + void setThreadProject() { SpecBase::setThreadProject(); @@ -525,6 +528,8 @@ struct SpecMP1 : SpecBase return true; else if (!strcmp(classType, "ATBL")) return true; + else if (!strcmp(classType, DNAMP1::AFSM::DNAType())) + return true; else if (!strcmp(classType, "MP1OriginalIDs")) return true; return false; @@ -721,6 +726,11 @@ struct SpecMP1 : SpecBase resTag.type = SBIG('ATBL'); return true; } + else if (!strcmp(className, DataSpec::DNAMP1::AFSM::DNAType())) + { + resTag.type = SBIG('AFSM'); + return true; + } else if (!strcmp(className, "MP1OriginalIDs")) { resTag.type = SBIG('OIDS'); @@ -821,6 +831,34 @@ struct SpecMP1 : SpecBase } } + void buildAreaXFs(hecl::blender::Token& btok) + { + hecl::blender::Connection& conn = btok.getBlenderConnection(); + for (const auto& ent : m_workPath.enumerateDir()) + { + if (ent.m_isDir) + { + hecl::ProjectPath pakPath(m_workPath, ent.m_name); + for (const auto& ent2 : pakPath.enumerateDir()) + { + if (ent2.m_isDir) + { + hecl::ProjectPath wldPath(pakPath, ent2.m_name + _S("/!world.blend")); + if (wldPath.isFile()) + { + if (!conn.openBlend(wldPath)) + continue; + hecl::blender::DataStream ds = conn.beginData(); + hecl::blender::World world = ds.compileWorld(); + for (const auto& area : world.areas) + m_mreaPathToXF[area.path.hash()] = area.transform; + } + } + } + } + } + } + void cookArea(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, hecl::blender::Token& btok, FCookProgress progress) { @@ -851,7 +889,14 @@ struct SpecMP1 : SpecBase ds.close(); - DNAMP1::MREA::Cook(out, in, meshCompiles, *colMesh, lights, btok, m_pc); + if (m_mreaPathToXF.empty()) + buildAreaXFs(btok); + + const hecl::blender::Matrix4f* xf = nullptr; + auto xfSearch = m_mreaPathToXF.find(in.getParentPath().hash()); + if (xfSearch != m_mreaPathToXF.cend()) + xf = &xfSearch->second; + DNAMP1::MREA::Cook(out, in, meshCompiles, *colMesh, lights, btok, xf, m_pc); } void cookWorld(const hecl::ProjectPath& out, const hecl::ProjectPath& in, BlendStream& ds, bool fast, @@ -1073,6 +1118,10 @@ struct SpecMP1 : SpecBase { DNAAudio::ATBL::Cook(in, out); } + else if (!classStr.compare(DNAMP1::AFSM::DNAType())) + { + DNAMP1::AFSM::Cook(in, out); + } else if (!classStr.compare("MP1OriginalIDs")) { OriginalIDs::Cook(in, out); @@ -1229,14 +1278,27 @@ struct SpecMP1 : SpecBase nameEnt.name = parentDir.getLastComponentUTF8(); nameEnt.write(w); + std::unordered_set addedTags; for (auto& area : mlvl.areas) { + urde::SObjectTag areaTag(FOURCC('MREA'), originalToNew(area.areaMREAId)); + + bool dupeRes = false; + if (hecl::ProjectPath areaDir = pathFromTag(areaTag).getParentPath()) + dupeRes = hecl::ProjectPath(areaDir, _S("!duperes")).isFile(); + urde::SObjectTag nameTag(FOURCC('STRG'), originalToNew(area.areaNameId)); if (nameTag) listOut.push_back(nameTag); for (const auto& dep : area.deps) - listOut.push_back({dep.type, originalToNew(dep.id)}); - urde::SObjectTag areaTag(FOURCC('MREA'), originalToNew(area.areaMREAId)); + { + urde::CAssetId newId = originalToNew(dep.id); + if (dupeRes || addedTags.find(newId) == addedTags.end()) + { + listOut.push_back({dep.type, newId}); + addedTags.insert(newId); + } + } if (areaTag) listOut.push_back(areaTag); diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index bec8b867e..3a2b34721 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -237,7 +237,7 @@ void ViewManager::init(boo::IApplication* app) { hecl::SystemString rootPath(root.getAbsolutePath()); hecl::Sstat theStat; - if (!hecl::Stat((rootPath + _S("/out/MP1/!original_ids.upak")).c_str(), &theStat) && + if (!hecl::Stat((rootPath + _S("/out/files/Metroid1.upak")).c_str(), &theStat) && S_ISREG(theStat.st_mode)) m_deferedProject = rootPath + _S("/out"); } diff --git a/NESEmulator/CNESEmulator.hpp b/NESEmulator/CNESEmulator.hpp index 419e3be12..1b3bb4b2d 100644 --- a/NESEmulator/CNESEmulator.hpp +++ b/NESEmulator/CNESEmulator.hpp @@ -57,6 +57,13 @@ private: size_t m_posInBuf = 0; boo::ObjToken m_booVoice; + //void* x4_loadBuf; + //void* x8_rom; + //void* xc_state; + //OSModuleInfo* x10_module = x4_loadBuf; + //void* x14_bss; + //void* x18_prgram; + //void* x1c_wram; bool x20_gameOver = false; u8 x21_passwordFromNES[18]; EPasswordEntryState x34_passwordEntryState = EPasswordEntryState::NotPasswordScreen; diff --git a/Runtime/CResFactory.cpp b/Runtime/CResFactory.cpp index 3b3017620..295c438c7 100644 --- a/Runtime/CResFactory.cpp +++ b/Runtime/CResFactory.cpp @@ -117,21 +117,29 @@ void CResFactory::CancelBuild(const SObjectTag& tag) void CResFactory::LoadOriginalIDs(CSimplePool& sp) { - //m_origIds = sp.GetObj("MP1OriginalIDs"); +#if RUNTIME_ORIGINAL_IDS + m_origIds = sp.GetObj("MP1OriginalIDs"); +#endif } CAssetId CResFactory::TranslateOriginalToNew(CAssetId id) const { +#if RUNTIME_ORIGINAL_IDS + return m_origIds->TranslateOriginalToNew(id); +#else /* The packager will have restored these ahead of time */ return id; - //return m_origIds->TranslateOriginalToNew(id); +#endif } CAssetId CResFactory::TranslateNewToOriginal(CAssetId id) const { +#if RUNTIME_ORIGINAL_IDS + return m_origIds->TranslateNewToOriginal(id); +#else /* The packager will have restored these ahead of time */ return id; - //return m_origIds->TranslateNewToOriginal(id); +#endif } } diff --git a/Runtime/CResFactory.hpp b/Runtime/CResFactory.hpp index bbd56bc2c..7de49183f 100644 --- a/Runtime/CResFactory.hpp +++ b/Runtime/CResFactory.hpp @@ -17,7 +17,9 @@ class CResFactory : public IFactory { CResLoader x4_loader; CFactoryMgr x5c_factoryMgr; - //TLockedToken m_origIds; +#if RUNTIME_ORIGINAL_IDS + TLockedToken m_origIds; +#endif public: struct SLoadingData diff --git a/hecl b/hecl index b0fa3912c..9120c838d 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit b0fa3912c5cced6d60f0bca7e7c48568038d176c +Subproject commit 9120c838d48a0660501949c92a6ca47668637096 diff --git a/hecl-gui b/hecl-gui index 3aa75f7ae..b254cb380 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 3aa75f7ae8a271fd03a47939066f2bbd0f956e16 +Subproject commit b254cb3803425f79020899ceda2424b46648355a