Exemplo n.º 1
0
        internal override void Read(BinaryReaderEx br)
        {
            br.BigEndian = false;
            br.AssertASCII("NVMA");
            Version = br.ReadEnum32 <NVAVersion>();
            br.ReadUInt32();                                             // File size
            br.AssertInt32(Version == NVAVersion.OldBloodborne ? 8 : 9); // Section count

            Navmeshes = new NavmeshSection(br);
            Entries1  = new Section1(br);
            Entries2  = new Section2(br);
            new Section3(br);
            Connectors = new ConnectorSection(br);
            var connectorPoints     = new ConnectorPointSection(br);
            var connectorConditions = new ConnectorConditionSection(br);

            Entries7 = new Section7(br);
            if (Version == NVAVersion.OldBloodborne)
            {
                Entries8 = new Section8(1);
            }
            else
            {
                Entries8 = new Section8(br);
            }

            foreach (Connector connector in Connectors)
            {
                connector.TakePointsAndConds(connectorPoints, connectorConditions);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates an empty NVA formatted for DS3.
 /// </summary>
 public NVA()
 {
     Version    = NVAVersion.DarkSouls3;
     Navmeshes  = new NavmeshSection(2);
     Entries1   = new Section1();
     Entries2   = new Section2();
     Connectors = new ConnectorSection();
     Entries7   = new Section7();
     Entries8   = new Section8(1);
 }
Exemplo n.º 3
0
 public static Section8 NextSection(this Section8 section, int length)
 => checked (new Section8((byte)section.NextIndex, (byte)length));