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;
        }
Exemple #2
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((REFT *)source.Address)->_tag == REFT.Tag ? new REFTNode() : null);
 }
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((PLT0v1*)source.Address)->_bresEntry._tag == PLT0v1.Tag ? new PLT0Node() : null;
 }
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((REFF*)source.Address)->_tag == REFF.Tag ? new REFFNode() : null;
 }
 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();
        }
Exemple #7
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((STPM *)source.Address)->_tag == STPM.Tag ? new STPMNode() : null);
 }
Exemple #8
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((TBST *)source.Address)->_tag == TBST.Tag ? new TBSTNode(0) : null);
 }
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((ATKD*)source.Address)->_tag == ATKD.Tag ? new ATKDNode() : null;
 }
Exemple #10
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((RWAR *)source.Address)->_header._tag == RWAR.Tag ? new RWARNode() : null);
 }
Exemple #11
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((MDL0Header *)source.Address)->_header._tag == MDL0Header.Tag ? new MDL0Node() : null);
 }
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((BRESCommonHeader*)source.Address)->_tag == SHP0v3.Tag ? new SHP0Node() : null;
 }
Exemple #13
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(((HKXHeader *)source.Address)->_tag1 == HKXHeader.Tag1 ? new HavokNode() : null);
 }
Exemple #14
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return source.Tag == "GIB2" ? new GIB2Node() : null;
 }
Exemple #15
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((GMPS *)source.Address)->_tag == GMPS.Tag ? new GMPSNode() : null);
 }
Exemple #16
0
 internal new static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(source.Tag == "GDBF" ? new GDBFNode() : null);
 }
Exemple #17
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((BRESCommonHeader *)source.Address)->_tag == SRT0v4.Tag ? new SRT0Node() : null);
 }
Exemple #18
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((SRT0 *)source.Address)->_header._tag == SRT0.Tag ? new SRT0Node() : null);
 }
Exemple #19
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((ATKD *)source.Address)->_tag == ATKD.Tag ? new ATKDNode() : null);
 }
 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);
 }
Exemple #22
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(source.Tag == "GWAT" ? new GWATNode() : null);
 }
Exemple #23
0
 internal static ResourceNode TryParse(DataSource source)
 {
     return(((BLOC *)source.Address)->_tag == BLOC.Tag ? new BLOCNode() : null);
 }
 internal static ResourceNode TryParse(DataSource source)
 {
     return ((CLR0v3*)source.Address)->_header._tag == CLR0v3.Tag ? new CLR0Node() : null;
 }
Exemple #25
0
 internal static ResourceNode TryParse(DataSource source, ResourceNode parent)
 {
     return(((REFF *)source.Address)->_tag == REFF.Tag ? new REFFNode() : null);
 }