Deleted scrapped functions.

This commit is contained in:
_
2018-04-06 01:22:52 -07:00
parent 5462ec025e
commit 0dabc2568e
3 changed files with 0 additions and 127 deletions

View File

@@ -107,38 +107,6 @@ void write(const char *filename,
}
}
void unpacktextures(const char *filedata,
unsigned int filesize,
const char *filename) {
struct TexturePack *tp = (struct TexturePack*)filedata;
struct TextureBatch **batches = NULL;
struct TextureBatchDescriptor **descripts = NULL;
batches = (struct TextureBatch**)malloc(tp -> batchNumber);
descripts = (struct TextureBatchDescriptor**)malloc(tp -> batchNumber);
gettbd(descripts, filedata, filesize);
// array of pointers - texture data exists in memory in filedata.
unsigned int texturecount = gettexturebatch(batches,
descripts,
filedata,
filesize);
unsigned int *tloc = (unsigned int*)
malloc(sizeof(unsigned int) * texturecount);
locatetextures(tloc, tp, descripts);
// add 3 to buffer for digits, & 4 for file extension
char *fmt = (char*)malloc(strlen(filename) + 3 + 4);
unsigned int texsize = 0;
unsigned int i;
for (i = 0; i < texturecount; i++) {
texsize = descripts[i/(tp -> batchNumber)] -> textureSize;
sprintf(fmt, "%s_%d.dds", filename, i);
write(fmt, filedata + tloc[i], texsize);
}
free(fmt);
free(tloc);
free(descripts);
free(batches);
}
void exporttextures(const char *filedata,
unsigned int filesize,
const char *filename) {