puts("-y <value> \t # y cells (default 50)");
puts("-z <value> \t # z cells (default 100)");
puts("-s <value> \t # steps to calculate (default 5000)");
- puts("-X <value> \t display area intercept point x (default 25)");
- puts("-Y <value> \t display area intercept point y (default 25)");
- puts("-Z <value> \t display area intercept point z (default 50)");
+ puts("-X <value> \t display area intercept point x (default # x celss / 2)");
+ puts("-Y <value> \t display area intercept point y (default # y cells / 2)");
+ puts("-Z <value> \t display area intercept point z (default # z cells / 2)");
puts("-d <value> \t refresh every <value> loops (default 100)");
return -23;
}
{
/* tag it ... testing! */
make_amorph(cell);
-
+
return 23;
}
slope_nel=DEFAULT_SLOPE_NEL;
start_nel=DEFAULT_START_NEL;
steps=DEFAULT_STEPS;
- display_x=DEFAULT_DISPLAY_X-1;
- display_y=DEFAULT_DISPLAY_Y-1;
- display_z=DEFAULT_DISPLAY_Z-1;
+ display_x=x_cell/2;
+ display_y=y_cell/2;
+ display_z=z_cell/2;
display_refresh_rate=DEFAULT_DISPLAY_REF_RATE;
/* parse command args */
/* testing ... */
/* 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");
process_cell((u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1)));
/* display stuff */
- if((i%display_refresh_rate)==0)
- {
- puts("refreshing diplay ...");
- // display_draw(&display,display_x,display_y,display_z);
- }
- /* */
+ if((i%display_refresh_rate)==0)
+ display_draw(&display,display_x,display_y,display_z);
}
/* display again and quit when button hit */
+ display_draw(&display,display_x,display_y,display_z);
puts("hit button to quit ...");
getchar();
+ display_release(&display);
+
return 23;
}