if(window==1)
{
sprintf(bmpfile,"x-z_%d.bmp",y);
- size=x*z;
- width=x;
- height=z;
+ size=3*d3_l->max_x*d3_l->max_z;
+ width=d3_l->max_x;
+ height=d3_l->max_z;
}
if(window==2)
{
sprintf(bmpfile,"y-z_%d.bmp",x);
- size=y*z;
- width=y;
- height=z;
+ size=3*d3_l->max_y*d3_l->max_z;
+ width=d3_l->max_y;
+ height=d3_l->max_z;
}
if(window==3)
{
sprintf(bmpfile,"x-y_%d.bmp",z);
- size=x*y;
- width=x;
- height=y;
+ size=3*d3_l->max_x*d3_l->max_y;
+ width=d3_l->max_x;
+ height=d3_l->max_y;
}
if((fd=open(bmpfile,O_WRONLY|O_CREAT))<0)
}
if(window==1)
{
- for(i=0;i<d3_l->max_x;i++)
+ for(j=0;j<d3_l->max_z;j++)
{
- for(j=0;j<d3_l->max_z;j++)
+ for(i=0;i<d3_l->max_x;i++)
{
- if(*(d3_l->status+i+y*d3_l->max_x+j*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
+ if(*(d3_l->status+i+y*d3_l->max_x+(d3_l->max_z-j)*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
else memset(buf,0,3);
if(write(fd,buf,3)<3)
{
}
if(window==2)
{
- for(i=0;i<d3_l->max_y;i++)
+ for(j=0;j<d3_l->max_z;j++)
{
- for(j=0;j<d3_l->max_z;j++)
+ for(i=0;i<d3_l->max_y;i++)
{
- if(*(d3_l->status+x+i*d3_l->max_x+j*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
+ if(*(d3_l->status+x+i*d3_l->max_x+(d3_l->max_z-j)*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
else memset(buf,0,3);
if(write(fd,buf,3)<3)
{
}
if(window==3)
{
- for(i=0;i<d3_l->max_x;i++)
+ for(j=0;j<d3_l->max_y;j++)
{
- for(j=0;j<d3_l->max_y;j++)
+ for(i=0;i<d3_l->max_x;i++)
{
- if(*(d3_l->status+i+j*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
+ if(*(d3_l->status+i+(d3_l->max_y-j)*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
else memset(buf,0,3);
if(write(fd,buf,3)<3)
{