Example #1
0
        public Entry(ref FileBase file)
        {
            mTable   = new Dictionary <string, uint>();
            mEntries = new List <TableEntry>();

            int size = file.ReadInt32();

            file.Skip(0x8);
            int  loc   = file.Position();
            uint count = file.ReadUInt32();

            for (int i = 0; i < count; i++)
            {
                TableEntry e = new TableEntry();
                e.mIsValid = file.ReadUInt32();
                e.mPtr     = file.ReadInt32();

                mEntries.Add(e);

                if (e.mIsValid == 1)
                {
                    string str = file.ReadStringAt(loc + e.mPtr);
                    uint   val = file.ReadUInt32At(loc + e.mPtr + str.Length + 1);
                    mTable.Add(str, val);
                }
            }

            file.Seek(loc + size);

            while ((file.Position() % 0x10) != 0)
            {
                file.Skip(0x1);
            }
        }