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


C# IO.FileSegmentGroup类代码示例

本文整理汇总了C#中Blamite.IO.FileSegmentGroup的典型用法代码示例。如果您正苦于以下问题:C# FileSegmentGroup类的具体用法?C# FileSegmentGroup怎么用?C# FileSegmentGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FileSegmentGroup类属于Blamite.IO命名空间,在下文中一共展示了FileSegmentGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ThirdGenLanguageGlobals

        public ThirdGenLanguageGlobals(StructureValueCollection values, FileSegmenter segmenter, IPointerConverter localePointerConverter, BuildInformation buildInfo)
        {
            LocaleArea = new FileSegmentGroup(localePointerConverter);

            _languages = LoadLanguages(values, segmenter, buildInfo);
            _alignment = buildInfo.SegmentAlignment;
        }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:7,代码来源:ThirdGenLanguageGlobals.cs

示例2: ReflexiveData

 public ReflexiveData(string name, uint offset, uint address, uint entrySize, uint pluginLine, FileSegmentGroup metaArea)
     : base(name, offset, address, pluginLine)
 {
     _entrySize = entrySize;
     _metaArea = metaArea;
     _expanded = true;
 }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:7,代码来源:ReflexiveData.cs

示例3: WriteReflexive

        /// <summary>
        ///     Writes data to a reflexive, reallocating the original.
        /// </summary>
        /// <param name="entries">The entries to write.</param>
        /// <param name="oldCount">The old count.</param>
        /// <param name="oldAddress">The old address.</param>
        /// <param name="newCount">The number of entries to write.</param>
        /// <param name="layout">The layout of the data to write.</param>
        /// <param name="metaArea">The meta area of the cache file.</param>
        /// <param name="allocator">The cache file's meta allocator.</param>
        /// <param name="stream">The stream to manipulate.</param>
        /// <returns>The address of the new reflexive, or 0 if the entry list is empty and the reflexive was freed.</returns>
        public static uint WriteReflexive(IEnumerable<StructureValueCollection> entries, int oldCount, uint oldAddress,
			int newCount, StructureLayout layout, FileSegmentGroup metaArea, MetaAllocator allocator, IStream stream)
        {
            if (newCount == 0)
            {
                // Free the old reflexive and return
                if (oldCount > 0 && oldAddress != 0)
                    allocator.Free(oldAddress, oldCount*layout.Size);
                return 0;
            }

            uint newAddress = oldAddress;
            if (newCount != oldCount)
            {
                // Reallocate the reflexive
                int oldSize = oldCount*layout.Size;
                int newSize = newCount*layout.Size;
                if (oldCount > 0 && oldAddress != 0)
                    newAddress = allocator.Reallocate(oldAddress, oldSize, newSize, stream);
                else
                    newAddress = allocator.Allocate(newSize, stream);
            }

            // Write the new values
            WriteReflexive(entries.Take(newCount), newAddress, layout, metaArea, stream);
            return newAddress;
        }
开发者ID:ChadSki,项目名称:Assembly,代码行数:39,代码来源:ReflexiveWriter.cs

示例4: Load

		private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
			EngineDescription buildInfo)
		{
			Name = new StringID(values.GetInteger("name stringid"));

			LoadPermutations(values, reader, metaArea, buildInfo);
		}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:7,代码来源:FourthGenModelRegion.cs

示例5: Load

        private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
        {
            ResourceIndex = new DatumIndex(values.GetInteger("resource datum index"));

            LoadRegions(values, reader, metaArea, buildInfo);
            LoadSections(values, reader, metaArea, buildInfo);
            LoadBoundingBox(values, reader, metaArea, buildInfo);
        }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:8,代码来源:ThirdGenRenderModel.cs

示例6: FourthGenResourceLayoutTable

		public FourthGenResourceLayoutTable(ITag playTag, FileSegmentGroup metaArea, MetaAllocator allocator,
			EngineDescription buildInfo)
		{
			_tag = playTag;
			_metaArea = metaArea;
			_allocator = allocator;
			_buildInfo = buildInfo;
		}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:8,代码来源:FourthGenResourceLayoutTable.cs

示例7: ReadObjects

 /// <summary>
 /// Reads all child objects of this reflexive.
 /// </summary>
 /// <param name="values">The values read from the parent.</param>
 /// <param name="reader">The stream to read from.</param>
 /// <param name="metaArea">The meta area of the cache file.</param>
 /// <param name="stringIDs">The string ID source for the cache file.</param>
 /// <param name="buildInfo">The build info for the cache file.</param>
 /// <returns>The objects that were read.</returns>
 public ScriptObject[] ReadObjects(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, StringIDSource stringIDs, BuildInformation buildInfo)
 {
     int count = (int)values.GetInteger(_countEntryName);
     uint address = (uint)values.GetInteger(_addressEntryName);
     var layout = buildInfo.GetLayout(_layoutName);
     var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);
     return entries.Select(e => ReadScriptObject(e, reader, metaArea, stringIDs, buildInfo)).ToArray();
 }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:17,代码来源:ScriptObjectReflexive.cs

