MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / dumpChunks

Method dumpChunks

Extras/Serialize/BulletFileLoader/bFile.cpp:1458–1497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1456 }
1457}
1458void bFile::dumpChunks(bParse::bDNA *dna)
1459{
1460 int i;
1461
1462 for (i = 0; i < m_chunks.size(); i++)
1463 {
1464 bChunkInd &dataChunk = m_chunks[i];
1465 char *codeptr = (char *)&dataChunk.code;
1466 char codestr[5] = {codeptr[0], codeptr[1], codeptr[2], codeptr[3], 0};
1467
1468 short *newStruct = dna->getStruct(dataChunk.dna_nr);
1469 char *typeName = dna->getType(newStruct[0]);
1470 printf("%3d: %s ", i, typeName);
1471
1472 printf("code=%s ", codestr);
1473
1474 printf("ptr=%p ", dataChunk.oldPtr);
1475 printf("len=%d ", dataChunk.len);
1476 printf("nr=%d ", dataChunk.nr);
1477 if (dataChunk.nr != 1)
1478 {
1479 printf("not 1\n");
1480 }
1481 printf("\n");
1482 }
1483
1484#if 0
1485 IDFinderData ifd;
1486 ifd.success = 0;
1487 ifd.IDname = NULL;
1488 ifd.just_print_it = 1;
1489 for (i=0; i<bf->m_blocks.size(); ++i)
1490 {
1491 BlendBlock* bb = bf->m_blocks[i];
1492 printf("tag='%s'\tptr=%p\ttype=%s\t[%4d]", bb->tag, bb,bf->types[bb->type_index].name,bb->m_array_entries_.size());
1493 block_ID_finder(bb, bf, &ifd);
1494 printf("\n");
1495 }
1496#endif
1497}
1498
1499void bFile::writeChunks(FILE *fp, bool fixupPointers)
1500{

Callers 2

loadFileFromMemoryMethod · 0.45
mainFunction · 0.45

Calls 3

sizeMethod · 0.45
getStructMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected