Ejemplo n.º 1
0
        private dataStructStruct CreateLibGDXStruct()
        {
            var dataStruct = new dataStructStruct
            {
                type             = "LibGDX",
                ItemsElementName = new ItemsChoiceType1[2],
                Items            = new object[2]
            };

            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0]            = "filtering";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@struct;
            var dataStructStruct = new dataStructStructStruct {
                type = "LibGDXFiltering", Items = new object[4]
            };

            dataStructStruct.Items[0] = "x";
            dataStructStruct.Items[1] = new dataStructEnum
            {
                type  = "LibGDXFiltering::Filtering",
                Value = "Linear"
            };
            dataStructStruct.Items[2] = "y";
            dataStructStruct.Items[3] = new dataStructEnum
            {
                type  = "LibGDXFiltering::Filtering",
                Value = "Linear"
            };
            dataStruct.Items[1] = dataStructStruct;

            return(dataStruct);
        }
Ejemplo n.º 2
0
        private dataStructStruct CreateSpriteSettings()
        {
            var spriteSettings = new dataStructStruct
            {
                type             = "SpriteSettings",
                ItemsElementName = new ItemsChoiceType1[18],
                Items            = new object[18]
            };

            spriteSettings.ItemsElementName[0] = ItemsChoiceType1.key;
            spriteSettings.Items[0]            = "scale";
            spriteSettings.ItemsElementName[1] = ItemsChoiceType1.@double;
            spriteSettings.Items[1]            = (byte)1;
            spriteSettings.ItemsElementName[2] = ItemsChoiceType1.key;
            spriteSettings.Items[2]            = "scaleMode";
            spriteSettings.ItemsElementName[3] = ItemsChoiceType1.@enum;
            spriteSettings.Items[3]            = new dataStructEnum {
                type = "ScaleMode", Value = "Smooth"
            };
            spriteSettings.ItemsElementName[4]  = ItemsChoiceType1.key;
            spriteSettings.Items[4]             = "extrude";
            spriteSettings.ItemsElementName[5]  = ItemsChoiceType1.@uint;
            spriteSettings.Items[5]             = 1;
            spriteSettings.ItemsElementName[6]  = ItemsChoiceType1.key;
            spriteSettings.Items[6]             = "trimThreshold";
            spriteSettings.ItemsElementName[7]  = ItemsChoiceType1.@uint;
            spriteSettings.Items[7]             = 1;
            spriteSettings.ItemsElementName[8]  = ItemsChoiceType1.key;
            spriteSettings.Items[8]             = "trimMargin";
            spriteSettings.ItemsElementName[9]  = ItemsChoiceType1.@uint;
            spriteSettings.Items[9]             = 1;
            spriteSettings.ItemsElementName[10] = ItemsChoiceType1.key;
            spriteSettings.Items[10]            = "trimMode";
            spriteSettings.ItemsElementName[11] = ItemsChoiceType1.@enum;
            spriteSettings.Items[11]            = new dataStructEnum {
                type = "SpriteSettings::TrimMode", Value = "Trim"
            };
            spriteSettings.ItemsElementName[12] = ItemsChoiceType1.key;
            spriteSettings.Items[12]            = "tracerTolerance";
            spriteSettings.ItemsElementName[13] = ItemsChoiceType1.@int;
            spriteSettings.Items[13]            = 200;
            spriteSettings.ItemsElementName[14] = ItemsChoiceType1.key;
            spriteSettings.Items[14]            = "heuristicMask";
            spriteSettings.ItemsElementName[15] = ItemsChoiceType1.@false;
            spriteSettings.Items[15]            = new object();
            spriteSettings.ItemsElementName[16] = ItemsChoiceType1.key;
            spriteSettings.Items[16]            = "pivotPoint";
            spriteSettings.ItemsElementName[17] = ItemsChoiceType1.@enum;
            spriteSettings.Items[17]            = new dataStructEnum {
                type = "SpriteSettings::PivotPoint", Value = "Center"
            };

            return(spriteSettings);
        }
