當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。