mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
Implemented correct initialization of batch and positions array
This commit is contained in:
@@ -105,7 +105,7 @@ void exporttextures(const char *filedata,
|
||||
return;
|
||||
}
|
||||
|
||||
void extractmeshes(const char* filedata,
|
||||
void extractmeshes(const char *filedata,
|
||||
unsigned int filesize,
|
||||
const char *filename) {
|
||||
if (filedata == NULL || filesize <= 0) {
|
||||
@@ -113,12 +113,15 @@ void extractmeshes(const char* filedata,
|
||||
}
|
||||
struct Header *h = (struct Header*)filedata;
|
||||
struct MeshHeader *mh = NULL;
|
||||
struct Batch *b = NULL;
|
||||
unsigned int i;
|
||||
bool ok;
|
||||
for (i = 0; i < h -> numMesh; i++) {
|
||||
//h -> numMesh
|
||||
for (i = 0; i < 3; i++) {
|
||||
ok = getmeshheader(&mh, i, filedata);
|
||||
if (ok) {
|
||||
printmeshheader(mh);
|
||||
getmeshbatch(&b, mh, filedata);
|
||||
printmeshbatch(b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user