Ejemplo n.º 3
0
        private dataStructStruct CreateAndEngineStruct()
        {
            var dataStruct = new dataStructStruct
            {
                type             = "AndEngine",
                ItemsElementName = new ItemsChoiceType1[8],
                Items            = new object[8]
            };

            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0]            = "minFilter";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@enum;
            dataStruct.Items[1]            = new dataStructEnum {
                type = "AndEngine::MinFilter", Value = "Linear"
            };
            dataStruct.ItemsElementName[2] = ItemsChoiceType1.key;
            dataStruct.Items[2]            = "packageName";
            dataStruct.ItemsElementName[3] = ItemsChoiceType1.@string;
            dataStruct.Items[3]            = "Texture";
            dataStruct.ItemsElementName[4] = ItemsChoiceType1.key;
            dataStruct.Items[4]            = "wrap";
            dataStruct.ItemsElementName[5] = ItemsChoiceType1.@struct;
            dataStruct.Items[5]            = CreateDataStruct("AndEngineWrap", new List <string> {
                "s", "t"
            },
                                                              new List <dataStructEnum>
            {
                new dataStructEnum {
                    type = "AndEngineWrap::Wrap", Value = "Clamp"
                },
                new dataStructEnum {
                    type = "AndEngineWrap::Wrap", Value = "Clamp"
                }
            });
            dataStruct.ItemsElementName[6] = ItemsChoiceType1.key;
            dataStruct.Items[6]            = "magFilter";
            dataStruct.ItemsElementName[7] = ItemsChoiceType1.@enum;
            dataStruct.Items[7]            = new dataStructEnum {
                type = "AndEngine::MagFilter", Value = "MagLinear"
            };

            return(dataStruct);
        }
Ejemplo n.º 4
0
        private dataStructStruct CreateAlgorithmSettings()
        {
            var dataStruct = new dataStructStruct
            {
                type             = "AlgorithmSettings",
                ItemsElementName = new ItemsChoiceType1[14],
                Items            = new object[14]
            };

            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0]            = "algorithm";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@enum;
            dataStruct.Items[1]            = new dataStructEnum {
                type = "AlgorithmSettings::AlgorithmId", Value = "MaxRects"
            };
            dataStruct.ItemsElementName[2] = ItemsChoiceType1.key;
            dataStruct.Items[2]            = "freeSizeMode";
            dataStruct.ItemsElementName[3] = ItemsChoiceType1.@enum;
            dataStruct.Items[3]            = new dataStructEnum {
                type = "AlgorithmSettings::AlgorithmFreeSizeMode", Value = "Best"
            };
            dataStruct.ItemsElementName[4] = ItemsChoiceType1.key;
            dataStruct.Items[4]            = "sizeConstraints";
            dataStruct.ItemsElementName[5] = ItemsChoiceType1.@enum;
            dataStruct.Items[5]            = new dataStructEnum {
                type = "AlgorithmSettings::SizeConstraints", Value = "POT"
            };
            dataStruct.ItemsElementName[6]  = ItemsChoiceType1.key;
            dataStruct.Items[6]             = "forceSquared";
            dataStruct.ItemsElementName[7]  = ItemsChoiceType1.@false;
            dataStruct.Items[7]             = new object();
            dataStruct.ItemsElementName[8]  = ItemsChoiceType1.key;
            dataStruct.Items[8]             = "forceWordAligned";
            dataStruct.ItemsElementName[9]  = ItemsChoiceType1.@false;
            dataStruct.Items[9]             = new object();
            dataStruct.ItemsElementName[10] = ItemsChoiceType1.key;
            dataStruct.Items[10]            = "maxRects";
            dataStruct.ItemsElementName[11] = ItemsChoiceType1.@struct;
            dataStruct.Items[11]            = CreateDataStruct("AlgorithmMaxRectsSettings", new List <string> {
                "heuristic"
            },
                                                               new List <dataStructEnum>
            {
                new dataStructEnum {
                    type = "AlgorithmMaxRectsSettings::Heuristic", Value = "Best"
                }
            });
            dataStruct.ItemsElementName[12] = ItemsChoiceType1.key;
            dataStruct.Items[12]            = "basic";
            dataStruct.ItemsElementName[13] = ItemsChoiceType1.@struct;
            dataStruct.Items[13]            = CreateDataStruct("AlgorithmBasicSettings", new List <string> {
                "sortBy", "order"
            },
                                                               new List <dataStructEnum>
            {
                new dataStructEnum {
                    type = "AlgorithmBasicSettings::SortBy", Value = "Best"
                },
                new dataStructEnum {
                    type = "AlgorithmBasicSettings::Order", Value = "Ascending"
                }
            });

            return(dataStruct);
        }
