Esempio n. 1
0
        public MainForm()
        {
            InitializeComponent();

            MyGFX_Tools = new eGFX_Tools(PostMessage);

            foreach (FontFamily fontFamily in FontFamily.Families)
            {
                if (fontFamily.IsStyleAvailable(FontStyle.Regular))
                {
                    FontComboBox.Items.Add(fontFamily.Name);
                }
            }

            FontComboBox.SelectedIndex = 0;

            WorkFlowCB.SelectedIndex = 0;

            this.Text = "eGFX Font Builder : eGFX_API_LEVEL " + eGFX_Tools.eGFX_API_LEVEL + "    eGFX_REVISION : " + eGFX_Tools.eGFX_REVISION;
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            eGFX_Tools MyGFX_Tools = new eGFX_Tools(PostMessages);

            try
            {
                if (args.Length == 0)
                {

                    ShowHelp();

                }
                else
                {
                    switch (args[0])
                    {
                        case "r":

                            MyGFX_Tools.Remap(args[1]);
                            break;

                            case "FontBuilder":

                            if (args.Length == 1)
                            {
                                ShowHelp();
                            }
                            else
                            {
                                MyGFX_Tools.FontBuilder(args[1],eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);
                            }
                            break;

                        case "InitFont":

                            if (args.Length != 4)
                            {
                                ShowHelp();
                            }
                            else
                            {
                                MyGFX_Tools.InitFont(args[1], Convert.ToInt32(args[2]), Convert.ToInt32(args[3]));
                            }

                            break;

                        case "GenerateSprites":

                            if (args.Length == 1)
                            {
                                ShowHelp();
                            }
                            else
                            {

                                switch(args[2])
                                {
                                    case "1BPP":

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);

                                        break;
                                    case "4BPP":

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_4BPP);

                                        break;
                                    case "8BPP":

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_8BPP);

                                        break;

                                    case "all":

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_4BPP);

                                        MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_8BPP);

                                        break;

                                    default:
                                        PostMessages(args[2] + " is nota  valid plane type");

                                        break;
                                }

                            }

                            break;

                        case "SliceDice":

                            if (args.Length == 1)
                            {
                                ShowHelp();
                            }
                            else
                            {
                                MyGFX_Tools.SliceDice(args[1]);
                            }

                            break;

                        default:

                            ShowHelp();
                            break;
                    }

                }
            }
            catch(Exception Ex)
            {
                Console.WriteLine(Ex.Message);
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            eGFX_Tools MyGFX_Tools = new eGFX_Tools(PostMessages);


            try
            {
                if (args.Length == 0)
                {
                    ShowHelp();
                }
                else
                {
                    switch (args[0])
                    {
                    case "r":

                        MyGFX_Tools.Remap(args[1]);
                        break;

                    case "FontBuilder":

                        if (args.Length == 1)
                        {
                            ShowHelp();
                        }
                        else
                        {
                            MyGFX_Tools.FontBuilder(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);
                        }
                        break;

                    case "InitFont":

                        if (args.Length != 4)
                        {
                            ShowHelp();
                        }
                        else
                        {
                            MyGFX_Tools.InitFont(args[1], Convert.ToInt32(args[2]), Convert.ToInt32(args[3]));
                        }

                        break;

                    case "GenerateSprites":

                        if (args.Length == 1)
                        {
                            ShowHelp();
                        }
                        else
                        {
                            switch (args[2])
                            {
                            case "1BPP":

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);

                                break;

                            case "4BPP":

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_4BPP);

                                break;

                            case "8BPP":

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_8BPP);

                                break;

                            case "all":

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_1BPP);

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_4BPP);

                                MyGFX_Tools.GenerateSprites(args[1], eGFX_ImagePlaneType.eGFX_IMAGE_PLANE_8BPP);

                                break;

                            default:
                                PostMessages(args[2] + " is nota  valid plane type");

                                break;
                            }
                        }

                        break;

                    case "SliceDice":

                        if (args.Length == 1)
                        {
                            ShowHelp();
                        }
                        else
                        {
                            MyGFX_Tools.SliceDice(args[1]);
                        }


                        break;



                    default:

                        ShowHelp();
                        break;
                    }
                }
            }
            catch (Exception Ex)
            {
                Console.WriteLine(Ex.Message);
            }
        }