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; }
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(); }
internal static ResourceNode TryParse(DataSource source) { return(((STPM *)source.Address)->_tag == STPM.Tag ? new STPMNode() : null); }
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; }
internal static ResourceNode TryParse(DataSource source) { return(((RWAR *)source.Address)->_header._tag == RWAR.Tag ? new RWARNode() : null); }
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; }
internal static ResourceNode TryParse(DataSource source, ResourceNode parent) { return(((HKXHeader *)source.Address)->_tag1 == HKXHeader.Tag1 ? new HavokNode() : null); }
internal static ResourceNode TryParse(DataSource source, ResourceNode parent) { return source.Tag == "GIB2" ? new GIB2Node() : null; }
internal static ResourceNode TryParse(DataSource source) { return(((GMPS *)source.Address)->_tag == GMPS.Tag ? new GMPSNode() : null); }
internal new static ResourceNode TryParse(DataSource source, ResourceNode parent) { return(source.Tag == "GDBF" ? new GDBFNode() : null); }
internal static ResourceNode TryParse(DataSource source) { return(((BRESCommonHeader *)source.Address)->_tag == SRT0v4.Tag ? new SRT0Node() : null); }
internal static ResourceNode TryParse(DataSource source) { return(((SRT0 *)source.Address)->_header._tag == SRT0.Tag ? new SRT0Node() : null); }
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); }
internal static ResourceNode TryParse(DataSource source, ResourceNode parent) { return(source.Tag == "GWAT" ? new GWATNode() : null); }
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; }
internal static ResourceNode TryParse(DataSource source, ResourceNode parent) { return(((REFF *)source.Address)->_tag == REFF.Tag ? new REFFNode() : null); }