- 192
- Posts
- 17
- Years
- Seen Oct 28, 2020
ds texture converter & map converter
Actually this isn't a tool but a patch for nsbmd. Maybe someone with a windows-machine can compile this because I don't have one.
Open the file "texture.cpp" and look for the line
Before this line insert:
After you compile nsbmd it will dump every texture in the directory it was started in. If you can't open the textures (PPM-Format) try a software like GIMP.
I attached the result of nsbmd and the 3rd entry of land_data.
Actually this isn't a tool but a patch for nsbmd. Maybe someone with a windows-machine can compile this because I don't have one.
Open the file "texture.cpp" and look for the line
Code:
glBindTexture( GL_TEXTURE_2D, i+1 );
Code:
{
char name[22];
strcpy(name,mat->texname);
strcat(name,".ppm");
FILE *f=fopen(name,"w");
printf("%d\n",f);
fprintf(f,"P6\n%d\n%d\n255\n",mat->width, mat->height);
int ax,ay;
for(ay=0;ay<mat->height;ay++)
for(ax=0;ax<mat->width;ax++)
fwrite(image+(ax+ay*mat->width),3,1,f);
fclose(f);
}
After you compile nsbmd it will dump every texture in the directory it was started in. If you can't open the textures (PPM-Format) try a software like GIMP.
I attached the result of nsbmd and the 3rd entry of land_data.
Last edited: