From: hackbard Date: Wed, 24 Sep 2003 09:11:07 +0000 (+0000) Subject: fixed bmp bug X-Git-Tag: fpb~11 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2622db5a3791e6ab8abafcf7956fbd91b9ea2cca;p=physik%2Fnlsop.git fixed bmp bug CCS: ---------------------------------------------------------------------- --- 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) {