示例8: Load

		private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea,
			EngineDescription buildInfo)
		{
			ModelResourceIndex = new DatumIndex(values.GetInteger("model resource datum index"));

			LoadSections(values, reader, metaArea, buildInfo);
			LoadBoundingBoxes(values, reader, metaArea, buildInfo);
		}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:8,代码来源:FourthGenScenarioBSP.cs

示例9: SegmentPointer

 private SegmentPointer(FileSegment baseSegment, FileSegmentGroup baseGroup, int baseSegmentDelta)
 {
     _baseSegment = baseSegment;
     _baseGroup = baseGroup;
     _baseSegmentDelta = baseSegmentDelta;
     _originalBaseSize = baseSegment.Size;
     _baseBottomResizes = (baseSegment.ResizeOrigin == SegmentResizeOrigin.Beginning);
 }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:8,代码来源:SegmentPointer.cs

示例10: ThirdGenLanguage

        public ThirdGenLanguage(GameLanguage language, StructureValueCollection values, FileSegmenter segmenter,
			FileSegmentGroup localeArea, EngineDescription buildInfo)
        {
            Language = language;
            _pointerLayout = buildInfo.Layouts.GetLayout("locale index table entry");
            _encryptionKey = buildInfo.LocaleKey;
            _sizeAlign = (_encryptionKey != null) ? AES.BlockSize : 1;
            Load(values, segmenter, localeArea);
        }
开发者ID:ChadSki,项目名称:Assembly,代码行数:9,代码来源:ThirdGenLanguage.cs

示例11: LoadSoundNames

		private void LoadSoundNames(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, EngineDescription buildInfo)
		{
			var count = (int)values.GetInteger("number of sound names");
			var address = values.GetInteger("sound name table address");
			var layout = buildInfo.Layouts.GetLayout("sound names");
			var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);

			SoundNames = entries.Select(e => new StringID(e.GetInteger("name index"))).ToArray();
		}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:9,代码来源:FourthGenSoundResourceGestalt.cs

示例12: Load

        private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
        {
            VertexFormat = (int)values.GetInteger("vertex format");
            ExtraElementsPerVertex = (int)values.GetInteger("extra elements per vertex");
            ExtraElementsType = (ExtraVertexElementType)values.GetInteger("extra element type");

            LoadSubmeshes(values, reader, metaArea, buildInfo);
            LoadVertexGroups(values, reader, metaArea, buildInfo, Submeshes);
        }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:9,代码来源:ThirdGenModelSection.cs

示例13: ThirdGenLanguage

 public ThirdGenLanguage(StructureValueCollection values, FileSegmenter segmenter, FileSegmentGroup localeArea, BuildInformation buildInfo)
 {
     _pointerLayout = buildInfo.GetLayout("locale index table entry");
     _encryptionKey = buildInfo.LocaleKey;
     _symbols = buildInfo.LocaleSymbols;
     _localeArea = localeArea;
     _sizeAlign = (_encryptionKey != null) ? AES.BlockSize : 1;
     Load(values, segmenter, localeArea);
 }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:9,代码来源:ThirdGenLanguage.cs

示例14: FourthGenZoneSetTable

		public FourthGenZoneSetTable(FourthGenResourceGestalt gestalt, IReader reader, FileSegmentGroup metaArea,
			MetaAllocator allocator, EngineDescription buildInfo)
		{
			_gestalt = gestalt;
			_metaArea = metaArea;
			_allocator = allocator;
			_buildInfo = buildInfo;
			Load(reader);
		}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:9,代码来源:FourthGenZoneSetTable.cs

示例15: LoadSubmeshes

        private void LoadSubmeshes(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo)
        {
            int count = (int)values.GetInteger("number of submeshes");
            uint address = values.GetInteger("submesh table address");
            var layout = buildInfo.GetLayout("model submesh");
            var entries = ReflexiveReader.ReadReflexive(reader, count, address, layout, metaArea);

            Submeshes = (from entry in entries
                         select new ThirdGenModelSubmesh(entry)).ToArray();
        }
开发者ID:iBotPeaches,项目名称:Assembly,代码行数:10,代码来源:ThirdGenModelSection.cs


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