{
for(i=0;i<d3_l->max_x;i++)
{
- 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);
+ if(*(d3_l->status+i+y*d3_l->max_x+(d3_l->max_z-j-1)*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
else memset(buf,0,3);
if(write(fd,buf,3)<3)
{
{
for(i=0;i<d3_l->max_y;i++)
{
- 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);
+ if(*(d3_l->status+x+i*d3_l->max_x+(d3_l->max_z-j-1)*d3_l->max_x*d3_l->max_y)&RED) memset(buf,0xff,3);
else memset(buf,0,3);
if(write(fd,buf,3)<3)
{
{
for(i=0;i<d3_l->max_x;i++)
{
- 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);
+ if(*(d3_l->status+i+(d3_l->max_y-j-1)*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)
{