* other special, indirect and consequential damages.
*
* Revision History:
- * 12-May-97: jwz@netscape.com: turned into a standalone program.
+ * 12-May-97: jwz@jwz.org: turned into a standalone program.
* 01-Dec-95: Patched for VMS <joukj@alpha.chem.uva.nl>.
*/
int not_solid = halfrandom(10);
#ifdef STANDALONE /* jwz -- sometimes hack the desktop image! */
- if (halfrandom(5) == 0)
+ if (halfrandom(2) == 0)
{
grab_screen_image(DefaultScreenOfDisplay (MI_DISPLAY(mi)),
MI_WINDOW(mi));
s->backwards = LRAND() & 1; /* jwz: go the other way sometimes */
- if (s->first_time || !halfrandom(5)) {
+ if (s->first_time || (0 == halfrandom(10))) {
XClearWindow(display, MI_WINDOW(mi));
n = 300;
} else {
XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
for (i = 0; i < n; i++) {
- if (not_solid)
+ int ww = ((w/2) + halfrandom(w));
+ if (not_solid) {
if (MI_NPIXELS(mi) > 2)
XSetForeground(display, gc, MI_PIXEL(mi, halfrandom(MI_NPIXELS(mi))));
else if (halfrandom(2))
XSetForeground(display, gc, MI_WIN_WHITE_PIXEL(mi));
else
XSetForeground(display, gc, MI_WIN_BLACK_PIXEL(mi));
+ }
XFillRectangle(display, MI_WINDOW(mi), gc,
- halfrandom(s->width - w),
- halfrandom(s->height - w),
- w, w);
+ halfrandom(s->width - ww),
+ halfrandom(s->height - ww),
+ ww, ww);
}
s->first_time = 0;
}
double x, y, dx = 0, dy = 0, t, s1, s2;
if (0 == s->nblits_remaining--) {
- static lut[] =
+ static int lut[] =
{0, 0, 0, 1, 1, 1, 2};
prepare_screen(mi, s);
/* (x,y) is in biunit square */
switch (s->mode) {
- case 0:
+ case 0: /* rotor */
dx = x;
dy = y;
dy = -dy;
}
break;
- case 1:
+ case 1: /* shuffle */
dx = erandom(3);
dy = erandom(3);
break;
- case 2:
+ case 2: /* explode */
dx = x * 3;
dy = y * 3;
break;