mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
Added function that determines size of pld section
This commit is contained in:
11
test/main.c
11
test/main.c
@@ -96,7 +96,12 @@ bool unpackpld(const char *filedata,
|
||||
struct PldHeader h;
|
||||
if (filedata != NULL && filesize > 0) {
|
||||
getpldh(&h, filedata);
|
||||
printpldh(&h);
|
||||
}
|
||||
int size = 0;
|
||||
unsigned int i = 0;
|
||||
for (i = 0; i < h.numOffset; i++) {
|
||||
size = sizeofpldstruct(&h, i, filesize);
|
||||
printf("%x\n", size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +157,8 @@ int main(int argc, char ** argv) {
|
||||
char *f = argv[1];
|
||||
unsigned int bufsize = 0;
|
||||
char *buffer = loadfile(f, &bufsize);
|
||||
// unpackpld(buffer, bufsize, f);
|
||||
exporttextures(buffer, bufsize, f);
|
||||
unpackpld(buffer, bufsize, f);
|
||||
// exporttextures(buffer, bufsize, f);
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user