KFreonLib.Textures.ME2Texture2D.ChangeTexFormat C# (CSharp) Method

ChangeTexFormat() public method

public ChangeTexFormat ( string newFormat, ME2PCCObject pcc ) : void
newFormat string
pcc KFreonLib.PCCObjects.ME2PCCObject
return void
        public void ChangeTexFormat(string newFormat, ME2PCCObject pcc)
        {
            SaltPropertyReader.Property prop = properties["Format"];
            Int64 formatID = pcc.AddName(newFormat);
            byte[] buff = BitConverter.GetBytes(formatID);
            Buffer.BlockCopy(buff, 0, prop.raw, 24, sizeof(Int64));
            prop.Value.StringValue = pcc.Names[(int)formatID];
            properties["Format"] = prop;
            texFormat = Textures.Methods.ParseFormat(properties["Format"].Value.StringValue);
        }