Inheritance: INavigable
Example #1
0
        public override void Load(BinaryReaderEx reader)
        {
            base.Load(reader);

            SectionLength = reader.ReadInt32(Endianness.BigEndian);
            reader.BaseStream.Seek(12, System.IO.SeekOrigin.Current);

            SpuBasePosition = reader.BaseStream.Position;

            NumSections = reader.ReadInt16();
            NumBones    = reader.ReadInt16();

            reader.BaseStream.Seek(12, System.IO.SeekOrigin.Current);

            this.Sections = new List <SpuSectionData>();
            for (var i = 0; i < NumSections; i++)
            {
                SpuSectionData sectionData = new SpuSectionData();
                sectionData.Parent = this;
                this.Sections.Add(sectionData);
                this.Children.Add(sectionData);
                sectionData.Load(reader, i);
            }

            for (var i = 0; i < NumSections; i++)
            {
                var section = this.Sections[i];
                reader.BaseStream.Position = SpuBasePosition + section.Offset;
                section.LoadChunks(reader);
            }

            SpuCurveLoader.LoadCurves(reader, this);
        }
Example #2
0
        public override void Load(BinaryReaderEx reader)
        {
            base.Load(reader);

            SectionLength = reader.ReadInt32(Endianness.BigEndian);
            reader.BaseStream.Seek(12, System.IO.SeekOrigin.Current);

            SpuBasePosition = reader.BaseStream.Position;

            NumSections = reader.ReadInt16();
            NumBones = reader.ReadInt16();

            reader.BaseStream.Seek(12, System.IO.SeekOrigin.Current);

            this.Sections = new List<SpuSectionData>();
            for (var i = 0; i < NumSections; i++)
            {
                SpuSectionData sectionData = new SpuSectionData();
                sectionData.Parent = this;
                this.Sections.Add(sectionData);
                this.Children.Add(sectionData);
                sectionData.Load(reader, i);
            }

            for (var i = 0; i < NumSections; i++)
            {
                var section = this.Sections[i];
                reader.BaseStream.Position = SpuBasePosition + section.Offset;
                section.LoadChunks(reader);
            }

            SpuCurveLoader.LoadCurves(reader, this);
        }