本文整理汇总了C#中EndianBinaryReader.ReadUInt32s方法的典型用法代码示例。如果您正苦于以下问题:C# EndianBinaryReader.ReadUInt32s方法的具体用法?C# EndianBinaryReader.ReadUInt32s怎么用?C# EndianBinaryReader.ReadUInt32s使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EndianBinaryReader
的用法示例。
在下文中一共展示了EndianBinaryReader.ReadUInt32s方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: wnd1
public wnd1(EndianBinaryReader er)
: base(er)
{
long basepos = er.BaseStream.Position - 0x4C;
InflationLeft = er.ReadUInt16() / 16f;
InflationRight = er.ReadUInt16() / 16f;
InflationTop = er.ReadUInt16() / 16f;
InflationBottom = er.ReadUInt16() / 16f;
FrameSizeLeft = er.ReadUInt16();
FrameSizeRight = er.ReadUInt16();
FrameSizeTop = er.ReadUInt16();
FrameSizeBottom = er.ReadUInt16();
NrFrames = er.ReadByte();
byte tmp = er.ReadByte();
UseLTMaterial = (tmp & 1) == 1;
UseVtxColorForAllWindow = (tmp & 2) == 2;
Kind = (WindowKind)((tmp >> 2) & 3);
DontDrawContent = (tmp & 8) == 16;
Padding = er.ReadUInt16();
ContentOffset = er.ReadUInt32();
FrameOffsetTableOffset = er.ReadUInt32();
er.BaseStream.Position = basepos + ContentOffset;
Content = new WindowContent(er);
er.BaseStream.Position = basepos + FrameOffsetTableOffset;
WindowFrameOffsets = er.ReadUInt32s(NrFrames);
WindowFrames = new WindowFrame[NrFrames];
for (int i = 0; i < NrFrames; i++)
{
er.BaseStream.Position = basepos + WindowFrameOffsets[i];
WindowFrames[i] = new WindowFrame(er);
}
er.BaseStream.Position = basepos + SectionSize;
}
示例2: mat1
public mat1(EndianBinaryReader er)
{
long startpos = er.BaseStream.Position;
Signature = er.ReadString(Encoding.ASCII, 4);
if (Signature != "mat1") throw new SignatureNotCorrectException(Signature, "mat1", er.BaseStream.Position - 4);
SectionSize = er.ReadUInt32();
NrMaterials = er.ReadUInt32();
MaterialEntryOffsets = er.ReadUInt32s((int)NrMaterials);
Materials = new MaterialEntry[NrMaterials];
for (int i = 0; i < NrMaterials; i++)
{
er.BaseStream.Position = startpos + MaterialEntryOffsets[i];
Materials[i] = new MaterialEntry(er);
}
er.BaseStream.Position = startpos + SectionSize;
}
示例3: GraphicsAnimationGroup
public GraphicsAnimationGroup(EndianBinaryReader er)
{
Type = er.ReadUInt32();
Flags = (GraphicsAnimGroupFlags)er.ReadUInt32();
NameOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
MemberType = (GraphicsMemberType)er.ReadUInt32();
NrMembers = er.ReadUInt32();
MemberInfoDICTOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
NrBlendOperations = er.ReadUInt32();
BlendOperationArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
EvaluationTiming = (AnimGroupEvaluationTiming)er.ReadUInt32();
long curpos = er.BaseStream.Position;
er.BaseStream.Position = NameOffset;
Name = er.ReadStringNT(Encoding.ASCII);
er.BaseStream.Position = MemberInfoDICTOffset;
MemberInfoDICT = new DICT(er);
er.BaseStream.Position = BlendOperationArrayOffset;
BlendOperations = er.ReadUInt32s((int)NrBlendOperations);
AnimationGroupMembers = new AnimationGroupMember[NrMembers];
for (int i = 0; i < NrMembers; i++)
{
er.BaseStream.Position = MemberInfoDICT[i].DataOffset;
AnimationGroupMembers[i] = AnimationGroupMember.FromStream(er);
}
er.BaseStream.Position = curpos;
}
示例4: Primitive
public Primitive(EndianBinaryReader er)
{
NrIndexStreams = er.ReadUInt32();
IndexStreamOffsetsArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
NrBufferObjects = er.ReadUInt32();
BufferObjectArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
Flags = er.ReadUInt32();
CommandAllocator = er.ReadUInt32();
long curpos = er.BaseStream.Position;
er.BaseStream.Position = IndexStreamOffsetsArrayOffset;
IndexStreamOffsets = new uint[NrIndexStreams];
for (int i = 0; i < NrIndexStreams; i++)
{
IndexStreamOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
}
er.BaseStream.Position = BufferObjectArrayOffset;
BufferObjects = er.ReadUInt32s((int)NrBufferObjects);
IndexStreams = new IndexStreamCtr[NrIndexStreams];
for (int i = 0; i < NrIndexStreams; i++)
{
er.BaseStream.Position = IndexStreamOffsets[i];
IndexStreams[i] = new IndexStreamCtr(er);
}
}
示例5: PrimitiveSet
public PrimitiveSet(EndianBinaryReader er)
{
NrRelatedBones = er.ReadUInt32();
RelatedBonesArrayOffset = er.ReadUInt32();
if (RelatedBonesArrayOffset != 0) RelatedBonesArrayOffset += (UInt32)er.BaseStream.Position - 4;
SkinningMode = er.ReadUInt32();
NrPrimitives = er.ReadUInt32();
PrimitiveOffsetsArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
long curpos = er.BaseStream.Position;
if (RelatedBonesArrayOffset != 0)
{
er.BaseStream.Position = RelatedBonesArrayOffset;
RelatedBones = er.ReadUInt32s((int)NrRelatedBones);
}
er.BaseStream.Position = PrimitiveOffsetsArrayOffset;
PrimitiveOffsets = new uint[NrPrimitives];
for (int i = 0; i < NrPrimitives; i++)
{
PrimitiveOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
}
Primitives = new Primitive[NrPrimitives];
for (int i = 0; i < NrPrimitives; i++)
{
er.BaseStream.Position = PrimitiveOffsets[i];
Primitives[i] = new Primitive(er);
}
}