Ejemplo n.º 5
0
        private dataStructStruct CreateLibGDXStruct()
        {
            var dataStruct = new dataStructStruct
                             {
                                 type = "LibGDX",
                                 ItemsElementName = new ItemsChoiceType1[2],
                                 Items = new object[2]
                             };
            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0] = "filtering";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@struct;
            var dataStructStruct = new dataStructStructStruct {type = "LibGDXFiltering", Items = new object[4]};
            dataStructStruct.Items[0] = "x";
            dataStructStruct.Items[1] = new dataStructEnum
                                        {
                                            type = "LibGDXFiltering::Filtering",
                                            Value = "Linear"
                                        };
            dataStructStruct.Items[2] = "y";
            dataStructStruct.Items[3] = new dataStructEnum
                                        {
                                            type = "LibGDXFiltering::Filtering",
                                            Value = "Linear"
                                        };
            dataStruct.Items[1] = dataStructStruct;

            return dataStruct;
        }
Ejemplo n.º 6
0
        private dataStructStruct CreateAndEngineStruct()
        {
            var dataStruct = new dataStructStruct
                             {
                                 type = "AndEngine",
                                 ItemsElementName = new ItemsChoiceType1[8],
                                 Items = new object[8]
                             };
            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0] = "minFilter";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@enum;
            dataStruct.Items[1] = new dataStructEnum { type = "AndEngine::MinFilter", Value = "Linear" };
            dataStruct.ItemsElementName[2] = ItemsChoiceType1.key;
            dataStruct.Items[2] = "packageName";
            dataStruct.ItemsElementName[3] = ItemsChoiceType1.@string;
            dataStruct.Items[3] = "Texture";
            dataStruct.ItemsElementName[4] = ItemsChoiceType1.key;
            dataStruct.Items[4] = "wrap";
            dataStruct.ItemsElementName[5] = ItemsChoiceType1.@struct;
            dataStruct.Items[5] = CreateDataStruct("AndEngineWrap", new List<string> {"s", "t"},
                new List<dataStructEnum>
                {
                    new dataStructEnum {type = "AndEngineWrap::Wrap", Value = "Clamp"},
                    new dataStructEnum {type = "AndEngineWrap::Wrap", Value = "Clamp"}
                });
            dataStruct.ItemsElementName[6] = ItemsChoiceType1.key;
            dataStruct.Items[6] = "magFilter";
            dataStruct.ItemsElementName[7] = ItemsChoiceType1.@enum;
            dataStruct.Items[7] = new dataStructEnum { type = "AndEngine::MagFilter", Value = "MagLinear" };

            return dataStruct;
        }
Ejemplo n.º 7
0
        private dataStructStruct CreateAlgorithmSettings()
        {
            var dataStruct = new dataStructStruct
                             {
                                 type = "AlgorithmSettings",
                                 ItemsElementName = new ItemsChoiceType1[14],
                                 Items = new object[14]
                             };
            dataStruct.ItemsElementName[0] = ItemsChoiceType1.key;
            dataStruct.Items[0] = "algorithm";
            dataStruct.ItemsElementName[1] = ItemsChoiceType1.@enum;
            dataStruct.Items[1] = new dataStructEnum {type = "AlgorithmSettings::AlgorithmId", Value = "MaxRects"};
            dataStruct.ItemsElementName[2] = ItemsChoiceType1.key;
            dataStruct.Items[2] = "freeSizeMode";
            dataStruct.ItemsElementName[3] = ItemsChoiceType1.@enum;
            dataStruct.Items[3] = new dataStructEnum { type = "AlgorithmSettings::AlgorithmFreeSizeMode", Value = "Best" };
            dataStruct.ItemsElementName[4] = ItemsChoiceType1.key;
            dataStruct.Items[4] = "sizeConstraints";
            dataStruct.ItemsElementName[5] = ItemsChoiceType1.@enum;
            dataStruct.Items[5] = new dataStructEnum { type = "AlgorithmSettings::SizeConstraints", Value = "POT" };
            dataStruct.ItemsElementName[6] = ItemsChoiceType1.key;
            dataStruct.Items[6] = "forceSquared";
            dataStruct.ItemsElementName[7] = ItemsChoiceType1.@false;
            dataStruct.Items[7] = new object();
            dataStruct.ItemsElementName[8] = ItemsChoiceType1.key;
            dataStruct.Items[8] = "forceWordAligned";
            dataStruct.ItemsElementName[9] = ItemsChoiceType1.@false;
            dataStruct.Items[9] = new object();
            dataStruct.ItemsElementName[10] = ItemsChoiceType1.key;
            dataStruct.Items[10] = "maxRects";
            dataStruct.ItemsElementName[11] = ItemsChoiceType1.@struct;
            dataStruct.Items[11] = CreateDataStruct("AlgorithmMaxRectsSettings", new List<string> {"heuristic"},
                new List<dataStructEnum>
                {
                    new dataStructEnum {type = "AlgorithmMaxRectsSettings::Heuristic", Value = "Best"}
                });
            dataStruct.ItemsElementName[12] = ItemsChoiceType1.key;
            dataStruct.Items[12] = "basic";
            dataStruct.ItemsElementName[13] = ItemsChoiceType1.@struct;
            dataStruct.Items[13] = CreateDataStruct("AlgorithmBasicSettings", new List<string> { "sortBy", "order" },
                new List<dataStructEnum>
                {
                    new dataStructEnum {type = "AlgorithmBasicSettings::SortBy", Value = "Best"},
                    new dataStructEnum {type = "AlgorithmBasicSettings::Order", Value = "Ascending"}
                });

            return dataStruct;
        }
