rid->vt += frand(0.002) - 0.001;
/* apply friction brakes */
- if (abs(rid->vt) > 0.02)
+ if (fabsf(rid->vt) > 0.02)
rid->vt *= 0.9;
/* draw */
/* intersection test */
if (d < (f->discs[n].r + di->r)) {
/* complete containment test */
- if (d > abs(f->discs[n].r - di->r)) {
+ if (d > fabsf(f->discs[n].r - di->r)) {
/* find solutions */
a = (di->r * di->r - f->discs[n].r * f->discs[n].r + d * d) / (2 * d);
p2x = di->x + a * (f->discs[n].x - di->x) / d;
memset(f->off_alpha, 0, sizeof(unsigned char) * f->width * f->height);
-# ifdef HAVE_COCOA /* Don't second-guess Quartz's double-buffering */
+# ifdef HAVE_JWXYZ /* Don't second-guess Quartz's double-buffering */
+ /* Or Android's */
f->off_map = window;
# else
f->off_map = XCreatePixmap(dpy, window, f->width, f->height, f->visdepth);
bgs = fgs;
bgv = fgv / 10.0;
#endif
- make_color_ramp (st->dpy, st->xgwa.colormap,
+ make_color_ramp (st->xgwa.screen, st->xgwa.visual, st->xgwa.colormap,
bgh, bgs, bgv,
fgh, fgs, fgv,
st->colors, &st->ncolors,
static const char *intermomentary_defaults[] = {
+ ".lowrez: true",
".background: black",
".foreground: yellow",
"*drawDelay: 30000",
"*maxRiders: 40",
"*maxRadius: 100",
"*colors: 256",
+# ifdef HAVE_MOBILE
+ "*ignoreRotation: True",
+# endif
0
};