summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-02-23 01:55:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-02-23 17:04:43 (GMT)
commit9b3c25227a298d946ce357868c434ce21f8ef14c (patch)
tree6be34267f7b6ed91b192d171af542330657b29a3 /src
parent417b740d468b8ae3d35872d4d02fd34999da4903 (diff)
downloadpowder-9b3c25227a298d946ce357868c434ce21f8ef14c.zip
powder-9b3c25227a298d946ce357868c434ce21f8ef14c.tar.gz
Reduce GoL lag
Diffstat (limited to 'src')
-rw-r--r--src/powder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c
index 78562b8..ba2cd17 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -1353,10 +1353,12 @@ void update_particles_i(pixel *vid, int start, int inc)
if (r && parts[r>>8].tmp<=0)
parts[r>>8].type = PT_NONE;//using kill_part makes it not work
}
+ for( z = 0;z<=NGOL;z++)
+ gol2[nx][ny][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this.
}
if (createdsomething)
GENERATION ++;
- memset(gol2, 0, sizeof(gol2));
+ //memset(gol2, 0, sizeof(gol2));
}
if (ISWIRE==1)
{