"*count: -500 \n" \
"*cycles: 200 \n" \
"*size: -15 \n" \
- "*ncolors: 100 \n"
+ "*ncolors: 100 \n" \
+ "*fpsSolid: true \n" \
+
# define reshape_crystal 0
# define crystal_handle_event 0
# include "xlockmore.h" /* in xscreensaver distribution */
#define DEF_MAXSIZE "False"
#define DEF_CYCLE "True"
+#undef NRAND
+#define NRAND(n) ( (n) ? (int) (LRAND() % (n)) : 0)
+
#define min(a,b) ((a) <= (b) ? (a) : (b))
static int nx, ny;
cryst->offset_w = (int) (cryst->b * 0.5);
}
} else {
+ int max_repeat = 10;
cryst->offset_w = -1;
- while (cryst->offset_w < 4 || (int) (cryst->offset_w - cryst->b *
- sin((cryst->gamma - 90) * PI_RAD)) < 4) {
+ while (max_repeat-- &&
+ (cryst->offset_w < 4 || (int) (cryst->offset_w - cryst->b *
+ sin((cryst->gamma - 90) * PI_RAD)) < 4)
+ ) {
cryst->b = NRAND((int) (cryst->win_height / (cos((cryst->gamma - 90) *
PI_RAD))) - cell_min) + cell_min;
if (cryst->planegroup > 8)