summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2023-04-30 21:23:26 -0400
committerGitHub <noreply@github.com>2023-04-30 21:23:26 -0400
commit0e6ab4ab9f9a7bf3f5d52407db4873f0d35697e4 (patch)
treee82b20f2c6e2f1e38efcf5a6bc62c5794f6087b7
parent35d6c0c852722b0edb063cb9a8ad74de22bd2524 (diff)
Fixed issue with include paths on Windows (#284)
-rw-r--r--ZAPD/ZArray.cpp2
-rw-r--r--ZAPD/ZFile.cpp4
-rw-r--r--ZAPD/ZTexture.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/ZAPD/ZArray.cpp b/ZAPD/ZArray.cpp
index 0a9797b..28d35f3 100644
--- a/ZAPD/ZArray.cpp
+++ b/ZAPD/ZArray.cpp
@@ -75,7 +75,7 @@ Declaration* ZArray::DeclareVar(const std::string& prefix, const std::string& bo
if (res->IsExternalResource())
{
auto filepath = Globals::Instance->outputPath / name;
- std::string includePath = StringHelper::Sprintf("%s.%s.inc", filepath.c_str(),
+ std::string includePath = StringHelper::Sprintf("%s.%s.inc", filepath.string().c_str(),
res->GetExternalExtension().c_str());
decl = parent->AddDeclarationIncludeArray(rawDataIndex, includePath, GetRawDataSize(),
GetSourceTypeName(), name, arrayCnt);
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp
index ad56f98..f6f64c4 100644
--- a/ZAPD/ZFile.cpp
+++ b/ZAPD/ZFile.cpp
@@ -816,7 +816,7 @@ void ZFile::GenerateSourceHeaderFiles()
std::string ZFile::GetHeaderInclude() const
{
std::string headers = StringHelper::Sprintf("#include \"%s.h\"\n",
- (outName.parent_path() / outName.stem()).c_str());
+ (outName.parent_path() / outName.stem()).string().c_str());
return headers;
}
@@ -850,7 +850,7 @@ std::string ZFile::GetExternalFileHeaderInclude() const
}
externalFilesIncludes +=
- StringHelper::Sprintf("#include \"%s.h\"\n", outputFolderPath.c_str());
+ StringHelper::Sprintf("#include \"%s.h\"\n", outputFolderPath.string().c_str());
}
}
diff --git a/ZAPD/ZTexture.cpp b/ZAPD/ZTexture.cpp
index 74b7c7d..43b4ffd 100644
--- a/ZAPD/ZTexture.cpp
+++ b/ZAPD/ZTexture.cpp
@@ -771,9 +771,9 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix,
if (dWordAligned)
incStr =
- StringHelper::Sprintf("%s.%s.inc.c", filepath.c_str(), GetExternalExtension().c_str());
+ StringHelper::Sprintf("%s.%s.inc.c", filepath.string().c_str(), GetExternalExtension().c_str());
else
- incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", filepath.c_str(),
+ incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", filepath.string().c_str(),
GetExternalExtension().c_str());
if (!Globals::Instance->cfg.texturePool.empty())
@@ -785,10 +785,10 @@ Declaration* ZTexture::DeclareVar(const std::string& prefix,
if (poolEntry != Globals::Instance->cfg.texturePool.end())
{
if (dWordAligned)
- incStr = StringHelper::Sprintf("%s.%s.inc.c", poolEntry->second.path.c_str(),
+ incStr = StringHelper::Sprintf("%s.%s.inc.c", poolEntry->second.path.string().c_str(),
GetExternalExtension().c_str());
else
- incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", poolEntry->second.path.c_str(),
+ incStr = StringHelper::Sprintf("%s.u32.%s.inc.c", poolEntry->second.path.string().c_str(),
GetExternalExtension().c_str());
}
}