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.30.tar.gz
[xscreensaver]
/
hacks
/
substrate.c
diff --git
a/hacks/substrate.c
b/hacks/substrate.c
index 82c2bacd483b58c68703919e4aa047624a7b138b..efe11fc55762e117b8fad1768f208aa8be4fc208 100644
(file)
--- a/
hacks/substrate.c
+++ b/
hacks/substrate.c
@@
-318,7
+318,6
@@
static inline unsigned long rgb2point(int depth, int r, int g, int b)
switch(depth) {
case 32:
switch(depth) {
case 32:
- ret = 0xff000000;
case 24:
#ifdef HAVE_COCOA
/* This program idiotically does not go through a color map, so
case 24:
#ifdef HAVE_COCOA
/* This program idiotically does not go through a color map, so
@@
-494,16
+493,11
@@
movedrawcrack(struct state *st, GC fgc, struct field *f, int cracknum)
cr->y += ((float) STEP * sin(cr->t * M_PI/180));
}
else {
cr->y += ((float) STEP * sin(cr->t * M_PI/180));
}
else {
- float oldx, oldy;
-
- oldx = cr->x;
- oldy = cr->y;
-
cr->x += ((float) cr->ys * cos(cr->t * M_PI/180));
cr->y += ((float) cr->ys * sin(cr->t * M_PI/180));
cr->x += ((float) cr->xs * cos(cr->t * M_PI/180 - M_PI / 2));
cr->x += ((float) cr->ys * cos(cr->t * M_PI/180));
cr->y += ((float) cr->ys * sin(cr->t * M_PI/180));
cr->x += ((float) cr->xs * cos(cr->t * M_PI/180 - M_PI / 2));
- cr->
x
+= ((float) cr->xs * sin(cr->t * M_PI/180 - M_PI / 2));
+ cr->
y
+= ((float) cr->xs * sin(cr->t * M_PI/180 - M_PI / 2));
cr->t += cr->t_inc;
cr->degrees_drawn += abs(cr->t_inc);
cr->t += cr->t_inc;
cr->degrees_drawn += abs(cr->t_inc);
@@
-691,6
+685,7
@@
substrate_draw (Display *dpy, Window window, void *closure)
XSetForeground(st->dpy, st->fgc, st->gcv.foreground);
}
XSetForeground(st->dpy, st->fgc, st->gcv.foreground);
}
+ /* #### mi->recursion_depth = st->f->cycles; */
return st->growth_delay;
}
return st->growth_delay;
}
@@
-704,6
+699,12
@@
substrate_reshape (Display *dpy, Window window, void *closure,
static Bool
substrate_event (Display *dpy, Window window, void *closure, XEvent *event)
{
static Bool
substrate_event (Display *dpy, Window window, void *closure, XEvent *event)
{
+ struct state *st = (struct state *) closure;
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ st->f->cycles = st->max_cycles;
+ return True;
+ }
return False;
}
return False;
}
@@
-725,6
+726,9
@@
static const char *substrate_defaults[] = {
"*maxCracks: 100",
"*sandGrains: 64",
"*circlePercent: 33",
"*maxCracks: 100",
"*sandGrains: 64",
"*circlePercent: 33",
+#ifdef USE_IPHONE
+ "*ignoreRotation: True",
+#endif
0
};
0
};