Windows fixes

This commit is contained in:
Jack Andersen 2017-10-29 21:29:32 -10:00
parent 3fcc50d82d
commit 6e73fddcf5
6 changed files with 10 additions and 7 deletions

View File

@ -1129,9 +1129,10 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath,
ch.cmdl = sub.mesh; ch.cmdl = sub.mesh;
if (sub.overlayMeshes.size()) if (sub.overlayMeshes.size())
{ {
hecl::SystemStringView overlaySys(sub.overlayMeshes[0].first);
ch.cmdlOverlay = sub.overlayMeshes[0].second; ch.cmdlOverlay = sub.overlayMeshes[0].second;
ch.cskrOverlay = inPath.ensureAuxInfo(chSysName.sys_str() + _S('.') + ch.cskrOverlay = inPath.ensureAuxInfo(chSysName.sys_str() + _S('.') +
sub.overlayMeshes[0].first + _S(".CSKR")); overlaySys.sys_str() + _S(".CSKR"));
} }
break; break;

View File

@ -383,9 +383,10 @@ void SpecBase::flattenDependencies(const hecl::ProjectPath& path,
pathsOut.push_back(asGlob.ensureAuxInfo(armSysName.sys_str() + _S(".CINF"))); pathsOut.push_back(asGlob.ensureAuxInfo(armSysName.sys_str() + _S(".CINF")));
for (const auto& overlay : sub.overlayMeshes) for (const auto& overlay : sub.overlayMeshes)
{ {
hecl::SystemStringView ovelaySys(overlay.first);
pathsOut.push_back(overlay.second); pathsOut.push_back(overlay.second);
pathsOut.push_back(asGlob.ensureAuxInfo(chSysName.sys_str() + _S('.') + pathsOut.push_back(asGlob.ensureAuxInfo(chSysName.sys_str() + _S('.') +
overlay.first + _S(".CSKR"))); ovelaySys.sys_str() + _S(".CSKR")));
} }
} }
} }
@ -1046,8 +1047,9 @@ bool SpecBase::addFileToIndex(const hecl::ProjectPath& path,
std::vector<std::string> overlayNames = ds.getSubtypeOverlayNames(sub); std::vector<std::string> overlayNames = ds.getSubtypeOverlayNames(sub);
for (const auto& overlay : overlayNames) for (const auto& overlay : overlayNames)
{ {
hecl::SystemStringView overlaySys(overlay);
hecl::ProjectPath subPath = asGlob.ensureAuxInfo(sysStr.sys_str() + _S('.') + hecl::ProjectPath subPath = asGlob.ensureAuxInfo(sysStr.sys_str() + _S('.') +
overlay + _S(".CSKR")); overlaySys.sys_str() + _S(".CSKR"));
urde::SObjectTag pathTag = buildTagFromPath(subPath, m_backgroundBlender); urde::SObjectTag pathTag = buildTagFromPath(subPath, m_backgroundBlender);
m_tagToPath[pathTag] = subPath; m_tagToPath[pathTag] = subPath;
m_pathToTag[subPath.hash()] = pathTag; m_pathToTag[subPath.hash()] = pathTag;

View File

@ -1162,7 +1162,7 @@ struct SpecMP1 : SpecBase
nameEnt.type = worldTag.type; nameEnt.type = worldTag.type;
nameEnt.id = atUint32(worldTag.id.Value()); nameEnt.id = atUint32(worldTag.id.Value());
nameEnt.nameLen = atUint32(hecl::StrLen(parentDir.getLastComponent())); nameEnt.nameLen = atUint32(hecl::StrLen(parentDir.getLastComponent()));
nameEnt.name = parentDir.getLastComponent(); nameEnt.name = parentDir.getLastComponentUTF8();
nameEnt.write(w); nameEnt.write(w);
for (const auto& area : mlvl.areas) for (const auto& area : mlvl.areas)

View File

@ -79,7 +79,7 @@ static const FourCC TypeTable[] =
CFactoryMgr::ETypeTable CFactoryMgr::FourCCToTypeIdx(FourCC fcc) CFactoryMgr::ETypeTable CFactoryMgr::FourCCToTypeIdx(FourCC fcc)
{ {
for (int i=0 ; i<4 ; ++i) for (int i=0 ; i<4 ; ++i)
fcc.getChars()[i] = char(std::toupper(fcc.getChars()[i])); fcc.getChars()[i] = char(toupper(fcc.getChars()[i]));
auto search = std::find_if(std::begin(TypeTable), std::end(TypeTable), auto search = std::find_if(std::begin(TypeTable), std::end(TypeTable),
[fcc](const FourCC& test) { return test == fcc; }); [fcc](const FourCC& test) { return test == fcc; });
if (search == std::end(TypeTable)) if (search == std::end(TypeTable))

2
hecl

@ -1 +1 @@
Subproject commit 30b0ef6851cc25f9912f8ba094ff253f6f389c0b Subproject commit 779aa4da3f3737128f03ad8d7d95837d2af38076

@ -1 +1 @@
Subproject commit 2401875b9a391a3126a5bbfee452bd4db4f3b014 Subproject commit 3cf7aee6175e45e2dd5b45dcf1319ff668afa74d