Deleted scrap code

This commit is contained in:
_ 2018-04-05 14:57:06 -07:00
parent c812696612
commit aec8b64fd6
2 changed files with 0 additions and 24 deletions

View File

@ -70,7 +70,6 @@ unsigned int gettexturebatch(
// TextureBatch shares a starting address with the first texture // TextureBatch shares a starting address with the first texture
// and shares the ending address with the last texture. // and shares the ending address with the last texture.
for (i = 0; i < tp -> batchNumber; i++) { for (i = 0; i < tp -> batchNumber; i++) {
printf("%x \n", offset);
tb[i] = (struct TextureBatch*)filedata + offset; tb[i] = (struct TextureBatch*)filedata + offset;
// the next texture batch is TextureSize * number of textures away. // the next texture batch is TextureSize * number of textures away.
offset += bds[i] -> textureSize * (bds[i] -> texNumber); offset += bds[i] -> textureSize * (bds[i] -> texNumber);
@ -90,7 +89,6 @@ void gettextures(unsigned int *t,
unsigned int offset = tp -> firstBatchOffset; unsigned int offset = tp -> firstBatchOffset;
for (i = 0; i < tp -> batchNumber; i++) { for (i = 0; i < tp -> batchNumber; i++) {
for (j = 0; j < bds[i] -> texNumber; j++) { for (j = 0; j < bds[i] -> texNumber; j++) {
printf("texture offsets %x\n", offset);
t[k] = offset; t[k] = offset;
offset += bds[i] -> textureSize; offset += bds[i] -> textureSize;
k++; k++;

View File

@ -90,24 +90,6 @@ bool unpackpld (const char *filedata,
return status; 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, void write(const char *filename,
unsigned int id, unsigned int id,
const char* t, const char* t,
@ -120,10 +102,6 @@ void write(const char *filename,
if (out != NULL) { if (out != NULL) {
written = fwrite(t, sizeof(unsigned char), size, out); written = fwrite(t, sizeof(unsigned char), size, out);
fclose(out); fclose(out);
/* unsigned int i;
for (i = 0; i < 10; i++) {
printf("w %u \n", *(t + i));
} */
if (written == 0) { if (written == 0) {
perror("texture write error"); perror("texture write error");
} }