From 5c91fde92e7321f9b3a56eaf90b5d288545472c3 Mon Sep 17 00:00:00 2001 From: Philip Date: Fri, 5 Nov 2010 23:17:46 -0400 Subject: GOL wraps around the edges diff --git a/src/powder.c b/src/powder.c index 2c49d1c..67e743c 100644 --- a/src/powder.c +++ b/src/powder.c @@ -825,8 +825,8 @@ void update_particles_i(pixel *vid, int start, int inc) if(sys_pause&&!framerender) return; if(CGOL>=GSPEED) - for(nx=0;nx>8].type==PT_GOL) gol[nx][ny] = 1; } - for(nx=0;nx=0 && ny+nny>0 && nx+nnx=XRES-4) + gol2[4][YRES-5] ++; + else if(ny+nny>=YRES-4&&nx+nnx<4) + gol2[XRES-5][4] ++; + else if(nx+nnx<4) + gol2[XRES-5][ny+nny] ++; + else if(ny+nny<4) + gol2[nx+nnx][YRES-5] ++; + else if(ny+nny>=YRES-4&&nx+nnx>=XRES-4) + gol2[4][4] ++; + else if(ny+nny>=YRES-4) + gol2[nx+nnx][4] ++; + else if(nx+nnx>=XRES-4) + gol2[4][ny+nny] ++; + else gol2[nx+nnx][ny+nny] ++; + + + } } - for(nx=0;nx