aboutsummaryrefslogtreecommitdiff
path: root/shiftskn/Program.cs
blob: 4631523facae5121b2f0d935718d5c38e32b7bef (plain) (blame)
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
using System;
using System.IO;
using System.IO.Compression;

namespace shiftskn
{
    class Program
    {
        static void Main(string[] args)
        {
            // Variable Declarations
            int argsLength = args.Length;

            if (argsLength < 2)
            {
                ShowHelp();
            }

            if (argsLength >= 2)
            {
                if (args[0] == "picpng")
                {
                    try
                    {
                        if (args.Length >= 3)
                        {
                            Pic2PNG.Convert(args[1], args[2]);
                        }
                            Pic2PNG.Convert(args[1]);
                    }
                    catch
                    {
                        ShowHelp();
                    }
                }
                else if (args[0] == "decode")
                {
                    try
                    {
                        Decode.DecodeSkinToDir(args[1], args[2]);
                    }
                    catch
                    {
                        ShowHelp();
                    }
                }
                else
                {
                    ShowHelp();
                }
            }
        }

        static void ShowHelp()
        {
            Help.PrintHelp();
        }
    }
}