- j=0;
- do {
- rockptr->dx = RDX*crnd();
- rockptr->dy = RDY*crnd();
- x = (rockptr->dx-screendx)*gamerate;
- y = (rockptr->dy-screendy)*gamerate;
- j++;
- } while(x < -rockptr->image->w || x >= XSIZE
- || y < -rockptr->image->h || y >= YSIZE);
- if(j > 1) fprintf(stderr, "had to try %d times.\n", j);
-