projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.38.tar.gz
[xscreensaver]
/
hacks
/
intermomentary.c
diff --git
a/hacks/intermomentary.c
b/hacks/intermomentary.c
index 0c0ac4c8f5c880eb6793446d5ee5e313ac676512..4e65b765864e76beafda1157a3bfceab198e4beb 100644
(file)
--- a/
hacks/intermomentary.c
+++ b/
hacks/intermomentary.c
@@
-224,8
+224,8
@@
draw_glowpoint(struct state *st, Drawable drawable,
float a;
unsigned long c;
float a;
unsigned long c;
- for (i =
-
2; i < 3; i++) {
- for (j =
-
2; j < 3; j++) {
+ for (i =
-
2; i < 3; i++) {
+ for (j =
-
2; j < 3; j++) {
a = 0.8 - i * i * 0.1 - j * j * 0.1;
c = trans_point(st, px+i, py+j, 255, a, f);
a = 0.8 - i * i * 0.1 - j * j * 0.1;
c = trans_point(st, px+i, py+j, 255, a, f);
@@
-251,7
+251,7
@@
moverender_rider(struct state *st, Drawable drawable,
rid->vt += frand(0.002) - 0.001;
/* apply friction brakes */
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 */
rid->vt *= 0.9;
/* draw */
@@
-302,7
+302,7
@@
render_disc(struct state *st, Drawable drawable, GC fgc, struct field *f, int dn
/* intersection test */
if (d < (f->discs[n].r + di->r)) {
/* complete containment test */
/* 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;
/* 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;
@@
-360,7
+360,8
@@
static void build_img(Display *dpy, Window window, struct field *f)
memset(f->off_alpha, 0, sizeof(unsigned char) * f->width * f->height);
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);
f->off_map = window;
# else
f->off_map = XCreatePixmap(dpy, window, f->width, f->height, f->visdepth);
@@
-419,7
+420,7
@@
intermomentary_init (Display *dpy, Window window)
bgs = fgs;
bgv = fgv / 10.0;
#endif
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,
bgh, bgs, bgv,
fgh, fgs, fgv,
st->colors, &st->ncolors,
@@
-547,6
+548,7
@@
intermomentary_free (Display *dpy, Window window, void *closure)
static const char *intermomentary_defaults[] = {
static const char *intermomentary_defaults[] = {
+ ".lowrez: true",
".background: black",
".foreground: yellow",
"*drawDelay: 30000",
".background: black",
".foreground: yellow",
"*drawDelay: 30000",
@@
-554,6
+556,9
@@
static const char *intermomentary_defaults[] = {
"*maxRiders: 40",
"*maxRadius: 100",
"*colors: 256",
"*maxRiders: 40",
"*maxRadius: 100",
"*colors: 256",
+# ifdef HAVE_MOBILE
+ "*ignoreRotation: True",
+# endif
0
};
0
};