Fixed iterating bug with initializing mesh batches

This commit is contained in:
_
2018-04-13 14:56:14 -07:00
parent d38926b86a
commit 4df1024a55
3 changed files with 46 additions and 48 deletions

View File

@@ -113,18 +113,18 @@ void extractmeshes(const char *filedata,
}
struct Header *h = (struct Header*)filedata;
struct MeshHeader *mh = NULL;
struct Batch *b = NULL;
struct Batch b;
unsigned int i;
unsigned int j;
bool ok;
//h -> numMesh
for (i = 0; i < 2; i++) {
for (i = 0; i < h -> numMesh; i++) {
ok = getmeshheader(&mh, i, filedata);
if (ok) {
for (j = 0; j < mh -> numBatch; j++) {
// for (j = 0; j < mh -> numBatch; j++) {
getmeshbatch(&b, mh, filedata);
printmeshbatch(b);
} // end for
printmeshbatch(&b);
// } // end for
} // end if
} // end for
}