本文整理汇总了C#中BinaryReaderEx.ReadUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryReaderEx.ReadUInt32方法的具体用法?C# BinaryReaderEx.ReadUInt32怎么用?C# BinaryReaderEx.ReadUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BinaryReaderEx
的用法示例。
在下文中一共展示了BinaryReaderEx.ReadUInt32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadData
public void LoadData(BinaryReaderEx reader)
{
reader.ReadInt32(); // Remove PWIB bytes
this.FileSize = reader.ReadUInt32(Endianness.BigEndian);
this.Unknown = reader.ReadInt32(Endianness.BigEndian);
this.DataOffset = reader.ReadUInt32(Endianness.BigEndian);
this.LoadSection(reader);
}
示例2: LoadSection
public void LoadSection(BinaryReaderEx reader)
{
this.Header = new GtexHeader();
this.Header.Magic = reader.ReadInt32();
this.Header.Unknown1 = reader.ReadByte();
this.Header.Unknown2 = reader.ReadByte();
this.Header.Format = reader.ReadByte();
this.Header.MipMapCount = reader.ReadByte();
this.Header.Unknown3 = reader.ReadByte();
this.Header.IsCubeMap = reader.ReadByte() == 0x1;
this.Header.Width = reader.ReadUInt16(Endianness.BigEndian);
this.Header.Height = reader.ReadUInt16(Endianness.BigEndian);
this.Header.Depth = reader.ReadInt16(Endianness.BigEndian);
this.Header.Unknown5 = reader.ReadInt32(Endianness.BigEndian);
this.Header.DataOffset = reader.ReadUInt32(Endianness.BigEndian);
if (this.Header.IsCubeMap) { this.NumLayers = 6; }
else { this.NumLayers = this.Header.MipMapCount; }
this.LoadMipMapData(reader);
this.GetDataOffset();
this.LoadTextureData(reader);
}
示例3: LoadMipMapData
public void LoadMipMapData(BinaryReaderEx reader)
{
this.MipMapData = new List<MipMapData>(this.Header.MipMapCount);
for (var i = 0; i < this.NumLayers; i++)
{
MipMapData mipData = new MipMapData();
mipData.Offset = reader.ReadUInt32(Endianness.BigEndian);
mipData.Length = reader.ReadInt32(Endianness.BigEndian);
this.MipMapData.Add(mipData);
}
}