diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2020-12-22 08:53:36 -0500 |
|---|---|---|
| committer | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2020-12-22 08:53:36 -0500 |
| commit | 5c55bebde211a779efa654e8b097413bfd1fb3bd (patch) | |
| tree | cfee83a54ff53a7ac6a5bbe2d44366e40d2d2790 /ZAP2/Main.cpp | |
| parent | f8257aebcdb0db19ef063f23d715dd0acff26fba (diff) | |
Added assimp library. Work on adding in FBX support. Fixed some matching issues.
Diffstat (limited to 'ZAP2/Main.cpp')
| -rw-r--r-- | ZAP2/Main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ZAP2/Main.cpp b/ZAP2/Main.cpp index efb1bea..ecdb476 100644 --- a/ZAP2/Main.cpp +++ b/ZAP2/Main.cpp @@ -265,8 +265,13 @@ void BuildAssetTexture(string pngFilePath, TextureType texType, string outPath) vector<string> split = StringHelper::Split(outPath, "/"); string name = StringHelper::Split(split[split.size() - 1], ".")[0]; ZTexture* tex = ZTexture::FromPNG(pngFilePath, texType); + string cfgPath = StringHelper::Split(pngFilePath, ".")[0] + ".cfg"; - string src = StringHelper::Sprintf("u64 %s[] = \n{\n", name.c_str()) + tex->GetSourceOutputCode(name) + "};\n"; + if (File::Exists(cfgPath)) + name = File::ReadAllText(cfgPath); + + //string src = StringHelper::Sprintf("u64 %s[] = \n{\n", name.c_str()) + tex->GetSourceOutputCode(name) + "};\n"; + string src = tex->GetSourceOutputCode(name); File::WriteAllText(outPath, src); @@ -279,7 +284,8 @@ void BuildAssetBlob(string blobFilePath, string outPath) ZBlob* blob = ZBlob::FromFile(blobFilePath); string name = StringHelper::Split(split[split.size() - 1], ".")[0]; - string src = StringHelper::Sprintf("u8 %s[] = \n{\n", name.c_str()) + blob->GetSourceOutputCode(name) + "};\n"; + //string src = StringHelper::Sprintf("u8 %s[] = \n{\n", name.c_str()) + blob->GetSourceOutputCode(name) + "};\n"; + string src = blob->GetSourceOutputCode(name); File::WriteAllText(outPath, src); |
