- static int no_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, D,D,D,D };
- static int up_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, U,U,D,D };
- static int down_bias[] = { L,L,L,L, R,R,R,R, U,U,D,D, D,D,D,D };
- static int left_bias[] = { L,L,L,L, L,L,R,R, U,U,U,U, D,D,D,D };
- static int right_bias[] = { L,L,R,R, R,R,R,R, U,U,U,U, D,D,D,D };
-
- static int upleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,U, U,D,D,D };
- static int downleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,D, D,D,D,D };
- static int upright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,U, U,D,D,D };
- static int downright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,D, D,D,D,D };
- static int *bias;
-
- switch (mode) {
- case SHUFFLE: bias = no_bias; break;
- case UP: bias = up_bias; break;
- case LEFT: bias = left_bias; break;
- case RIGHT: bias = right_bias; break;
- case DOWN: bias = down_bias; break;
- case UPLEFT: bias = upleft_bias; break;
- case DOWNLEFT: bias = downleft_bias; break;
- case UPRIGHT: bias = upright_bias; break;
- case DOWNRIGHT: bias = downright_bias; break;
- case IN: bias = no_bias; break;
- case OUT: bias = no_bias; break;
- default: abort();
+ static const int no_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, D,D,D,D };
+ static const int up_bias[] = { L,L,L,L, R,R,R,R, U,U,U,U, U,U,D,D };
+ static const int down_bias[] = { L,L,L,L, R,R,R,R, U,U,D,D, D,D,D,D };
+ static const int left_bias[] = { L,L,L,L, L,L,R,R, U,U,U,U, D,D,D,D };
+ static const int right_bias[] = { L,L,R,R, R,R,R,R, U,U,U,U, D,D,D,D };
+
+ static const int upleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,U, U,D,D,D };
+ static const int downleft_bias[] = { L,L,L,L, L,R,R,R, U,U,U,D, D,D,D,D };
+ static const int upright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,U, U,D,D,D };
+ static const int downright_bias[] = { L,L,L,R, R,R,R,R, U,U,U,D, D,D,D,D };
+
+ if (st->img_loader) /* still loading */
+ {
+ st->img_loader = load_image_async_simple (st->img_loader,
+ 0, 0, 0, 0, 0);
+ if (! st->img_loader) { /* just finished */
+
+ st->start_time = time ((time_t) 0);
+ if (st->random_p)
+ st->mode = random() % (FUZZ+1);
+
+ if (st->mode == MELT || st->mode == STRETCH)
+ /* make sure screen eventually turns background color */
+ XDrawLine (st->dpy, st->window, st->gc, 0, 0, st->sizex, 0);
+ }
+ return st->delay;