Пример #1
0
        internal static ResourceNode TryParse(DataSource source)
        {
            int length = source.Length;
            bint* offsets = (bint*)source.Address;
            int index, last, current;

            for (index = 0, last = 0; last != length; index++)
            {
                current = offsets[index];
                if ((current < last) || (current > length))
                    return null;

                last = current;
            }

            return (offsets[0] == (index << 2)) ? new MSBinNode() : null;
        }
Пример #2
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((REFT *)source.Address)->_tag == REFT.Tag ? new REFTNode() : null);
 }
Пример #3
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((PLT0v1*)source.Address)->_bresEntry._tag == PLT0v1.Tag ? new PLT0Node() : null;
 }
Пример #4
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((REFF*)source.Address)->_tag == REFF.Tag ? new REFFNode() : null;
 }
Пример #5
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((RASD*)source.Address)->_header._tag == RASD.Tag ? new RASDNode() : null;
 }
        internal static ResourceNode TryParse(DataSource source)
        {
            CollisionHeader* header = (CollisionHeader*)source.Address;

            if ((header->_numPoints < 0) || (header->_numPlanes < 0) || (header->_numObjects < 0) || (header->_unk1 < 0))
                return null;

            if ((header->_pointOffset != 0x28) ||
                (header->_planeOffset >= source.Length) || (header->_planeOffset <= header->_pointOffset) ||
                (header->_objectOffset >= source.Length) || (header->_objectOffset <= header->_planeOffset))
                return null;

            int* sPtr = header->_pad;
            for (int i = 0; i < 5; i++)
                if (sPtr[i] != 0)
                    return null;

            return new CollisionNode();
        }
Пример #7
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((STPM *)source.Address)->_tag == STPM.Tag ? new STPMNode() : null);
 }
Пример #8
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((TBST *)source.Address)->_tag == TBST.Tag ? new TBSTNode(0) : null);
 }
Пример #9
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((ATKD*)source.Address)->_tag == ATKD.Tag ? new ATKDNode() : null;
 }
Пример #10
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((RWAR *)source.Address)->_header._tag == RWAR.Tag ? new RWARNode() : null);
 }
Пример #11
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((MDL0Header *)source.Address)->_header._tag == MDL0Header.Tag ? new MDL0Node() : null);
 }
Пример #12
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((BRESCommonHeader*)source.Address)->_tag == SHP0v3.Tag ? new SHP0Node() : null;
 }
Пример #13
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(((HKXHeader *)source.Address)->_tag1 == HKXHeader.Tag1 ? new HavokNode() : null);
 }
Пример #14
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return source.Tag == "GIB2" ? new GIB2Node() : null;
 }
Пример #15
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((GMPS *)source.Address)->_tag == GMPS.Tag ? new GMPSNode() : null);
 }
Пример #16
0
 internal new static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(source.Tag == "GDBF" ? new GDBFNode() : null);
 }
Пример #17
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((BRESCommonHeader *)source.Address)->_tag == SRT0v4.Tag ? new SRT0Node() : null);
 }
Пример #18
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((SRT0 *)source.Address)->_header._tag == SRT0.Tag ? new SRT0Node() : null);
 }
Пример #19
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((ATKD *)source.Address)->_tag == ATKD.Tag ? new ATKDNode() : null);
 }
Пример #20
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((STPM*)source.Address)->_tag == STPM.Tag ? new STPMNode() : null;
 }
 internal void Initialize(ResourceNode parent, DataSource source, int index)
 {
     _index = index;
     base.Initialize(parent, source);
 }
Пример #22
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(source.Tag == "GWAT" ? new GWATNode() : null);
 }
Пример #23
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((BLOC *)source.Address)->_tag == BLOC.Tag ? new BLOCNode() : null);
 }
Пример #24
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((CLR0v3*)source.Address)->_header._tag == CLR0v3.Tag ? new CLR0Node() : null;
 }
Пример #25
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(((REFF *)source.Address)->_tag == REFF.Tag ? new REFFNode() : null);
 }