Exemplo n.º 1
0
        private void LoadResources(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, ThirdGenTagTable tags, ThirdGenResourceLayoutTable layoutInfo)
        {
            int count = (int)values.GetInteger("number of resources");
            uint address = values.GetInteger("resource table address");
            var layout = buildInfo.GetLayout("resource table entry");
            var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);

            _resources = new ThirdGenResource[entries.Length];
            for (ushort i = 0; i < entries.Length; i++)
                _resources[i] = new ThirdGenResource(entries[i], i, tags, layoutInfo);
        }
Exemplo n.º 2
0
        private void Load(StructureValueCollection values, ushort index, ThirdGenTagTable tags, ThirdGenResourceLayoutTable layoutInfo)
        {
            Index = new DatumIndex((ushort)values.GetInteger("datum index salt"), index);

            DatumIndex tagIndex = new DatumIndex(values.GetInteger("parent tag datum index"));
            if (tagIndex.IsValid)
                ParentTag = tags[tagIndex.Index];

            int segmentIndex = (int)values.GetInteger("segment index");
            if (segmentIndex >= 0 && segmentIndex < layoutInfo.Segments.Length)
                _segment = layoutInfo.Segments[segmentIndex];
        }
Exemplo n.º 3
0
		private void LoadTags(IReader reader)
		{
			if (_header.IndexHeaderLocation == null)
			{
				_tags = new ThirdGenTagTable();
				return;
			}

			_tags = new ThirdGenTagTable(reader, _header.IndexHeaderLocation, _header.MetaArea, Allocator, _buildInfo);
			_resourceMetaLoader = new ThirdGenResourceMetaLoader(_buildInfo, _header.MetaArea);
		}
Exemplo n.º 4
0
 private void Load(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, ThirdGenTagTable tags, ThirdGenResourceLayoutTable layoutInfo)
 {
     LoadResources(values, reader, metaArea, buildInfo, tags, layoutInfo);
 }
Exemplo n.º 5
0
 public ThirdGenResource(StructureValueCollection values, ushort index, ThirdGenTagTable tags, ThirdGenResourceLayoutTable layoutInfo)
 {
     Load(values, index, tags, layoutInfo);
 }
Exemplo n.º 6
0
        private void LoadTags(IReader reader)
        {
            if (_header.IndexHeaderLocation == null)
            {
                _tags = new ThirdGenTagTable();
                return;
            }

            reader.SeekTo(_header.IndexHeaderLocation.AsOffset());
            StructureValueCollection values = StructureReader.ReadStructure(reader, _buildInfo.GetLayout("index header"));
            _tags = new ThirdGenTagTable(reader, values, _header.MetaArea, _buildInfo);

            _resourceMetaLoader = new ThirdGenResourceMetaLoader(_buildInfo, _header.MetaArea);
        }