Exemplo n.º 1
0
 public void read(BinaryReader r)
 {
     this.Count = r.ReadInt32();
     this.NLinkedDifficulties = new NLinkedDifficulty[this.Count]; for (int i = 0; i < this.Count; i++)
     {
         NLinkedDifficulty obj = new NLinkedDifficulty(); obj.read(r); this.NLinkedDifficulties[i] = obj;
     }
 }
Exemplo n.º 2
0
 public void read(EndianBinaryReader r)
 {
     Count = r.ReadInt32();
     NLinkedDifficulties = new NLinkedDifficulty[Count]; for (int i = 0; i < Count; i++)
     {
         var obj = new NLinkedDifficulty(); obj.read(r); NLinkedDifficulties[i] = obj;
     }
 }
        private void parseNLD(Song2014 xml, Sng2014File sng)
        {
            sng.NLD = new NLinkedDifficultySection();
            sng.NLD.Count = xml.NewLinkedDiff.Length;
            sng.NLD.NLinkedDifficulties = new NLinkedDifficulty[sng.NLD.Count];

            for (int i = 0; i < sng.NLD.Count; i++)
            {
                var nld = xml.NewLinkedDiff[i];
                var n = new NLinkedDifficulty();
                // TODO: Ratio attribute unused?
                n.LevelBreak = nld.LevelBreak;
                n.PhraseCount = nld.PhraseCount;
                n.NLD_Phrase = new Int32[n.PhraseCount];
                for (int j = 0; j < n.PhraseCount; j++)
                {
                    n.NLD_Phrase[j] = nld.Nld_phrase[j].Id;
                }
                sng.NLD.NLinkedDifficulties[i] = n;
            }
        }
 public void read(EndianBinaryReader r)
 {
     Count = r.ReadInt32();
     NLinkedDifficulties = new NLinkedDifficulty[Count]; for (int i = 0; i < Count; i++) { var obj = new NLinkedDifficulty(); obj.read(r); NLinkedDifficulties[i] = obj; }
 }
        private void parseNLD(Song2014 xml, Sng2014File sng)
        {
            sng.NLD = new NLinkedDifficultySection();
            // fix for 'Object reference not set to an instance of an object' error
            if (xml.NewLinkedDiff == null)
                sng.NLD.Count = 0; // TODO: throw error here to reauthor in EOF
            else
                sng.NLD.Count = xml.NewLinkedDiff.Length;

            sng.NLD.NLinkedDifficulties = new NLinkedDifficulty[sng.NLD.Count];

            for (int i = 0; i < sng.NLD.Count; i++)
            {
                var nld = xml.NewLinkedDiff[i];
                var n = new NLinkedDifficulty();
                // TODO: Ratio attribute unused?
                n.LevelBreak = nld.LevelBreak;
                n.PhraseCount = nld.PhraseCount;
                n.NLD_Phrase = new Int32[n.PhraseCount];
                for (int j = 0; j < n.PhraseCount; j++)
                {
                    n.NLD_Phrase[j] = nld.Nld_phrase[j].Id;
                }
                sng.NLD.NLinkedDifficulties[i] = n;
            }
        }
 public void read(BinaryReader r)
 {
     this.Count = r.ReadInt32();
     this.NLinkedDifficulties = new NLinkedDifficulty[this.Count]; for (int i=0; i<this.Count; i++) { NLinkedDifficulty obj = new NLinkedDifficulty(); obj.read(r); this.NLinkedDifficulties[i] = obj; }
 }