예제 #1
0
        public override void Load(Stream stream)
        {
            KOARBinaryReader br = new KOARBinaryReader(stream);

            _fileIDs      = new List <uint>();
            _symbol_names = new List <string>();
            _name_hashes  = new List <uint>();

            var count = br.ReadInt();

            Int32 char_array_offset = 8 + count * 12;

            for (int i = 0; i < count; i++)
            {
                _fileIDs.Add(br.ReadUInt());

                Int32 str_start = br.ReadInt();
                Int32 str_end   = br.ReadInt();

                br.SavePosition();
                br.SetOffset(char_array_offset + str_start);

                string s = br.ReadString(str_end - str_start);

                _symbol_names.Add(s);
                _name_hashes.Add(Utils.SH(s));

                br.LoadPosition();
            }

            br.Close();
        }