diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-02-23 01:55:50 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-02-23 01:55:50 (GMT) |
| commit | bdcc6e3fbaf4af4604c711652646552c34144b11 (patch) | |
| tree | 9c2342506b64a21019caecc3961889bffdd5f8ae /src | |
| parent | a8439f221e7bc4a8314aa84d4be60dfa68d16831 (diff) | |
| download | powder-bdcc6e3fbaf4af4604c711652646552c34144b11.zip powder-bdcc6e3fbaf4af4604c711652646552c34144b11.tar.gz | |
Reduce GoL lag
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c index b6aab32..2cb8e24 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) { |
