projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://www.jwz.org/xscreensaver/xscreensaver-5.07.tar.gz
[xscreensaver]
/
hacks
/
goop.c
diff --git
a/hacks/goop.c
b/hacks/goop.c
index 4241950c0c386dc43a4cef014fb2358cf6c69a84..4028fb3c7e069799c5a0e27f10b3e9ce295f0a9b 100644
(file)
--- a/
hacks/goop.c
+++ b/
hacks/goop.c
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 1997
, 2006
Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1997
-2008
Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@
-258,9
+258,11
@@
make_layer (Display *dpy, Window window, int width, int height, int nblobs)
blob_max = (width < height ? width : height) / 2;
blob_min = (blob_max * 2) / 3;
blob_max = (width < height ? width : height) / 2;
blob_min = (blob_max * 2) / 3;
- for (i = 0; i < layer->nblobs; i++)
+ for (i = 0; i < layer->nblobs; i++){
+ int j = blob_max - blob_min;
layer->blobs[i] = make_blob (dpy, width, height,
layer->blobs[i] = make_blob (dpy, width, height,
- (random() % (blob_max-blob_min)) + blob_min);
+ (j ? random() % j : 0) + blob_min);
+ }
layer->pixmap = XCreatePixmap (dpy, window, width, height, 1);
layer->gc = XCreateGC (dpy, layer->pixmap, 0, &gcv);
layer->pixmap = XCreatePixmap (dpy, window, width, height, 1);
layer->gc = XCreateGC (dpy, layer->pixmap, 0, &gcv);
@@
-564,8
+566,8
@@
static const char *goop_defaults [] = {
"*delay: 12000",
"*additive: true",
"*mode: transparent",
"*delay: 12000",
"*additive: true",
"*mode: transparent",
- "*count:
0
",
- "*planes:
0
",
+ "*count:
1
",
+ "*planes:
12
",
"*thickness: 5",
"*torque: 0.0075",
"*elasticity: 0.9",
"*thickness: 5",
"*torque: 0.0075",
"*elasticity: 0.9",