mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Deleted scrap code
This commit is contained in:
parent
c812696612
commit
aec8b64fd6
@ -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++;
|
||||
|
22
test/main.c
22
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user