private void LoadSegments(StructureValueCollection values, IReader reader, FileSegmentGroup metaArea, BuildInformation buildInfo, ThirdGenResourcePage[] pages)
        {
            int count = (int)values.GetInteger("number of raw segments");
            uint address = values.GetInteger("raw segment table address");
            var layout = buildInfo.GetLayout("raw segment table entry");
            var entries = ReflexiveReader.ReadReflexive(count, address, reader, layout, metaArea);

            Segments = (from entry in entries
                        select new ThirdGenResourceSegment(entry, pages)).ToArray();
        }
        private void Load(StructureValueCollection values, ThirdGenResourcePage[] pages)
        {
            int primaryIndex = (int)values.GetInteger("primary page index");
            if (primaryIndex >= 0)
                PrimaryPage = pages[primaryIndex];

            int secondaryIndex = (int)values.GetInteger("secondary page index");
            if (secondaryIndex >= 0)
                SecondaryPage = pages[secondaryIndex];

            PrimaryOffset = (int)values.GetInteger("primary offset");
            SecondaryOffset = (int)values.GetInteger("secondary offset");
        }
 public ThirdGenResourceSegment(StructureValueCollection values, ThirdGenResourcePage[] pages)
 {
     Load(values, pages);
 }