Files
korenkonder_PD_Tool/PD_Tool/classes/STR.cs
T
korenkonder 85a22ea0f7 Release v0.4.9.9
A3DA, Bloom, Color Correction, DOF, Light, MotHead
2020-11-19 23:22:25 +03:00

37 lines
1.1 KiB
C#

using System;
using KKdMainLib.IO;
using KKdSTR = KKdMainLib.STR;
namespace PD_Tool
{
public class STR
{
public static void Processor(bool json)
{
Console.Title = "STR Converter";
Program.Choose(1, "str", out string[] fileNames);
string filepath, ext;
KKdSTR str;
foreach (string file in fileNames)
using (str = new KKdSTR())
{
filepath = Path.RemoveExtension(file);
ext = Path.GetExtension(file).ToLower();
Console.Title = "STR Converter: " + Path.GetFileNameWithoutExtension(file);
if (ext == ".str" || ext == ".bin")
{
str.STRReader (filepath, ext);
str.MsgPackWriter(filepath, json);
}
else if (ext == ".json" || ext == ".mp")
{
str.MsgPackReader(filepath, ext == ".json");
str.STRWriter (filepath);
}
}
}
}
}