Example #1
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++;
            }
        }
Example #2
0
 public Blade(BladeId bladeId,
              IGlobalTimeProvider globalTimeProvider,
              IEventSource <TEvent, TOffset> eventSource,
              IOffsetStorage <TOffset> offsetStorage,
              IOffsetInterpreter <TOffset> offsetInterpreter,
              IEventConsumer <TEvent, TOffset> eventConsumer,
              ILog logger)
 {
     BladeId = bladeId;
     this.globalTimeProvider = globalTimeProvider;
     this.eventSource        = eventSource;
     this.offsetStorage      = offsetStorage;
     this.offsetInterpreter  = offsetInterpreter;
     this.eventConsumer      = eventConsumer;
     this.logger             = logger.ForContext("DelayedEventFeed");
     LogComponentsDescription();
     offsetHolder = new OffsetHolder(offsetStorage, offsetInterpreter, this.logger);
 }
 public DataBuilder(DataSection data)
 {
     _moveset          = (_data = data)._root as MovesetNode;
     _misc             = _data._misc;
     _subActionTable   = new FDefSubActionStringTable();
     _extraDataOffsets = ExtraDataOffsets.GetOffsets(_moveset.Character);
     _getPartSize      = new Action[]
     {
         GetSizePart1,
         GetSizePart2,
         GetSizePart3,
         GetSizePart4,
         GetSizePart5,
     };
     _buildPart = new Action[]
     {
         BuildPart1,
         BuildPart2,
         BuildPart3,
         BuildPart4,
         BuildPart5,
     };
 }