Exemple #1
0
 public TBRMNode(int numEntries)
 {
     unk0 = 1;
     unk1 = 0;
     unk2 = 0;
     while (NumEntries < numEntries)
     {
         EntryList.Add(0);
     }
 }
Exemple #2
0
 public TBLVNode(int numEntries)
 {
     unk0 = 1;
     unk1 = 0;
     unk2 = 0;
     while (EntryList.Count < numEntries)
     {
         EntryList.Add(0);
     }
 }
        public override void Parse(VoidPtr address)
        {
            //Initialize lists
            _extraEntries = new List <MovesetEntry>();
            _articles     = new SortedList <int, MovesetEntry>();
            _subActions   = new BindingList <SubActionEntry>();

            //Set header values
            DataHeader *h = (DataHeader *)address; _hdr = *h;

            _unk27  = _hdr.Unknown27;
            _unk28  = _hdr.Unknown28;
            _flags1 = _hdr.Flags1;
            _flags2 = _hdr.Flags2;

            bint *v = (bint *)address;

            int[] sizes = MovesetFile.CalculateSizes(_root._dataSize, v, 27, true);
            ParseScripts(v, sizes);

            //Parse all data entries.
            //If an offset is 0 (except for the attributes), the entry will be set to null.
            _modelVis         = Parse <ModelVisibility>(v[1]);
            _attributes       = Parse <AttributeList>(v[2], "Attributes");
            _sseAttributes    = Parse <AttributeList>(v[3]);
            _misc             = Parse <Miscellaneous>(v[4]);
            _unknown7         = Parse <EntryList <Unknown7Entry> >(v[7], 8);
            _actionInterrupts = Parse <ActionInterrupts>(v[8]);
            _actionPre        = Parse <EntryList <ActionPre> >(v[11], 4);
            _anchoredItems    = Parse <EntryList <ItemAnchor> >(v[16], sItemAnchor.Size);
            _gooeyBomb        = Parse <EntryList <ItemAnchor> >(v[17], sItemAnchor.Size);
            _boneRef1         = Parse <EntryList <BoneIndexValue> >(v[18], 4, sizes[18] / 4);
            _boneRef2         = Parse <BoneReferences2>(v[19]);
            _entryOverrides   = Parse <ActionOverrideList>(v[20]);
            _exitOverrides    = Parse <ActionOverrideList>(v[21]);
            _unknown22        = Parse <Unknown22>(v[22]);
            _boneFloats3      = Parse <EntryList <ItemAnchor> >(v[23], sItemAnchor.Size + 4);
            _unknown24        = Parse <Unknown24>(v[24]);

            //Parse extra offsets specific to this character
            OffsetHolder o = ExtraDataOffsets.GetOffsets(_root.Character);

            if (o != null)
            {
                o.Parse(this, address + DataHeader.Size);
            }

            int u = 0;

            foreach (ArticleEntry e in _articles.Values)
            {
                e._index = u++;
            }
        }
Exemple #4
0
        public override bool OnInitialize()
        {
            unk0 = Header->_unk0;
            unk1 = Header->_unk1;
            unk2 = Header->_unk2;
            for (int i = 0; i < WorkingUncompressed.Length - EntryOffset; i += 4)
            {
                EntryList.Add(((byte *)Header->Entries)[i + 3]);
                EntryList.Add(((byte *)Header->Entries)[i + 2]);
                EntryList.Add(((byte *)Header->Entries)[i + 1]);
                EntryList.Add(((byte *)Header->Entries)[i]);
            }

            return(false);
        }