From aec8b64fd6be7be08238b005cf89e94079b960b0 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Thu, 5 Apr 2018 14:57:06 -0700 Subject: [PATCH] Deleted scrap code --- src/devil1tex.c | 2 -- test/main.c | 22 ---------------------- 2 files changed, 24 deletions(-) diff --git a/src/devil1tex.c b/src/devil1tex.c index 4d06be2..91316bb 100644 --- a/src/devil1tex.c +++ b/src/devil1tex.c @@ -70,7 +70,6 @@ unsigned int gettexturebatch( // TextureBatch shares a starting address with the first texture // and shares the ending address with the last texture. for (i = 0; i < tp -> batchNumber; i++) { - printf("%x \n", offset); tb[i] = (struct TextureBatch*)filedata + offset; // the next texture batch is TextureSize * number of textures away. offset += bds[i] -> textureSize * (bds[i] -> texNumber); @@ -90,7 +89,6 @@ void gettextures(unsigned int *t, unsigned int offset = tp -> firstBatchOffset; for (i = 0; i < tp -> batchNumber; i++) { for (j = 0; j < bds[i] -> texNumber; j++) { - printf("texture offsets %x\n", offset); t[k] = offset; offset += bds[i] -> textureSize; k++; diff --git a/test/main.c b/test/main.c index 24f8841..d249ebe 100644 --- a/test/main.c +++ b/test/main.c @@ -90,24 +90,6 @@ bool unpackpld (const char *filedata, return status; } -/* void unpacktextures(const char *filedata, unsigned int filesize) { - struct TexturePack *tp = (struct TexturePack*)filedata; - struct TextureBatchDescriptor **bds = NULL; - bds = (struct TextureBatchDescriptor**)malloc(tp -> batchNumber); - gettbd(bds, filedata, filesize); - printtph(tp); - int i; - for (i = 0; i < tp -> batchNumber; i++) { - printtbd(bds[i]); - } - free(bds); - return; - - const char *fmt = (const char*)malloc(strlen(filename) + 3 + 3); - strcat(fmt, filename); - strcat(fmt, "%d.dds"); -} */ - void write(const char *filename, unsigned int id, const char* t, @@ -120,10 +102,6 @@ void write(const char *filename, if (out != NULL) { written = fwrite(t, sizeof(unsigned char), size, out); fclose(out); -/* unsigned int i; - for (i = 0; i < 10; i++) { - printf("w %u \n", *(t + i)); - } */ if (written == 0) { perror("texture write error"); }