本文整理汇总了C#中System.IO.BinaryReader.ReadStructs方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryReader.ReadStructs方法的具体用法?C# BinaryReader.ReadStructs怎么用?C# BinaryReader.ReadStructs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryReader
的用法示例。
在下文中一共展示了BinaryReader.ReadStructs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadTile
private TISTile ReadTile(BinaryReader reader, TISDescriptor descriptor)
{
var palette = reader.ReadStructs<TISColour>(256);
var pixels = reader.ReadBytes(descriptor.TileDimensions * 2);
return new TISTile(palette, pixels, descriptor.TileDimensions);
}
示例2: ReadDoors
private IList<WEDDoor> ReadDoors(BinaryReader reader, WEDDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.DoorOffset, SeekOrigin.Begin);
return reader.ReadStructs<WEDDoor>(descriptor.DoorCount);
}
示例3: ReadContainers
private IList<AREContainer> ReadContainers(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.ContainerOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREContainer>(descriptor.ContainerCount);
}
示例4: ReadAutomapNotes
private IList<AREAutomapNote> ReadAutomapNotes(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.AutomapNoteOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREAutomapNote>(descriptor.AutomapNoteCount);
}
示例5: ReadAnimations
private IList<AREAnimation> ReadAnimations(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.AnimationOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREAnimation>(descriptor.AnimationCount);
}
示例6: ReadAmbients
private IList<AREAmbient> ReadAmbients(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.AmbientSoundOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREAmbient>(descriptor.AmbientSoundCount);
}
示例7: ReadVertices
private IList<AREPoint> ReadVertices(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.VerticeOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREPoint>(descriptor.VerticeCount);
}
示例8: ReadSpawnPoints
private IList<ARESpawnPoint> ReadSpawnPoints(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.SpawnPointOffset, SeekOrigin.Begin);
return reader.ReadStructs<ARESpawnPoint>(descriptor.SpawnPointCount);
}
示例9: ReadTiledObjects
private IList<ARETiledObject> ReadTiledObjects(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.TiledObjectOffset, SeekOrigin.Begin);
return reader.ReadStructs<ARETiledObject>(descriptor.TiledObjectCount);
}
示例10: ReadRestInterruptions
private IList<ARERestInterruption> ReadRestInterruptions(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.RestInterruptionOffset, SeekOrigin.Begin);
return reader.ReadStructs<ARERestInterruption>(1);
}
示例11: ReadSongEntries
private IList<ARESongEntry> ReadSongEntries(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.SongEntryOffset, SeekOrigin.Begin);
return reader.ReadStructs<ARESongEntry>(1);
}
示例12: ReadProjectileTraps
private IList<AREProjectileTrap> ReadProjectileTraps(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.ProjectileTrapOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREProjectileTrap>(descriptor.ProjectileTrapCount);
}
示例13: ReadItems
private IList<AREItem> ReadItems(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.ItemOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREItem>(descriptor.ItemCount);
}
示例14: ReadEntrances
private IList<AREEntrance> ReadEntrances(BinaryReader reader, AREDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.EntranceOffset, SeekOrigin.Begin);
return reader.ReadStructs<AREEntrance>(descriptor.EntranceCount);
}
示例15: ReadOverlays
private IList<WEDOverlay> ReadOverlays(BinaryReader reader, WEDDescriptor descriptor)
{
reader.BaseStream.Seek(descriptor.OverlayOffset, SeekOrigin.Begin);
return reader.ReadStructs<WEDOverlay>(descriptor.OverlayCount);
}