Skip to content

Commit

Permalink
Stupid changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonHaze420 committed Dec 28, 2018
1 parent 00bd87d commit f513fcc
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions model2obj/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShenmueDKSharp;
using ShenmueDKSharp.Files.Models;

namespace model2obj
{
class Program
{
static void ExportMT7(string mt7Filepath, string objFilepath)
{
MT7 mt7 = new MT7(mt7Filepath);
OBJ obj = new OBJ(mt7);
obj.Write(objFilepath);
}
static void ExportMT5(string mt5Filepath, string objFilepath)
{
MT5 mt5 = new MT5(mt5Filepath);
OBJ obj = new OBJ(mt5);
obj.Write(objFilepath);
}

static void Main(string[] args)
{
if (args.Count<string>() < 3 || args[0].Contains("-h") || args[0].Contains("--help") || args[0].Contains("/?"))
Expand All @@ -17,34 +31,10 @@ static void Main(string[] args)
return;
}

bool MT5convert = false, MT7convert = false;

string modelSource;
string modelDestination;

modelSource = args[1];
modelDestination = args[2];
Console.WriteLine("Source: {0}\nDestination: {1}", modelSource, modelDestination);

if((args[0].Contains("--mt5") || args[0].Contains("-mt5")))
MT5convert = true;
ExportMT5(args[1], args[2]);
if ((args[0].Contains("--mt7") || args[0].Contains("-mt7")))
MT7convert = true;

if(MT5convert)
{
MT5 tmpMT5 = new MT5(modelSource);
OBJ tmpOBJ = new OBJ(tmpMT5);

tmpOBJ.Write(modelDestination);
}
else if (MT7convert)
{
MT7 tmpMT7 = new MT7(modelSource);
OBJ tmpOBJ = new OBJ(tmpMT7);

tmpOBJ.Write(modelDestination);
}
ExportMT7(args[1], args[2]);
}
}
}

0 comments on commit f513fcc

Please sign in to comment.