示例#1
0
        public static TxtcResource.TxtcResource TattooTxtc(TGIBlock tatTGI)
        {
            TxtcResource.TxtcResource txtc = new TxtcResource.TxtcResource(0, null);
            txtc.Root.Version  = 8;
            txtc.Root.DataType = TxtcResource.TxtcResource.DataTypeFlags.Body;

            TxtcResource.TxtcResource.EntryBlockList entryBlockList = new TxtcResource.TxtcResource.EntryBlockList(null);

            TxtcResource.TxtcResource.EntryList entryList0 = new TxtcResource.TxtcResource.EntryList(null);
            entryList0.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.SetTarget));
            entryList0.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList0.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList0.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList0.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList0.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList0.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList0.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.RenderTarget, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.RenderTarget.RenderTarget_B));
            TxtcResource.TxtcResource.EntryBlock entBlock0 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock0.Entries = entryList0;
            entryBlockList.Add(entBlock0);

            TxtcResource.TxtcResource.EntryList entryList1 = new TxtcResource.TxtcResource.EntryList(null);
            entryList1.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ColorFill));
            entryList1.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList1.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList1.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList1.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList1.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList1.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList1.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha +
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryList1.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList1.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 0));
            entryList1.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.Color, 0, 0));
            TxtcResource.TxtcResource.EntryBlock entBlock1 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock1.Entries = entryList1;
            entryBlockList.Add(entBlock1);

            TxtcResource.TxtcResource.EntryList entryList2 = new TxtcResource.TxtcResource.EntryList(null);
            entryList2.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ChannelSelect));
            entryList2.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList2.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList2.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList2.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList2.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList2.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList2.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha));
            entryList2.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList2.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 0));
            entryList2.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryList2.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList2.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 1));
            entryList2.Add(new TxtcResource.TxtcResource.EntryTGIIndex(0, null, TxtcResource.TxtcResource.EntryTGIIndex.TGIIndexProperties.ImageKey, 0, 0));
            entryList2.Add(new TxtcResource.TxtcResource.EntryVector(0, null, TxtcResource.TxtcResource.EntryVector.VectorProperties.ChannelSelect, 0, new float[] { 1.0f, 0.0f, 0.0f, 0.0f }));
            TxtcResource.TxtcResource.EntryBlock entBlock2 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock2.Entries = entryList2;
            entryBlockList.Add(entBlock2);

            TxtcResource.TxtcResource.EntryList entryList3 = new TxtcResource.TxtcResource.EntryList(null);
            entryList3.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ColorFill));
            entryList3.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList3.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList3.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList3.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList3.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList3.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList3.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0,
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryList3.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList3.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryList3.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.DestinationAlpha));
            entryList3.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.InverseDestinationAlpha));
            entryList3.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.Color, 0, 0xFFED88F7));
            TxtcResource.TxtcResource.EntryBlock entBlock3 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock3.Entries = entryList3;
            entryBlockList.Add(entBlock3);

            TxtcResource.TxtcResource.EntryList entryList4 = new TxtcResource.TxtcResource.EntryList(null);
            entryList4.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ChannelSelect));
            entryList4.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList4.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList4.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList4.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList4.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList4.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList4.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha));
            entryList4.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList4.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 0));
            entryList4.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryList4.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList4.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 1));
            entryList4.Add(new TxtcResource.TxtcResource.EntryTGIIndex(0, null, TxtcResource.TxtcResource.EntryTGIIndex.TGIIndexProperties.ImageKey, 0, 0));
            entryList4.Add(new TxtcResource.TxtcResource.EntryVector(0, null, TxtcResource.TxtcResource.EntryVector.VectorProperties.ChannelSelect, 0, new float[] { 0.0f, 1.0f, 0.0f, 0.0f }));
            TxtcResource.TxtcResource.EntryBlock entBlock4 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock4.Entries = entryList4;
            entryBlockList.Add(entBlock4);

            TxtcResource.TxtcResource.EntryList entryList5 = new TxtcResource.TxtcResource.EntryList(null);
            entryList5.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ColorFill));
            entryList5.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList5.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList5.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList5.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList5.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList5.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList5.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0,
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryList5.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList5.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryList5.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.DestinationAlpha));
            entryList5.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.InverseDestinationAlpha));
            entryList5.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.Color, 0, 0xFF845DB7));
            TxtcResource.TxtcResource.EntryBlock entBlock5 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock5.Entries = entryList5;
            entryBlockList.Add(entBlock5);

            TxtcResource.TxtcResource.EntryList entryList6 = new TxtcResource.TxtcResource.EntryList(null);
            entryList6.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ChannelSelect));
            entryList6.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList6.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList6.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList6.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList6.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList6.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList6.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha));
            entryList6.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList6.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 0));
            entryList6.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryList6.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList6.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 1));
            entryList6.Add(new TxtcResource.TxtcResource.EntryTGIIndex(0, null, TxtcResource.TxtcResource.EntryTGIIndex.TGIIndexProperties.ImageKey, 0, 0));
            entryList6.Add(new TxtcResource.TxtcResource.EntryVector(0, null, TxtcResource.TxtcResource.EntryVector.VectorProperties.ChannelSelect, 0, new float[] { 0.0f, 0.0f, 1.0f, 0.0f }));
            TxtcResource.TxtcResource.EntryBlock entBlock6 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock6.Entries = entryList6;
            entryBlockList.Add(entBlock6);

            TxtcResource.TxtcResource.EntryList entryList7 = new TxtcResource.TxtcResource.EntryList(null);
            entryList7.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ColorFill));
            entryList7.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList7.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList7.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList7.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList7.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList7.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList7.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0,
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryList7.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList7.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryList7.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.DestinationAlpha));
            entryList7.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.InverseDestinationAlpha));
            entryList7.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.Color, 0, 0xFFE6EA0E));
            TxtcResource.TxtcResource.EntryBlock entBlock7 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock7.Entries = entryList7;
            entryBlockList.Add(entBlock7);

            TxtcResource.TxtcResource.EntryList entryList8 = new TxtcResource.TxtcResource.EntryList(null);
            entryList8.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ChannelSelect));
            entryList8.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList8.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList8.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList8.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList8.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList8.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList8.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha));
            entryList8.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList8.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 0));
            entryList8.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryList8.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList8.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 1));
            entryList8.Add(new TxtcResource.TxtcResource.EntryTGIIndex(0, null, TxtcResource.TxtcResource.EntryTGIIndex.TGIIndexProperties.ImageKey, 0, 0));
            entryList8.Add(new TxtcResource.TxtcResource.EntryVector(0, null, TxtcResource.TxtcResource.EntryVector.VectorProperties.ChannelSelect, 0, new float[] { 0.0f, 0.0f, 0.0f, 1.0f }));
            TxtcResource.TxtcResource.EntryBlock entBlock8 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock8.Entries = entryList8;
            entryBlockList.Add(entBlock8);

            TxtcResource.TxtcResource.EntryList entryList9 = new TxtcResource.TxtcResource.EntryList(null);
            entryList9.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ColorFill));
            entryList9.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryList9.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryList9.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryList9.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryList9.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryList9.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryList9.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0,
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryList9.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryList9.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryList9.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.DestinationAlpha));
            entryList9.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.InverseDestinationAlpha));
            entryList9.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.Color, 0, 0xFF000000));
            TxtcResource.TxtcResource.EntryBlock entBlock9 = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlock9.Entries = entryList9;
            entryBlockList.Add(entBlock9);

            TxtcResource.TxtcResource.EntryList entryListA = new TxtcResource.TxtcResource.EntryList(null);
            entryListA.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.ChannelSelect));
            entryListA.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryListA.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryListA.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryListA.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryListA.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryListA.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryListA.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0, (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Alpha));
            entryListA.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryListA.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryListA.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.One));
            entryListA.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.One));
            entryListA.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryListA.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryListA.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 1));
            entryListA.Add(new TxtcResource.TxtcResource.EntryTGIIndex(0, null, TxtcResource.TxtcResource.EntryTGIIndex.TGIIndexProperties.ImageKey, 0, 0));
            entryListA.Add(new TxtcResource.TxtcResource.EntryVector(0, null, TxtcResource.TxtcResource.EntryVector.VectorProperties.ChannelSelect, 0, new float[] { 1.0f, 1.0f, 1.0f, 1.0f }));
            TxtcResource.TxtcResource.EntryBlock entBlockA = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlockA.Entries = entryListA;
            entryBlockList.Add(entBlockA);

            TxtcResource.TxtcResource.EntryList entryListB = new TxtcResource.TxtcResource.EntryList(null);
            entryListB.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.SetTarget));
            entryListB.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryListB.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryListB.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryListB.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryListB.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryListB.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryListB.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.RenderTarget, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.RenderTarget.RenderTarget_A));
            TxtcResource.TxtcResource.EntryBlock entBlockB = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlockB.Entries = entryListB;
            entryBlockList.Add(entBlockB);

            TxtcResource.TxtcResource.EntryList entryListC = new TxtcResource.TxtcResource.EntryList(null);
            entryListC.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ID, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.StepType.DrawImage));
            entryListC.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.UIVisible, 0, 0));
            entryListC.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.MinShaderModel, 0, 0));
            entryListC.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SkipShaderModel, 0, (int)TxtcResource.TxtcResource.EntryInt32.ShaderModel.SM_Highest));
            entryListC.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.MinDetailLevel, 0, 0xFFFFFFFF));
            entryListC.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.SkipDetailLevel, 0, (uint)TxtcResource.TxtcResource.EntryUInt32.DetailLevel.Lowest));
            entryListC.Add(new TxtcResource.TxtcResource.EntryString(0, null, TxtcResource.TxtcResource.EntryString.StringProperties.Description, 0, "Texture Step"));
            entryListC.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.ColorWrite, 0,
                                                                    (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Blue + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Green + (int)TxtcResource.TxtcResource.EntryInt32.ColorWriteChannels.Red));
            entryListC.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.DestinationRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryListC.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableBlending, 0, 1));
            entryListC.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.SourceBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.SourceAlpha));
            entryListC.Add(new TxtcResource.TxtcResource.EntryInt32(0, null, TxtcResource.TxtcResource.EntryInt32.Int32Properties.DestinationBlend, 0, (int)TxtcResource.TxtcResource.EntryInt32.Blend.InverseSourceAlpha));
            entryListC.Add(new TxtcResource.TxtcResource.EntrySingle(0, null, TxtcResource.TxtcResource.EntrySingle.SingleProperties.Rotation, 0, 0.0f));
            entryListC.Add(new TxtcResource.TxtcResource.EntryRectangle(0, null, TxtcResource.TxtcResource.EntryRectangle.RectangleProperties.SourceRectangle, 0, new float[] { 0.0f, 0.0f, 1.0f, 1.0f }));
            entryListC.Add(new TxtcResource.TxtcResource.EntryBoolean(0, null, TxtcResource.TxtcResource.EntryBoolean.BooleanProperties.EnableFiltering, 0, 0));
            entryListC.Add(new TxtcResource.TxtcResource.EntryUInt32(0, null, TxtcResource.TxtcResource.EntryUInt32.UInt32Properties.ImageSource, 0, 0x021E9CD5));
            TxtcResource.TxtcResource.EntryBlock entBlockC = new TxtcResource.TxtcResource.EntryBlock(0, null);
            entBlockC.Entries = entryListC;
            entryBlockList.Add(entBlockC);

            txtc.Root.Entries = entryBlockList;

            CountedTGIBlockList tgi = new CountedTGIBlockList(null);

            tgi.Add(tatTGI);
            txtc.Root.TGIBlocks = tgi;

            return(txtc);
        }
