本文整理汇总了C#中ResourceDataReader.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# ResourceDataReader.ReadBytes方法的具体用法?C# ResourceDataReader.ReadBytes怎么用?C# ResourceDataReader.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResourceDataReader
的用法示例。
在下文中一共展示了ResourceDataReader.ReadBytes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
this.Unknown_0h = reader.ReadUInt32();
this.len1 = reader.ReadUInt32();
this.len2 = reader.ReadUInt32();
this.len3 = reader.ReadUInt16();
this.Unknown_Eh = reader.ReadUInt16();
this.Data1 = reader.ReadBytes((int)len1);
this.Data2 = reader.ReadBytes((int)len2);
this.Data3 = reader.ReadBytes((int)len3);
}
示例2: Read
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
reader.Endianess = RageLib.Data.Endianess.BigEndian;
this.DataLength = reader.ReadUInt32();
reader.Endianess = RageLib.Data.Endianess.LittleEndian;
this.Data = reader.ReadBytes((int)DataLength);
}
示例3: Read
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
this.Unknown_0h = reader.ReadUInt32();
this.DataLength = reader.ReadUInt32();
this.Unknown_8h = reader.ReadUInt32();
this.Unknown_Ch = reader.ReadUInt32();
this.Unknown_10h = reader.ReadUInt32();
this.Unknown_14h = reader.ReadUInt32();
this.Unknown_18h = reader.ReadUInt32();
this.Unknown_1Ch = reader.ReadUInt32();
this.Data = reader.ReadBytes((int)DataLength);
}
示例4: Read
public override void Read(ResourceDataReader reader, params object[] parameters)
{
int cnt = Convert.ToInt32(parameters[0]);
Data = reader.ReadBytes(16 * cnt);
}
示例5: Read
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
uint format = Convert.ToUInt32(parameters[0]);
int Width = Convert.ToInt32(parameters[1]);
int Height = Convert.ToInt32(parameters[2]);
int Levels = Convert.ToInt32(parameters[3]);
int Stride = Convert.ToInt32(parameters[4]);
//Data = new List<byte[]>();
//int length = Stride * Height;
//for (int i = 0; i < Levels; i++)
//{
// var buf = reader.ReadBytes(length);
// Data.Add(buf);
// length /= 4;
//}
int fullLength = 0;
int length = Stride * Height;
for (int i = 0; i < Levels; i++)
{
fullLength += length;
length /= 4;
}
FullData = reader.ReadBytes(fullLength);
}