public Byte[][] FLIMSheets; //纹理是swizzle过的,swizzle参数为纹理编号 * 2 ,需要用TexConv2转换 public TGLP(EndianBinaryReader er) { Signature = er.ReadString(Encoding.ASCII, 4); SectionSize = er.ReadUInt32(); CellWidth = er.ReadByte(); //实际为CellWidth += 1 CellHeight = er.ReadByte(); //实际为CellHeight += 1 FLIMNums = er.ReadByte(); //纹理数量 MaxCharWidth = er.ReadByte(); FLIMSize = er.ReadUInt32(); //纹理大小 Ascent = er.ReadUInt16(); FLIMFormat = er.ReadByte(); //纹理压缩格式 SheetNrRows = er.ReadUInt16(); //横向tile数 (FLIMWidth / (CellWidth)) SheetNrLines = er.ReadUInt16(); //纵向tile数(FLIMHeight / (CellHeight)) FLIMWidth = er.ReadUInt16(); //纹理宽度 FLIMHeight = er.ReadUInt16(); //纹理高度 FLIMDataOffset = er.ReadUInt32(); //纹理起始地址 er.BaseStream.Position = FLIMDataOffset; FLIMSheets = new byte[FLIMNums][]; for (int i = 0; i < FLIMNums; i++) { FLIMSheets[i] = er.ReadBytes((int)FLIMSize); } }
public UInt32 CMAPOffset; //第一个CMAP的起始地址 public FINF(EndianBinaryReader er) { Signature = er.ReadString(System.Text.Encoding.ASCII, 4); //FINF SectionSize = er.ReadUInt32(); FontType = er.ReadByte(); //01 LineFeed = er.ReadByte(); //28 Width = er.ReadByte(); Ascent = er.ReadByte(); Padding = er.ReadByte(); Height = er.ReadByte(); AlterCharIndex = er.ReadUInt16(); DefaultWidth = new CharWidthInfo(er); Encoding = er.ReadByte(); TGLPOffset = er.ReadUInt32(); CWDHOffset = er.ReadUInt32(); CMAPOffset = er.ReadUInt32(); }