示例#2
0
        private void TattooGo_button_Click(object sender, EventArgs e)
        {
            float sortOrder;

            try
            {
                sortOrder = float.Parse(CASPsortOrder.Text);
            }
            catch
            {
                MessageBox.Show("Please enter a valid number for Sort Order in CAS");
                return;
            }
            if (String.CompareOrdinal(TattooName.Text, " ") <= 0)
            {
                MessageBox.Show("Please enter a name for the tattoo");
                return;
            }
            if (dds == null)
            {
                MessageBox.Show("Please select an image for the tattoo");
                return;
            }
            ulong  tatInstance;
            string tatName;

            if (TattooName.Text.IndexOf("uutattoo") < 0)
            {
                tatName = "uutattoo" + TattooName.Text;
            }
            else
            {
                tatName = TattooName.Text;
            }
            if (String.CompareOrdinal(TattooInstance.Text, " ") > 0)
            {
                if (!UInt64.TryParse(TattooInstance.Text, System.Globalization.NumberStyles.HexNumber, System.Globalization.CultureInfo.InvariantCulture, out tatInstance))
                {
                    MessageBox.Show("Please enter a valid Tattoo Instance number in hexidecimal, or leave it blank");
                    return;
                }
            }
            else
            {
                tatInstance = FNVhash.FNV64(tatName);
            }

            PleaseWait_label.Visible = true;
            this.Refresh();

            uint  tatGroup     = FNVhash.FNV24(tatName);
            ulong txtcInstance = FNVhash.FNV64(tatName + "TattooTemplate_Top_diffuse");

            Package myPack;

            myPack = (Package)Package.NewPackage(0);

            NameMapResource.NameMapResource myMap = new NameMapResource.NameMapResource(0, null);
            myMap.Add(tatInstance, tatName);
            myMap.Add(tatGroup, tatName);
            myMap.Add(txtcInstance, tatName + "TattooTemplate_Top_diffuse");

            XmlDocument doc1 = PresetBuilder.presetXML(tatName, tatInstance, presets[0],
                                                       ChannelR_checkBox.Checked, ChannelG_checkBox.Checked, ChannelB_checkBox.Checked, ChannelA_checkBox.Checked);
            XmlDocument doc2 = PresetBuilder.presetXML(tatName, tatInstance, presets[1],
                                                       ChannelR_checkBox.Checked, ChannelG_checkBox.Checked, ChannelB_checkBox.Checked, ChannelA_checkBox.Checked);
            XmlDocument doc3 = PresetBuilder.presetXML(tatName, tatInstance, presets[2],
                                                       ChannelR_checkBox.Checked, ChannelG_checkBox.Checked, ChannelB_checkBox.Checked, ChannelA_checkBox.Checked);

            CASPartResource.CASPartResource myCasp;
            myCasp = new CASPartResource.CASPartResource(0, null);
            CASPartResource.CASPartResource.Preset pre1 = new CASPartResource.CASPartResource.Preset(0, null, doc1.OuterXml, 1);
            CASPartResource.CASPartResource.Preset pre2 = new CASPartResource.CASPartResource.Preset(0, null, doc2.OuterXml, 2);
            CASPartResource.CASPartResource.Preset pre3 = new CASPartResource.CASPartResource.Preset(0, null, doc3.OuterXml, 3);
            myCasp.Presets = new CASPartResource.CASPartResource.PresetList(null);
            myCasp.Presets.Add(pre1);
            myCasp.Presets.Add(pre2);
            myCasp.Presets.Add(pre3);
            myCasp.Unknown1     = tatName;
            myCasp.SortPriority = sortOrder;
            myCasp.Clothing     = ClothingType.TattooTemplate;
            myCasp.DataType     = DataTypeFlags.Body;
            myCasp.AgeGender    = new AgeGenderFlags(0, null, (CASPtodder_checkBox.Checked ? AgeFlags.Toddler : 0) |
                                                     (CASPchild_checkBox.Checked ? AgeFlags.Child : 0) | (CASPteen_checkBox.Checked ? AgeFlags.Teen : 0) |
                                                     (CASPadult_checkBox.Checked ? AgeFlags.YoungAdult | AgeFlags.Adult : 0) |
                                                     (CASPelder_checkBox.Checked ? AgeFlags.Elder : 0),
                                                     (CASPfemale_checkBox.Checked ? GenderFlags.Female : 0) | (CASPmale_checkBox.Checked ? GenderFlags.Male : 0),
                                                     0, 0);
            myCasp.ClothingCategory = ClothingCategoryFlags.Athletic | ClothingCategoryFlags.Career | ClothingCategoryFlags.Everyday |
                                      ClothingCategoryFlags.FireFighting | ClothingCategoryFlags.Formalwear | ClothingCategoryFlags.Makeover |
                                      ClothingCategoryFlags.MartialArts | ClothingCategoryFlags.Naked | ClothingCategoryFlags.Outerwear |
                                      ClothingCategoryFlags.SkinnyDippingTowel | ClothingCategoryFlags.Sleepwear | ClothingCategoryFlags.Swimwear |
                                      ClothingCategoryFlags.Singed | ClothingCategoryFlags.ValidForMaternity;
            myCasp.CasPart1Index         = 2;
            myCasp.CasPart2Index         = 2;
            myCasp.BlendInfoFatIndex     = 3;
            myCasp.BlendInfoFitIndex     = 4;
            myCasp.BlendInfoThinIndex    = 5;
            myCasp.BlendInfoSpecialIndex = 6;
            myCasp.OverlayPriority       = 2u;
            myCasp.VPXYIndexes           = new ByteIndexList(null);
            myCasp.VPXYIndexes.Add(7);
            myCasp.Diffuse1Indexes = new ByteIndexList(null);
            myCasp.Diffuse1Indexes.Add(8);
            myCasp.Specular1Indexes = new ByteIndexList(null);
            myCasp.Specular1Indexes.Add(9);
            myCasp.BONDIndexes = new ByteIndexList(null);
            myCasp.BONDIndexes.AddRange(new List <byte> {
                2, 2, 2, 2, 2
            });
            myCasp.Unknown4  = "bare";
            myCasp.TGIBlocks = new CountedTGIBlockList(null);
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.DDS, 0, tatInstance));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.XML, 0, 0xF7FC14B9EA85B390));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, 0, 0, 0));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.BBLN, 0, 0xCBE03A305F80FF50));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.BBLN, 0, 0xCBE032305F80F1F8));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.BBLN, 0, 0x540F4B31F0B42342));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.BBLN, 0, 0x82F02E48897E22B4));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.VPXY, 1, tatGroup));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.TXTC, tatGroup, txtcInstance));
            myCasp.TGIBlocks.Add(new TGIBlock(0, null, (uint)ResourceTypes.TXTC, tatGroup, 0xCBF29CE484222325));

            uint  fakeType     = (uint)tatInstance;
            uint  fakeGroup    = (uint)(tatInstance >> 32);
            ulong fakeInstance = (ulong)ResourceTypes.DDS << 32;

            TxtcResource.TxtcResource txtc = TattooTextureCompositor.TattooTxtc(new TGIBlock(0, null, fakeType, fakeGroup, fakeInstance));

            VPXY vpxy = new VPXY(0, null, 4, null, 2,
                                 new BoundingBox(0, null, new Vertex(0, null, -.0060f, 1.7157f, -.0060f), new Vertex(0, null, .0060f, 1.7277f, .0060f)),
                                 new byte[] { 0, 0, 0, 0 }, 0, 0, new TGIBlockList(null));
            GenericRCOLResource vpxyRcol = new GenericRCOLResource(0, null);

            vpxyRcol.Version      = 3;
            vpxyRcol.PublicChunks = 1;
            vpxyRcol.ChunkEntries = new GenericRCOLResource.ChunkEntryList(null);
            GenericRCOLResource.ChunkEntry vpxyChunk = new GenericRCOLResource.ChunkEntry(0, null, new TGIBlock(0, null, "ITG", (uint)ResourceTypes.VPXY, 1, tatGroup), vpxy);
            vpxyRcol.ChunkEntries.Add(vpxyChunk);
            IResourceIndexEntry rs = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.KEY, 0, tatInstance), myMap.Stream, true);

            rs.Compressed = (ushort)0xFFFF;
            rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.CASP, 0, tatInstance), myCasp.Stream, true);
            rs.Compressed = (ushort)0xFFFF;
            rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.TXTC, tatGroup, txtcInstance), txtc.Stream, true);
            rs.Compressed = (ushort)0xFFFF;
            rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.VPXY, 1, tatGroup), vpxyRcol.Stream, true);
            rs.Compressed = (ushort)0xFFFF;
            MemoryStream ms = new MemoryStream();

            doc1.Save(ms);
            rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.XML, 0, tatInstance), ms, true);
            rs.Compressed = (ushort)0xFFFF;
            MemoryStream ms2 = new MemoryStream();

            dds.UseDXT          = false;
            dds.AlphaDepth      = 8;
            dds.GenerateMipmaps = true;
            dds.Save(ms2);
            rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.DDS, 0, tatInstance), ms2, true);
            rs.Compressed = (ushort)0xFFFF;
            if (thumbNail != null)
            {
                MemoryStream ms3 = new MemoryStream();
                thumbNail.Save(ms3, System.Drawing.Imaging.ImageFormat.Png);
                rs            = myPack.AddResource(new TGIBlock(0, null, (uint)ResourceTypes.THUM, 1, tatInstance), ms3, true);
                rs.Compressed = (ushort)0xFFFF;
            }

            PleaseWait_label.Visible = false;

            SaveFileDialog saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter          = PackageFilter;
            saveFileDialog1.Title           = "Save as a new package";
            saveFileDialog1.FileName        = TattooName.Text + ".package";
            saveFileDialog1.FilterIndex     = 1;
            saveFileDialog1.CheckFileExists = false;
            saveFileDialog1.CheckPathExists = true;
            saveFileDialog1.OverwritePrompt = true;
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                myPack.SaveAs(saveFileDialog1.FileName);
            }
            ms.Dispose();
            ms2.Dispose();
        }