+ /* allocate cells */
+ printf("malloc will free %d bytes now ...\n",x_cell*y_cell*z_cell*sizeof(u32));
+ if((cell_p=malloc(x_cell*y_cell*z_cell*sizeof(u32)))==NULL)
+ {
+ puts("failed allocating memory for cells\n");
+ return -23;
+ }
+ memset(cell_p,0,x_cell*y_cell*z_cell*sizeof(u32));
+
+ /* init display */
+ display_init(x_cell,y_cell,z_cell,&display,cell_p,&argc,argv);
+
+ /* main routine */
+ for(i=0;i<steps;i++)
+ {
+ x=rand_get(x_cell);
+ y=rand_get(y_cell);
+ z=rand_get_lgp(slope_nel,start_nel);
+
+ /* todo */
+ // distrib_c_conc(cell_p);
+
+ // process_cell((u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1)));
+ process_cell(cell_p,x,y,z,x_cell,y_cell,z_cell,a_p_range,a_p_faktor,a_p_p0);
+
+ /* display stuff */
+ if((i%display_refresh_rate)==0)
+ display_draw(&display,display_x,display_y,display_z);
+ }
+
+ /* display again and listen for events */
+ display_draw(&display,display_x,display_y,display_z);
+ display_event_init(&display);
+
+ /* debug ... */
+ for(i=0;i<x_cell*y_cell*z_cell;++i)
+ {
+ if(*(u32 *)(cell_p+i))
+ printf("%d -> 0x%x\n",i,*(u32 *)(cell_p+i));
+ }
+
+ while(!quit)