mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2026-04-21 12:40:28 +05:30
Moved out for loop & fixed getting mesh headers
This commit is contained in:
16
test/main.c
16
test/main.c
@@ -111,17 +111,15 @@ void extractmeshes(const char* filedata,
|
||||
if (filedata == NULL || filesize <= 0) {
|
||||
return;
|
||||
}
|
||||
struct Header *h = NULL;
|
||||
h = (struct Header*)filedata;
|
||||
printf("pointer %x\n", h);
|
||||
printgheader(h);
|
||||
struct MeshHeader **mh = NULL;
|
||||
mh = (struct MeshHeader**)
|
||||
malloc(sizeof(struct MeshHeader*) * h -> numMesh);
|
||||
getmeshheaders(mh, filedata, filesize);
|
||||
struct Header *h = (struct Header*)filedata;
|
||||
struct MeshHeader *mh = NULL;
|
||||
unsigned int i;
|
||||
bool ok;
|
||||
for (i = 0; i < h -> numMesh; i++) {
|
||||
printf("returning %x \n", mh[i]);
|
||||
ok = getmeshheader(&mh, i, filedata);
|
||||
if (ok) {
|
||||
printmeshheader(mh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user