summaryrefslogtreecommitdiff
path: root/ZAPD/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD/Main.cpp')
-rw-r--r--ZAPD/Main.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/ZAPD/Main.cpp b/ZAPD/Main.cpp
index 4728c7a..54ea447 100644
--- a/ZAPD/Main.cpp
+++ b/ZAPD/Main.cpp
@@ -27,8 +27,7 @@
using namespace tinyxml2;
-bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath,
- ZFileMode fileMode);
+bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, ZFileMode fileMode);
void BuildAssetTexture(const fs::path& pngFilePath, TextureType texType, const fs::path& outPath);
void BuildAssetBackground(const fs::path& imageFilePath, const fs::path& outPath);
@@ -249,8 +248,8 @@ int main(int argc, char* argv[])
if (fileMode == ZFileMode::Extract || fileMode == ZFileMode::BuildSourceFile)
{
- bool parseSuccessful = Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath,
- Globals::Instance->outputPath, fileMode);
+ bool parseSuccessful =
+ Parse(Globals::Instance->inputPath, Globals::Instance->baseRomPath, fileMode);
if (!parseSuccessful)
return 1;
@@ -292,8 +291,7 @@ int main(int argc, char* argv[])
return 0;
}
-bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path& outPath,
- ZFileMode fileMode)
+bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, ZFileMode fileMode)
{
XMLDocument doc;
XMLError eResult = doc.LoadFile(xmlFilePath.string().c_str());
@@ -317,7 +315,7 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path
{
if (std::string(child->Name()) == "File")
{
- ZFile* file = new ZFile(fileMode, child, basePath, outPath, "", xmlFilePath, false);
+ ZFile* file = new ZFile(fileMode, child, basePath, "", xmlFilePath, false);
Globals::Instance->files.push_back(file);
}
else
@@ -332,9 +330,9 @@ bool Parse(const fs::path& xmlFilePath, const fs::path& basePath, const fs::path
for (ZFile* file : Globals::Instance->files)
{
if (fileMode == ZFileMode::BuildSourceFile)
- file->BuildSourceFile(outPath);
+ file->BuildSourceFile();
else
- file->ExtractResources(outPath);
+ file->ExtractResources();
}
// All done, free files
@@ -397,7 +395,7 @@ void BuildAssetModelIntermediette(const fs::path& outPath)
void BuildAssetAnimationIntermediette(const fs::path& animPath, const fs::path& outPath)
{
std::vector<std::string> split = StringHelper::Split(outPath.string(), "/");
- ZFile* file = new ZFile("", split[split.size() - 2]);
+ ZFile* file = new ZFile(split[split.size() - 2]);
HLAnimationIntermediette* anim = HLAnimationIntermediette::FromXML(animPath.string());
ZAnimation* zAnim = anim->ToZAnimation();
zAnim->SetName(Path::GetFileNameWithoutExtension(split[split.size() - 1]));