From 2622db5a3791e6ab8abafcf7956fbd91b9ea2cca Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 24 Sep 2003 09:11:07 +0000 Subject: [PATCH] fixed bmp bug CCS: ---------------------------------------------------------------------- --- nlsop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nlsop.c b/nlsop.c index ec8e4d3..edbc860 100644 --- a/nlsop.c +++ b/nlsop.c @@ -386,7 +386,7 @@ int write_bmp(d3_lattice *d3_l,int window,u32 x,u32 y,u32 z) { for(i=0;imax_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) { @@ -411,7 +411,7 @@ int write_bmp(d3_lattice *d3_l,int window,u32 x,u32 y,u32 z) { for(i=0;imax_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) { @@ -436,7 +436,7 @@ int write_bmp(d3_lattice *d3_l,int window,u32 x,u32 y,u32 z) { for(i=0;imax_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) { -- 2.39.2