Meshes with multiple batches handled

This commit is contained in:
surkeh
2018-04-13 17:22:07 -07:00
parent 4df1024a55
commit ad32d3d10a
3 changed files with 8 additions and 8 deletions

View File

@@ -117,14 +117,15 @@ void extractmeshes(const char *filedata,
unsigned int i;
unsigned int j;
bool ok;
//h -> numMesh
//for (i = 0; i < 5; i++) {
for (i = 0; i < h -> numMesh; i++) {
ok = getmeshheader(&mh, i, filedata);
if (ok) {
// for (j = 0; j < mh -> numBatch; j++) {
getmeshbatch(&b, mh, filedata);
for (j = 0; j < mh -> numBatch; j++) {
unsigned int offset = mh->offsetBatches + j * sizeof(struct BatchData);
getmeshbatch(&b, offset, filedata);
printmeshbatch(&b);
// } // end for
} // end for
} // end if
} // end for
}