| 543 | } |
| 544 | |
| 545 | void UTIL_DrawSendTable(FILE *fp, SendTable *pTable, int level = 1) |
| 546 | { |
| 547 | SendProp *pProp; |
| 548 | const char *type; |
| 549 | |
| 550 | for (int i = 0; i < pTable->GetNumProps(); i++) |
| 551 | { |
| 552 | pProp = pTable->GetProp(i); |
| 553 | if (pProp->GetDataTable()) |
| 554 | { |
| 555 | fprintf(fp, "%*sTable: %s (offset %d) (type %s)\n", |
| 556 | level, "", |
| 557 | pProp->GetName(), |
| 558 | pProp->GetOffset(), |
| 559 | pProp->GetDataTable()->GetName()); |
| 560 | |
| 561 | UTIL_DrawSendTable(fp, pProp->GetDataTable(), level + 1); |
| 562 | } |
| 563 | else |
| 564 | { |
| 565 | type = GetDTTypeName(pProp->GetType()); |
| 566 | |
| 567 | if (type != NULL) |
| 568 | { |
| 569 | fprintf(fp, |
| 570 | "%*sMember: %s (offset %d) (type %s) (bits %d) (%s)\n", |
| 571 | level, "", |
| 572 | pProp->GetName(), |
| 573 | pProp->GetOffset(), |
| 574 | type, |
| 575 | pProp->m_nBits, |
| 576 | UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType())); |
| 577 | } |
| 578 | else |
| 579 | { |
| 580 | fprintf(fp, |
| 581 | "%*sMember: %s (offset %d) (type %d) (bits %d) (%s)\n", |
| 582 | level, "", |
| 583 | pProp->GetName(), |
| 584 | pProp->GetOffset(), |
| 585 | pProp->GetType(), |
| 586 | pProp->m_nBits, |
| 587 | UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType())); |
| 588 | } |
| 589 | } |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | CON_COMMAND(sm_dump_netprops_xml, "Dumps the networkable property table as an XML file") |
| 594 | { |
no test coverage detected