Beispiel #1
0
        public override bool Equals(Object data)
        {
            LDODataEntry de = (LDODataEntry)data;

            if (de.m_data == m_data)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 public void WriteData00AL(BinaryWriter bw)
 {
     Console.WriteLine(al.Count);
     for (int i = al.Count - 1; i >= 0; --i)
     {
         //Console.WriteLine(i);
         LDODataEntry temp = (LDODataEntry)al[i];
         //int secnum = (m_data[i].m_secnum | (m_data[i].m_count << 8));
         //Console.WriteLine(temp.m_newcount);
         bw.Write(temp.m_data);
     }
 }
Beispiel #3
0
        public void ReadData00(BinaryReader br, int htindex)
        {
            //uint n;
            byte[] currentmvid;

            if (m_mvid == null)
            {
                m_mvid = br.ReadBytes(16);
            }
            else
            {
                currentmvid = br.ReadBytes(16);

                if (CompArray(m_mvid, currentmvid) == false)
                {
                    throw new Exception("MVID Mismatch");
                }
            }

            long length = br.BaseStream.Length;

            length = length - 24;
            length = length / 4;

            LDODataEntry current;

            //while ((n = br.ReadUInt32()) != 0xFFFFFFFF)
            for (long i = 0; i < length; i++)
            {
                current             = new LDODataEntry();
                current.m_fileindex = htindex;
                current.m_data      = br.ReadUInt32();
                current.m_id        = m_id++;

                if (m_rawdata[htindex].Contains(current))
                {
                    //m_rawdata[htindex][current] = ((int)m_rawdata[htindex][current])+1;
                }
                else
                {
                    m_rawdata[htindex].Add(current);
                }
            }
        }
Beispiel #4
0
        private void InsertInPosition(ref LDODataEntry[] sl, LDODataEntry d)
        {
            int i = 0;

            while ((sl[i] != null) &&
                   (sl[i].m_newcount >= d.m_newcount))
            {
                i++;
            }
            int count = i;

            while (sl[count] != null)
            {
                count++;
            }

            for (int j = count; j > i; j--)
            {
                sl[j] = sl[j - 1];
            }

            sl[i] = d;
        }