-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProgram.cs
37 lines (34 loc) · 1.28 KB
/
Program.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SurvivalProjectImagePacker
{
class Program
{
public const string BASE_DIRECTORY = "images";
public const string INDEX_FILE = "image.idx";
public const string PACK_FILE = "image.pak";
static void Main(string[] args)
{
if (args.Length != 2 || (args[0] != "-e" && args[0] != "-p"))
{
Console.WriteLine("Invalid usage. Usage:");
Console.WriteLine("-e PATH to extract the PAK file. PATH must contain image.idx and image.pak");
Console.WriteLine("-p PATH to pack into a PAK file. PATH needs to be the extracted images folder");
return;
// Console.WriteLine("-d PATH to decompress a PGF. PATH needs to be the extracted images folder");
// Console.WriteLine("-c PATH to compress an image into PGF. PATH needs to be the extracted images folder");
}
if (args[0] == "-e")
{
ImagesExtractor.Extract(args[1]);
}
else
{
ImagesPacker.Pack(args[1]);
}
}
}
}