internal static uint GetBlockHeight(Texture texture) { if (FormatList.ContainsKey(texture.Format)) { return(FormatList[texture.Format].BlockHeight); } return(0); }
internal static uint GetBytesPerPixel(Texture texture) { if (FormatList.ContainsKey(texture.Format)) { return(FormatList[texture.Format].BytesPerPixel); } return(0); }
public void Read(FileReader reader) { byte format = reader.ReadByte(); Padding = reader.ReadByte(); Width = reader.ReadUInt16(); Height = reader.ReadUInt16(); reader.ReadBytes(26); if (!FormatList.ContainsKey(format)) { throw new Exception($"Unknown textue format! {format}"); } Format = FormatList[format]; var size = Decode_Gamecube.GetDataSize(Format, Width, Height); ImageData = reader.ReadBytes(size); }