コード例 #1
0
        public void Modify_D3DTX(DDS_Master dds)
        {
            if (d3dtx4 != null)
            {
                d3dtx4.ModifyD3DTX(dds);

                if (msv5 != null)
                {
                    msv5.mDefaultSectionChunkSize = d3dtx4.GetHeaderByteSize();
                    msv5.mAsyncSectionChunkSize   = ByteFunctions.Get2DByteArrayTotalSize(d3dtx4.mPixelData);
                }
                else if (msv6 != null)
                {
                    msv6.mDefaultSectionChunkSize = d3dtx4.GetHeaderByteSize();
                    msv6.mAsyncSectionChunkSize   = ByteFunctions.Get2DByteArrayTotalSize(d3dtx4.mPixelData);
                }
            }
            else if (d3dtx5 != null)
            {
                d3dtx5.ModifyD3DTX(dds);
            }
            else if (d3dtx6 != null)
            {
                d3dtx6.ModifyD3DTX(dds);
            }
            else if (d3dtx7 != null)
            {
                d3dtx7.ModifyD3DTX(dds);
            }
            else if (d3dtx8 != null)
            {
                d3dtx8.ModifyD3DTX(dds);
            }
            else if (d3dtx9 != null)
            {
                d3dtx9.ModifyD3DTX(dds);

                if (msv5 != null)
                {
                    msv5.mDefaultSectionChunkSize = d3dtx9.GetHeaderByteSize();
                    msv5.mAsyncSectionChunkSize   = ByteFunctions.Get2DByteArrayTotalSize(d3dtx9.mPixelData);
                }
                else if (msv6 != null)
                {
                    msv6.mDefaultSectionChunkSize = d3dtx9.GetHeaderByteSize();
                    msv6.mAsyncSectionChunkSize   = ByteFunctions.Get2DByteArrayTotalSize(d3dtx9.mPixelData);
                }
            }
        }