Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/LemonHaze420/wudecon
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonHaze420 committed Jan 3, 2019
2 parents b8526c4 + c6ca6f4 commit 9c180c7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 35 deletions.
2 changes: 1 addition & 1 deletion ShenmueDKSharp
74 changes: 40 additions & 34 deletions wudecon/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ static void ExportMT7(string path, string objFilepath)
foreach (string file in myFiles)
{
var currentChildDir = objFilepath + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\" + Path.ChangeExtension(filename, ".obj");
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

string dest = currentChildDir + "\\" + Path.GetFileName(file) + ".OBJ";

try
{
if(bVerbose)
Expand Down Expand Up @@ -104,10 +105,11 @@ static void ExportMT5(string path, string objFilepath)
foreach (string file in myFiles)
{
var currentChildDir = objFilepath + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\" + Path.GetFileName(file) + ".OBJ";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\" + Path.ChangeExtension(filename, ".obj");
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down Expand Up @@ -172,17 +174,16 @@ static void ExtractPKF(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

string dest = currentChildDir + "\\";
try
{
PKF pkf = new PKF(file);

dest+= "\\_" + Path.GetFileName(file) + "_\\";
Directory.CreateDirectory(dest);

if (bVerbose)
Console.WriteLine("Unpacking {0} to {1}", file, dest);

Expand Down Expand Up @@ -236,10 +237,11 @@ static void ExtractPKS(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down Expand Up @@ -296,10 +298,11 @@ static void ExtractSPR(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down Expand Up @@ -358,10 +361,11 @@ static void ExtractIPAC(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down Expand Up @@ -419,10 +423,11 @@ static void ExtractGZ(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down Expand Up @@ -482,10 +487,11 @@ static void ExtractAFS(string path, string folder)
foreach (string file in myFiles)
{
var currentChildDir = folder + "\\" + Path.GetDirectoryName(file.Replace(path, ""));
if (!Directory.Exists(currentChildDir))
Directory.CreateDirectory(currentChildDir);

string dest = currentChildDir + "\\";
string filename = Path.GetFileName(file);
string dest = currentChildDir + "\\_" + filename + "_\\";
string dir = Path.GetDirectoryName(dest);
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);

try
{
Expand Down

0 comments on commit 9c180c7

Please sign in to comment.