Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
67 lines (63 loc) · 2.33 KB
/
Copy pathProgram.cs
File metadata and controls
67 lines (63 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using SSXMultiTool.FileHandlers.LevelFiles.TrickyPS2;
namespace MiniLTGRebuilderForm
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
if (args.Length == 0)
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
else
{
List<string> ListArgs = args.ToList();
ListArgs.Add("");
ListArgs.Add("");
ListArgs.Add("");
ListArgs.Add("");
ListArgs.Add("");
if (File.Exists(ListArgs[0]))
{
if (File.Exists(ListArgs[1]))
{
PBDHandler pBDHandler = new PBDHandler();
pBDHandler.LoadPBD(ListArgs[0]);
LTGHandler handler = new LTGHandler();
handler.LoadLTG(ListArgs[1]);
if (ListArgs[2].ToLower() != "all")
{
for (int i = 0; i < pBDHandler.Instances.Count; i++)
{
var TempInstance = pBDHandler.Instances[i];
TempInstance.LTGState = handler.FindIfInstaneState(i);
pBDHandler.Instances[i] = TempInstance;
}
}
handler.RegenerateLTG(pBDHandler);
handler.SaveLTGFile(ListArgs[1]);
if (ListArgs[3].ToLower() != "nc" && ListArgs[2].ToLower() != "nc")
{
MessageBox.Show("LTG File Rebuilt");
}
}
else
{
MessageBox.Show("Invalid Output");
}
}
else
{
MessageBox.Show("Invalid Input");
}
}
}
}
}