当前位置: 首页>>代码示例>>C#>>正文


C# BinaryReader.ReadStructs方法代码示例

本文整理汇总了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);
        }
开发者ID:grofit,项目名称:Infinity,代码行数:7,代码来源:TISPlugin.cs

示例2: ReadDoors

 private IList<WEDDoor> ReadDoors(BinaryReader reader, WEDDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.DoorOffset, SeekOrigin.Begin);
     return reader.ReadStructs<WEDDoor>(descriptor.DoorCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:WEDPlugin.cs

示例3: ReadContainers

 private IList<AREContainer> ReadContainers(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ContainerOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREContainer>(descriptor.ContainerCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例4: ReadAutomapNotes

 private IList<AREAutomapNote> ReadAutomapNotes(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AutomapNoteOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAutomapNote>(descriptor.AutomapNoteCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例5: ReadAnimations

 private IList<AREAnimation> ReadAnimations(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AnimationOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAnimation>(descriptor.AnimationCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例6: ReadAmbients

 private IList<AREAmbient> ReadAmbients(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AmbientSoundOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAmbient>(descriptor.AmbientSoundCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例7: ReadVertices

 private IList<AREPoint> ReadVertices(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.VerticeOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREPoint>(descriptor.VerticeCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例8: ReadSpawnPoints

 private IList<ARESpawnPoint> ReadSpawnPoints(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.SpawnPointOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARESpawnPoint>(descriptor.SpawnPointCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例9: ReadTiledObjects

 private IList<ARETiledObject> ReadTiledObjects(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.TiledObjectOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARETiledObject>(descriptor.TiledObjectCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例10: ReadRestInterruptions

 private IList<ARERestInterruption> ReadRestInterruptions(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.RestInterruptionOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARERestInterruption>(1);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例11: ReadSongEntries

 private IList<ARESongEntry> ReadSongEntries(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.SongEntryOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARESongEntry>(1);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例12: ReadProjectileTraps

 private IList<AREProjectileTrap> ReadProjectileTraps(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ProjectileTrapOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREProjectileTrap>(descriptor.ProjectileTrapCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例13: ReadItems

 private IList<AREItem> ReadItems(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ItemOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREItem>(descriptor.ItemCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例14: ReadEntrances

 private IList<AREEntrance> ReadEntrances(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.EntranceOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREEntrance>(descriptor.EntranceCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:AREPlugin.cs

示例15: ReadOverlays

 private IList<WEDOverlay> ReadOverlays(BinaryReader reader, WEDDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.OverlayOffset, SeekOrigin.Begin);
     return reader.ReadStructs<WEDOverlay>(descriptor.OverlayCount);
 }
开发者ID:grofit,项目名称:Infinity,代码行数:5,代码来源:WEDPlugin.cs


注:本文中的System.IO.BinaryReader.ReadStructs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。