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


C# Chunk.GetStream方法代码示例

本文整理汇总了C#中Chunk.GetStream方法的典型用法代码示例。如果您正苦于以下问题:C# Chunk.GetStream方法的具体用法?C# Chunk.GetStream怎么用?C# Chunk.GetStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chunk的用法示例。


在下文中一共展示了Chunk.GetStream方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MapChunk

        public MapChunk(ADT adt, Chunk chunk)
        {
            ADT = adt;
            Source = chunk;
            var stream = chunk.GetStream();
            Header = new MapChunkHeader();
            Header.Read(stream);

            stream.Seek(chunk.Offset, SeekOrigin.Begin);
            GenerateVertices(stream);
        }
开发者ID:Bia10,项目名称:meshReader,代码行数:11,代码来源:MapChunk.cs

示例2: MapChunk

        public MapChunk(ADT adt, Chunk chunk, bool isObj0 = false)
        {
            ADT = adt;
            Chunk = chunk;

            var stream = chunk.GetStream();
            if (adt.Type == ADTType.Normal)
            {
                MCNK = new MCNK(chunk);
                Holes = MCNK.Flags.HasFlag(MCNK.MCNKFlags.HighResolutionHoles) ? HighResHoles : TransformToHighRes(MCNK.Holes);

                stream.Seek(chunk.Offset + MCNK.ChunkHeaderSize, SeekOrigin.Begin);
                SubData = new ChunkData(stream, chunk.Size - MCNK.ChunkHeaderSize);
            }
            else
                SubData = new ChunkData(stream, chunk.Size);

            Read();
        }
开发者ID:aeo24,项目名称:WoWMap,代码行数:19,代码来源:MapChunk.cs

示例3: ReadDoodadDefinitions

        private void ReadDoodadDefinitions(Chunk c)
        {
            int count = (int)c.Length/36;
            _definitions = new List<DoodadDefinition>(count);

            var stream = c.GetStream();
            for (int i = 0; i < count; i++)
            {
                var def = new DoodadDefinition();
                def.Read(stream);
                _definitions.Add(def);
            }
        }
开发者ID:Bia10,项目名称:meshReader,代码行数:13,代码来源:DoodadHandler.cs

示例4: ReadDoodadPaths

 // TODO: this is so fucking idiotic because data and id share the same stream
 private void ReadDoodadPaths(Chunk id, Chunk data)
 {
     int paths = (int)id.Length/4;
     _paths = new List<string>(paths);
     for (int i = 0; i < paths; i++)
     {
         var r = new BinaryReader(id.GetStream());
         r.BaseStream.Seek(i*4, SeekOrigin.Current);
         uint offset = r.ReadUInt32();
         var dataStream = data.GetStream();
         dataStream.Seek(offset + data.Offset, SeekOrigin.Begin);
         _paths.Add(dataStream.ReadCString());
     }
 }
开发者ID:Bia10,项目名称:meshReader,代码行数:15,代码来源:DoodadHandler.cs


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