Ejemplo n.º 8
0
        private dataStructStruct CreateSpriteSettings()
        {
            var spriteSettings = new dataStructStruct
                                 {
                                     type = "SpriteSettings",
                                     ItemsElementName = new ItemsChoiceType1[18],
                                     Items = new object[18]
                                 };
            spriteSettings.ItemsElementName[0] = ItemsChoiceType1.key;
            spriteSettings.Items[0] = "scale";
            spriteSettings.ItemsElementName[1] = ItemsChoiceType1.@double;
            spriteSettings.Items[1] = (byte)1;
            spriteSettings.ItemsElementName[2] = ItemsChoiceType1.key;
            spriteSettings.Items[2] = "scaleMode";
            spriteSettings.ItemsElementName[3] = ItemsChoiceType1.@enum;
            spriteSettings.Items[3] = new dataStructEnum { type = "ScaleMode", Value = "Smooth" };
            spriteSettings.ItemsElementName[4] = ItemsChoiceType1.key;
            spriteSettings.Items[4] = "extrude";
            spriteSettings.ItemsElementName[5] = ItemsChoiceType1.@uint;
            spriteSettings.Items[5] = 1;
            spriteSettings.ItemsElementName[6] = ItemsChoiceType1.key;
            spriteSettings.Items[6] = "trimThreshold";
            spriteSettings.ItemsElementName[7] = ItemsChoiceType1.@uint;
            spriteSettings.Items[7] = 1;
            spriteSettings.ItemsElementName[8] = ItemsChoiceType1.key;
            spriteSettings.Items[8] = "trimMargin";
            spriteSettings.ItemsElementName[9] = ItemsChoiceType1.@uint;
            spriteSettings.Items[9] = 1;
            spriteSettings.ItemsElementName[10] = ItemsChoiceType1.key;
            spriteSettings.Items[10] = "trimMode";
            spriteSettings.ItemsElementName[11] = ItemsChoiceType1.@enum;
            spriteSettings.Items[11] = new dataStructEnum { type = "SpriteSettings::TrimMode", Value = "Trim" };
            spriteSettings.ItemsElementName[12] = ItemsChoiceType1.key;
            spriteSettings.Items[12] = "tracerTolerance";
            spriteSettings.ItemsElementName[13] = ItemsChoiceType1.@int;
            spriteSettings.Items[13] = 200;
            spriteSettings.ItemsElementName[14] = ItemsChoiceType1.key;
            spriteSettings.Items[14] = "heuristicMask";
            spriteSettings.ItemsElementName[15] = ItemsChoiceType1.@false;
            spriteSettings.Items[15] = new object();
            spriteSettings.ItemsElementName[16] = ItemsChoiceType1.key;
            spriteSettings.Items[16] = "pivotPoint";
            spriteSettings.ItemsElementName[17] = ItemsChoiceType1.@enum;
            spriteSettings.Items[17] = new dataStructEnum { type = "SpriteSettings::PivotPoint", Value = "Center" };

            return spriteSettings;
        }