Esempio n. 1
0
        public void LoadClass(VLTDataClassLoad classLoad, VLTFile vltFile)
        {
            _vltFile   = vltFile;
            _classLoad = classLoad;
            _classHash = classLoad.NameHash;

            _pointers = vltFile.GetChunk(VLTChunkId.Pointers) as VLTPointers;
            int offset = _pointers[classLoad.Pointer].OffsetDest;

            vltFile.RawStream.Seek(offset, SeekOrigin.Begin);
            BinaryReader br = new BinaryReader(vltFile.RawStream);

            _classFields = new ClassField[_classLoad.TotalFieldsCount];
            for (int i = 0; i < _classLoad.TotalFieldsCount; i++)
            {
                ClassField field = new ClassField();
                field.Read(br);

                // HACK: for hash dumping later on
                HashResolver.Resolve(field.NameHash);

                _classFields[i] = field;
            }

            _data = new ClassData(this);
        }
Esempio n. 2
0
        public void LoadClass(VLTDataClassLoad classLoad, VLTFile vltFile)
        {
            VLTClass vltClass = new VLTClass();

            vltClass.LoadClass(classLoad, vltFile);
            vltClass.VLTDatabase = this;
            _classes.Add(classLoad.NameHash, vltClass);
        }