Skip to content

Commit

Permalink
[ADD] test convert
Browse files Browse the repository at this point in the history
  • Loading branch information
ktx-mega committed Jan 5, 2024
1 parent b584ee0 commit e5b31b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 4 additions & 13 deletions CodeWalker.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
using CodeWalker.GameFiles;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Numerics;

namespace CodeWalker.Console
{
internal class Program
{

const string USAGE =
#region USAGE
@"Usage:
cw_cli source output
";
#endregion

private static void Main(string[] args)
{
try
{
YdtFile file = XmlYtd.GetYtd("", "");
string content = File.ReadAllText(args[1]);
YtdFile file = XmlYtd.GetYtd(content, "");
byte[] outputBytes = file.Save();
File.WriteAllBytes(args[2], outputBytes);
Environment.ExitCode = 0;
}
catch (ConsoleArgumentException)
Expand Down
2 changes: 2 additions & 0 deletions CodeWalker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ Global
{F5A776B0-2F1A-4C36-87B3-86206AC4B439}.Release|x64.Build.0 = Release|Any CPU
{F5A776B0-2F1A-4C36-87B3-86206AC4B439}.Release|x86.ActiveCfg = Release|Any CPU
{F5A776B0-2F1A-4C36-87B3-86206AC4B439}.Release|x86.Build.0 = Release|Any CPU
{FFA776B0-2F1A-4C36-87B3-86206AC4B440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFA776B0-2F1A-4C36-87B3-86206AC4B440}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit e5b31b1

Please sign in to comment.